Reduce AutoWeightsLoader kwargs (#53106)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Harry Mellor
2026-08-20 15:40:11 +00:00
committed by GitHub
parent 2dd17225c6
commit 1fe3a1571a
84 changed files with 577 additions and 568 deletions
+5 -4
View File
@@ -332,7 +332,10 @@ class FireRedASR2ForConditionalGeneration(
"net.0": "pre_layer_norm",
"net.1": "linear_expand",
"net.4": "linear_project",
}
},
orig_to_new_prefix={
"model.encoder.audio_encoder.positional_encoding.pe": None,
},
)
supports_transcription_only = True
@@ -477,8 +480,6 @@ class FireRedASR2ForConditionalGeneration(
return logits
def load_weights(self, weights: Iterable[tuple[str, torch.Tensor]]) -> set[str]:
loader = AutoWeightsLoader(
self, skip_prefixes=["model.encoder.audio_encoder.positional_encoding.pe"]
)
loader = AutoWeightsLoader(self)
return loader.load_weights(weights, mapper=self.hf_to_vllm_mapper)