From 344412e66e7ba6274dbdf4e41ce550942a17e5ef Mon Sep 17 00:00:00 2001 From: hiyouga Date: Thu, 18 Jan 2024 00:26:14 +0800 Subject: [PATCH] fix llamafy_internlm2 Former-commit-id: a309375d020dedc313f3b6921fb53d932f156e8b --- tests/llamafy_internlm2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/llamafy_internlm2.py b/tests/llamafy_internlm2.py index 8661b657..e48c6296 100644 --- a/tests/llamafy_internlm2.py +++ b/tests/llamafy_internlm2.py @@ -65,7 +65,7 @@ def save_weight( elif "w3" in key: llama2_state_dict[key.replace("feed_forward.w3", "mlp.up_proj")] = value else: - raise KeyError("Unable to process key {}".format(key)) + llama2_state_dict[key] = value weights_name = SAFE_WEIGHTS_NAME if save_safetensors else WEIGHTS_NAME shards, index = shard_checkpoint(llama2_state_dict, max_shard_size=shard_size, weights_name=weights_name)