Skip to content

Commit e0d61fb

Browse files
author
Michael Gschwind
committed
typo
1 parent bd0011e commit e0d61fb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

model.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ def __post_init__(self):
4343
# then calculate implicitly based on dim and
4444
# also multiple of `args.multiple_of`
4545
multiple_of = self.multiple_of
46-
hidden_dim = 4 * dim
46+
hidden_dim = 4 * self.dim
4747
hidden_dim = int(2 * hidden_dim / 3)
4848
if self.ffn_dim_multiplier is not None:
4949
hidden_dim = int(self.ffn_dim_multiplier * hidden_dim)
50-
args.hidden_dim = multiple_of * ((hidden_dim + multiple_of - 1) // multiple_of)
50+
self.hidden_dim = multiple_of * ((hidden_dim + multiple_of - 1) // multiple_of)
5151
self.head_dim = self.dim // self.n_heads
5252

5353
@classmethod
54-
def from_params(cls, params_path: str):
54+
def from_params(cls, params_path):
5555
with open(params_path, "r") as f:
5656
params = json.loads(f.read())
5757
return cls(**params)

0 commit comments

Comments
 (0)