Add model support for granite speech plus (#43519)
Signed-off-by: Zvi Kons[WSL] <zvi@il.ibm.com> Signed-off-by: Zvi Kons (BlueVela) <zvi@il.ibm.com> Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
06ee2d8433
commit
b21443e23c
@@ -614,8 +614,7 @@ class GraniteSpeechForConditionalGeneration(
|
||||
)
|
||||
|
||||
with self._mark_tower_model(vllm_config, "audio"):
|
||||
# Conformer encoder
|
||||
self.encoder = GraniteSpeechCTCEncoder(
|
||||
self.encoder = self._build_encoder(
|
||||
config=config.encoder_config,
|
||||
quant_config=quant_config,
|
||||
prefix=maybe_prefix(prefix, "encoder"),
|
||||
@@ -633,6 +632,18 @@ class GraniteSpeechForConditionalGeneration(
|
||||
self.language_model.make_empty_intermediate_tensors
|
||||
)
|
||||
|
||||
def _build_encoder(
|
||||
self,
|
||||
config: PretrainedConfig,
|
||||
quant_config: QuantizationConfig | None,
|
||||
prefix: str,
|
||||
) -> "GraniteSpeechCTCEncoder":
|
||||
return GraniteSpeechCTCEncoder(
|
||||
config=config,
|
||||
quant_config=quant_config,
|
||||
prefix=prefix,
|
||||
)
|
||||
|
||||
def _parse_and_validate_audio_input(
|
||||
self,
|
||||
**kwargs: object,
|
||||
|
||||
Reference in New Issue
Block a user