[test] update test_past_key_values_format (#37614)

allow custom shapes
This commit is contained in:
Joao Gante
2025-04-22 11:07:34 +01:00
committed by GitHub
parent 1cd110c6cb
commit 362fa37da2
19 changed files with 134 additions and 166 deletions

View File

@@ -409,7 +409,7 @@ class MllamaForConditionalGenerationModelTest(ModelTesterMixin, GenerationTester
pass
@pytest.mark.generate
# overridden because mllama has special cache for self and cross attentions
# overridden because mllama is not an encoder-decoder model, but has encoder-decoder-like cache
def test_past_key_values_format(self):
# Test that the KV cache is formatted correctly. Exceptions need to explicitly overwrite this test. Having a
# standard KV cache format is important for a consistent API (and for advanced generation methods).