Fix tests: 'Cohere2MoeModel' object has no attribute 'hf_device_map'#46337
Open
kaixuanliu wants to merge 2 commits into
Open
Fix tests: 'Cohere2MoeModel' object has no attribute 'hf_device_map'#46337kaixuanliu wants to merge 2 commits into
kaixuanliu wants to merge 2 commits into
Conversation
Signed-off-by: kaixuanliu <kaixuan.liu@intel.com>
vasqu
reviewed
Jun 2, 2026
Signed-off-by: kaixuanliu <kaixuan.liu@intel.com>
Contributor
|
[For maintainers] Suggested jobs to run (before merge) run-slow: cohere2_moe |
Contributor
Author
|
@vasqu Can you help review it again? Thx! |
vasqu
reviewed
Jun 5, 2026
| self.logit_scale = 1.0 # needed for `test_training_overfit` - otherwise the loss does not go down fast enough | ||
| # Reduce number of experts so the sparse MoE layer is a smaller fraction of the overall model, | ||
| # allowing accelerate to split it across devices in offload/parallelism tests. | ||
| self.num_experts = 4 |
Contributor
There was a problem hiding this comment.
Hmm, I thought maybe this was a one time thing. Would it maybe make more sense to adjust the causal lm tester in general on init? Could you cross check a bit?
But in general aligned with this
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
skip 4 invalid test cases:
@ydshieh , pls help review, thx!