From 5bb9bf47b7d28111b2768af081c3f6c5c9e87c97 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Sat, 9 Sep 2023 20:26:53 +0200 Subject: [PATCH] convert: remove the now unused find_n_mult --- convert.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/convert.py b/convert.py index 70d28be02..bc18bc0ae 100755 --- a/convert.py +++ b/convert.py @@ -160,15 +160,6 @@ class Params: # path to the directory containing the model files path_model: Path | None = None - @staticmethod - def find_n_mult(n_ff: int, n_embd: int) -> int: - # hardcoded magic range - for n_mult in range(8192, 1, -1): - calc_ff = (((8*n_embd) // 3 + n_mult - 1) // n_mult)*n_mult - if calc_ff == n_ff: - return n_mult - raise Exception(f"failed to find n_mult for (n_ff={n_ff}, n_embd={n_embd}).") - @staticmethod def guessed(model: LazyModel) -> Params: # try transformer naming first @@ -253,7 +244,7 @@ class Params: n_vocab = config["vocab_size"] if "vocab_size" in config else -1 n_embd = config["dim"] n_layer = config["n_layers"] - n_mult = config["multiple_of"] + #n_mult = config["multiple_of"] n_ff = -1 n_head = config["n_heads"] n_head_kv = config["n_kv_heads"] if "n_kv_heads" in config else n_head