Corrected the typo in 'ffn_dim_multiplier' in and added 'rope_theta' to the list unused. Without these, llama examples did not run.

This commit is contained in:
Burak Budanur 2023-12-14 14:02:11 +01:00
parent af2e2b40f9
commit f691e00e5a

View File

@ -315,7 +315,7 @@ def load_model(model_path):
config["hidden_dim"] = weights["layers.0.feed_forward.w1.weight"].shape[0]
if config.get("vocab_size", -1) < 0:
config["vocab_size"] = weights["output.weight"].shape[-1]
unused = ["multiple_of", "ffn_dim_multiplie"]
unused = ["multiple_of", "ffn_dim_multiplier", 'rope_theta']
for k in unused:
if k in config:
config.pop(k)