]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
convert.py : fix llama/llama2 conversion due to vocab_size=-1 (#4258)
authorslaren <redacted>
Thu, 30 Nov 2023 21:42:23 +0000 (22:42 +0100)
committerGitHub <redacted>
Thu, 30 Nov 2023 21:42:23 +0000 (23:42 +0200)
convert.py

index 3ad836ce0ec1dfbf5aa9e6c35193ff38fceda93f..6e95d6cb37e7958a8801dedf427e75734cd2cd85 100755 (executable)
@@ -267,7 +267,7 @@ class Params:
             n_ctx = 2048
 
         return Params(
-            n_vocab          = config.get("vocab_size", model["tok_embeddings.weight"].shape[0]),
+            n_vocab          = model["tok_embeddings.weight"].shape[0],
             n_embd           = config["dim"],
             n_layer          = config["n_layers"],
             n_ctx            = n_ctx,