Simplify weight loading logic (#2133)

This commit is contained in:
Roy
2023-12-16 12:41:23 -08:00
committed by GitHub
parent 2acd76f346
commit eed74a558f
3 changed files with 33 additions and 37 deletions
+5 -1
View File
@@ -412,7 +412,11 @@ class MixtralForCausalLM(nn.Module):
params_dict = dict(self.named_parameters())
for name, loaded_weight in hf_model_weights_iterator(
model_name_or_path, cache_dir, load_format, revision):
model_name_or_path,
cache_dir,
load_format,
revision,
fall_back_to_pt=False):
if "rotary_emb.inv_freq" in name:
continue
for (param_name, weight_name, shard_id) in stacked_params_mapping: