[Modeling] Fix encoder CPU offloading for whisper (#38994)

* fix cpu offloading for whisper

Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>

* unskip offloading tests

Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>

* revert small change

Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>

* remove tests

Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>

---------

Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
This commit is contained in:
Kyle Sayers
2025-06-26 11:56:33 -04:00
committed by GitHub
parent c63cfd6a83
commit 0a8081b03d
2 changed files with 2 additions and 18 deletions

View File

@@ -3356,22 +3356,6 @@ class WhisperEncoderModelTest(ModelTesterMixin, unittest.TestCase):
config_and_inputs = self.model_tester.prepare_config_and_inputs()
self.model_tester.create_and_check_model_forward(*config_and_inputs, use_weighted_layer_sum=True)
@unittest.skip(reason="Some undefined behavior encountered with tiny versions of this model. Skip for now.")
def test_cpu_offload(self):
pass
@unittest.skip(reason="Some undefined behavior encountered with tiny versions of this model. Skip for now.")
def test_disk_offload_bin(self):
pass
@unittest.skip(reason="Some undefined behavior encountered with tiny versions of this model. Skip for now.")
def test_disk_offload_safetensors(self):
pass
@unittest.skip(reason="Some undefined behavior encountered with tiny versions of this model. Skip for now.")
def test_model_parallelism(self):
pass
@unittest.skip(reason="Not applicable for an encoder-only acoustic model")
def test_inputs_embeds(self):
# input embeds is meaningless for an encoder-only acoustic model