-
Notifications
You must be signed in to change notification settings - Fork 524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Mixtral-related issues #570
Conversation
Co-authored-by: Max Ryabinin <mryabinin0@gmail.com>
tests/test_full_model.py
Outdated
@@ -141,6 +141,10 @@ def test_sampling(tokenizer, model, ref_model, max_new_tokens=10): | |||
), f"Sampling is not identical to HF with {options=}, {multiple_calls=}, {inputs.shape=}" | |||
|
|||
|
|||
@pytest.mark.skipif( | |||
MODEL_NAME.lower().find("bloom") == -1, | |||
reason="Mixtral and Llama uses DynamicCache, which can change based on beam search choices", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reason="Mixtral and Llama uses DynamicCache, which can change based on beam search choices", | |
reason="Mixtral and Llama use DynamicCache, which can change based on beam search choices", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
tests/test_full_model.py
Outdated
@@ -141,6 +141,10 @@ def test_sampling(tokenizer, model, ref_model, max_new_tokens=10): | |||
), f"Sampling is not identical to HF with {options=}, {multiple_calls=}, {inputs.shape=}" | |||
|
|||
|
|||
@pytest.mark.skipif( | |||
MODEL_NAME.lower().find("bloom") == -1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MODEL_NAME.lower().find("bloom") == -1, | |
"bloom" not in MODEL_NAME.lower(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
This PR fixes problems related to #569:
BS is removed for Mixtral and Llama for now. Those models use DynamicCache, which requires special function to change: (see https://github.com/huggingface/transformers/blob/main/src/transformers/cache_utils.py#L161)