Skip to content

Commit 19ed4d0

Browse files
justinchubyCopilot
andcommitted
Fix lint errors
Co-authored-by: Copilot <[email protected]> Signed-off-by: Justin Chu <[email protected]>
1 parent 532acfe commit 19ed4d0

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

‎src/mobius/models/gemma4.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,7 @@ def __init__(self, dim: int, eps: float = 1e-6):
109109
self.dim = dim
110110
self.eps = eps
111111
# Constant all-ones scale (not a learnable parameter from HF).
112-
self.weight = nn.Parameter(
113-
[dim], data=ir.Tensor(np.ones(dim, dtype=np.float32))
114-
)
112+
self.weight = nn.Parameter([dim], data=ir.Tensor(np.ones(dim, dtype=np.float32)))
115113

116114
def forward(self, op: builder.OpBuilder, hidden_states: ir.Value) -> ir.Value:
117115
# stash_type=1 means accumulate variance in float32, avoiding

‎src/mobius/models/gemma4_test.py‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55

66
from __future__ import annotations
77

8-
import torch
9-
108
import onnx_ir as ir
9+
import torch
1110

1211
from mobius._configs import Gemma4Config
1312
from mobius.models.gemma4 import Gemma4CausalLMModel, Gemma4Model
@@ -132,8 +131,6 @@ def test_vnorm_fp16_no_nan(self):
132131
"""
133132
import numpy as np
134133

135-
from onnxscript import GraphBuilder
136-
137134
from mobius._testing.ort_inference import OnnxModelSession
138135
from mobius.models.gemma4 import _Gemma4ScaleFreeRMSNorm
139136

0 commit comments

Comments
 (0)