[Bugfix][Model] Fix Qwen2 (#3554)

This commit is contained in:
Roy 2024-03-22 08:18:58 +08:00 committed by GitHub
parent b7050ca7df
commit ea5f14e6ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -20,6 +20,7 @@ MODELS = [
"stabilityai/stablelm-3b-4e1t",
"allenai/OLMo-1B",
"bigcode/starcoder2-3b",
"Qwen/Qwen1.5-0.5B",
]

View File

@ -349,7 +349,7 @@ class Qwen2ForCausalLM(nn.Module):
("gate_up_proj", "gate_proj", 0),
("gate_up_proj", "up_proj", 1),
]
params_dict = dict(self.named_parameters())
params_dict = dict(self.named_parameters(remove_duplicate=False))
for name, loaded_weight in hf_model_weights_iterator(
model_name_or_path, cache_dir, load_format, revision):
if "rotary_emb.inv_freq" in name: