-
Notifications
You must be signed in to change notification settings - Fork 31.5k
Fix qwen2_moe tests
#40494
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 qwen2_moe tests
#40494
Conversation
| out = model(input_ids).logits.float().cpu() | ||
| # Expected mean on dim = -1 | ||
| EXPECTED_MEAN = torch.tensor([[-4.2125, -3.6416, -4.9136, -4.3005, -4.9938, -3.4393, -3.5195, -4.1621]]) | ||
| EXPECTED_MEAN = torch.tensor([[-4.2106, -3.6411, -4.9111, -4.2840, -4.9950, -3.4438, -3.5262, -4.1624]]) |
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.
changed because now we use fp16 (previously fp32)
|
[For maintainers] Suggested jobs to run (before merge) run-slow: qwen2_moe |
| def test_speculative_generation(self): | ||
| EXPECTED_TEXT_COMPLETION = ( | ||
| "To be or not to be, that is the question.\nThe answer is to be, of course. But what does it" | ||
| "To be or not to be, that is the question. Whether 'tis nobler in the mind to suffer the sl" |
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.
the previous value never pass
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
zucchini-nlp
left a comment
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.
Thanks
| assistant_model = model | ||
| assistant_model.generation_config.num_assistant_tokens = 2 | ||
| assistant_model.generation_config.num_assistant_tokens_schedule = "constant" | ||
| generated_ids = model.generate(input_ids, max_new_tokens=4, temperature=0) |
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.
another test where assistant_model is not actually used 😄
What does this PR do?
The CI job of the tests in
Qwen2MoeIntegrationTestis killed from time to time due to the CPU memory limit (60 G), which is unclear to me why the usage may differ in different runs.This PR simply reuses the same model set once in the first test, except the
test_model_a2_7b_long_prompt_flash_attn, because it loads the model usingflash_attn.