Remove unnecessary load_weights methods (#44589)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Harry Mellor
2026-06-29 01:52:23 -07:00
committed by GitHub
parent db28ae2d07
commit 5051698e41
54 changed files with 821 additions and 1975 deletions
+2 -4
View File
@@ -79,10 +79,8 @@ class Fairseq2LlamaForCausalLM(LlamaForCausalLM):
skip_prefixes=(["lm_head."] if self.config.tie_word_embeddings else None),
)
return loader.load_weights(
(
self.reshape_fairseq2_weights(name, loaded_weight, params)
for name, loaded_weight in weights
)
self.reshape_fairseq2_weights(name, loaded_weight, params)
for name, loaded_weight in weights
)
def flag_sharded_weights(self, params: dict[str, Parameter]):