-
Notifications
You must be signed in to change notification settings - Fork 820
Add missing sliding window param into ModelArgs #16687
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
Add missing sliding window param into ModelArgs #16687
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/16687
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 6018b6b with merge base fed6ff1 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
|
Follow‑up to: #16684 — thanks to @mergennachin for adding the missing files for Gemma2. @cccclai @mergennachin hi, while validating the Gemma2 config, I noticed that the recently introduced In addition, since Transformers was upgraded to 5.0, it has changed how configs are loaded, which also makes maintenance more challenging. I think it was also a good moment to move all local attention related parameters into |
| "layer_types": ["local", "global", "local", "global", "local", "global", "local", "global", "local", "global", "local", "global", "local", "global", "local", "global", "local", "global", "local", "global", "local", "global", "local", "global", "local", "global"], | ||
| "rope_local_base_freq": 10000.0 | ||
| "layer_types": ["sliding_attention", "full_attention", "sliding_attention", "full_attention", "sliding_attention", "full_attention", "sliding_attention", "full_attention", "sliding_attention", "full_attention", "sliding_attention", "full_attention", "sliding_attention", "full_attention", "sliding_attention", "full_attention", "sliding_attention", "full_attention", "sliding_attention", "full_attention", "sliding_attention", "full_attention", "sliding_attention", "full_attention", "sliding_attention", "full_attention"] |
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.
@cccclai @mergennachin
Regarding the layer_types added in #16684, I noticed that the current config uses:
"layer_types": ["local", "global", "local", "global", ...]In this PR, I switched the names to:
"layer_types": ["sliding_attention", "full_attention", ...]This change was only to preserve HuggingFace’s original naming, there is no other intention behind it.
we completely open to reverting back to "local" / "global" if that is the preferred naming style on your side.
Please let me know which naming you prefer, and I'm happy to keep it accordingly.
mergennachin
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.
See inline
17c8298 to
e2b7c0f
Compare
|
This is past the 1.1 branch cut, does it need to be cherry-picked? If so, please look at cherry-pick instructions at #16365 |
|
@pytorchbot cherry-pick --onto release/1.1 -c critical |
Thanks for the cherry-pick instructions! |
|
You need to land this first and then cherry-pick |
|
can you rebase then we can land? |
…on related parameters into ModelArgs
e2b7c0f to
6018b6b
Compare
|
We won't cherry-pick to 1.1 fyi since this is too late at this point... |
|
@cccclai, @mergennachin |
Summary
Fix follow-up to: #16684
sliding_windowandlocal_rope_thetaparameters toModelArgsso Gemma2 configs load correctly in static llama flow.ModelArgsfor consistency.Test plan