Reduce AutoWeightsLoader kwargs (#53106)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user