Jamba - Skip 4d custom attention mask test #30826
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes failing test on main: https://app.circleci.com/pipelines/github/huggingface/transformers/92832/workflows/0cbde306-131c-479b-b938-bca2fb838a82/jobs/1215777
Applies the same fix as #30780
However, applying created another failing test:
test_assisted_decoding_matches_greedy_search_0_random
.This fails because the model now has
_supports_cache_class
unset, but passespast_key_values
asHybridMambaAttentionDynamicCache
, which triggers an exception here.Mamba doesn't have this issue, because it doesn't define any models in
all_generative_models
in its model tester, and so the generation tests "pass" but are in fact skipped.The tests are skipped now, but we should update either the interaction between the cache and generation to ensure this isn't necessary. I've opened a related issue here #30828
cc @gante