Skip to content

Commit 5bb9bf4

Browse files
committed
convert: remove the now unused find_n_mult
1 parent ecd7bed commit 5bb9bf4

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

convert.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -160,15 +160,6 @@ class Params:
160160
# path to the directory containing the model files
161161
path_model: Path | None = None
162162

163-
@staticmethod
164-
def find_n_mult(n_ff: int, n_embd: int) -> int:
165-
# hardcoded magic range
166-
for n_mult in range(8192, 1, -1):
167-
calc_ff = (((8*n_embd) // 3 + n_mult - 1) // n_mult)*n_mult
168-
if calc_ff == n_ff:
169-
return n_mult
170-
raise Exception(f"failed to find n_mult for (n_ff={n_ff}, n_embd={n_embd}).")
171-
172163
@staticmethod
173164
def guessed(model: LazyModel) -> Params:
174165
# try transformer naming first
@@ -253,7 +244,7 @@ def loadOriginalParamsJson(model: LazyModel, config_path: Path) -> Params:
253244
n_vocab = config["vocab_size"] if "vocab_size" in config else -1
254245
n_embd = config["dim"]
255246
n_layer = config["n_layers"]
256-
n_mult = config["multiple_of"]
247+
#n_mult = config["multiple_of"]
257248
n_ff = -1
258249
n_head = config["n_heads"]
259250
n_head_kv = config["n_kv_heads"] if "n_kv_heads" in config else n_head

0 commit comments

Comments
 (0)