[Model] Extend collect_children and no_init_weights contexts (#32757)
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
@@ -909,7 +909,12 @@ class WhisperForConditionalGeneration(
|
||||
self.config = config
|
||||
self.dtype = vllm_config.model_config.dtype
|
||||
|
||||
self.model = WhisperModel(vllm_config=vllm_config, prefix=prefix)
|
||||
with self._mark_composite_model(
|
||||
vllm_config,
|
||||
language_targets=WhisperDecoder,
|
||||
tower_targets={"audio": WhisperEncoder},
|
||||
):
|
||||
self.model = WhisperModel(vllm_config=vllm_config, prefix=prefix)
|
||||
|
||||
self.proj_out = ParallelLMHead(
|
||||
config.vocab_size,
|
||||
@@ -937,9 +942,6 @@ class WhisperForConditionalGeneration(
|
||||
)
|
||||
return decoder_outputs
|
||||
|
||||
def get_language_model(self) -> torch.nn.Module:
|
||||
return self.model.decoder
|
||||
|
||||
def embed_multimodal(self, **kwargs: object) -> MultiModalEmbeddings:
|
||||
# Required as part of SupportsMultiModal interface.
|
||||
audio_input = self._parse_and_validate_audio_input(**kwargs)
|
||||
|
||||
Reference in New Issue
Block a user