Unverified Commit 3a8c2381 authored by Jun Gao's avatar Jun Gao Committed by GitHub
Browse files

Fix for KeyError on Loading LLaMA (#1978)

parent c85b80c2
......@@ -322,6 +322,10 @@ class LlamaForCausalLM(nn.Module):
model_name_or_path, cache_dir, load_format, revision):
if "rotary_emb.inv_freq" in name:
continue
if "rotary_emb.cos_cached" in name:
continue
if "rotary_emb.sin_cached" in name:
continue
for (param_name, weight_name, shard_id) in stacked_params_mapping:
if weight_name not in name:
continue
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment