-
Notifications
You must be signed in to change notification settings - Fork 31.2k
Gemma3 hybrid fix #42287
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
base: main
Are you sure you want to change the base?
Gemma3 hybrid fix #42287
Conversation
|
run-slow: gemma3 |
|
This comment contains models: ["models/gemma3"] |
|
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. |
CI ResultsModel CI Report❌ Failed tests
|
|
run-slow: gemma3 |
|
💔 This comment contains |
|
run-slow: gemma3 |
|
This comment contains models: ["models/gemma3"] |
CI Results✅ No failing test specific to this PR 🎉 ! |
|
|
||
| # cache_implementation="hybrid" an in the original transformers implementation | ||
| output = model.generate(**inputs, max_new_tokens=30, do_sample=False, cache_implementation="hybrid") | ||
| output = model.generate(**inputs, max_new_tokens=30, do_sample=False, cache_implementation="static") | ||
| output_text = self.processor.batch_decode(output, skip_special_tokens=True) | ||
|
|
||
| EXPECTED_NUM_IMAGES = 3 # one for the origin image and two crops of images |
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.
we don't need to replace "hybrid" with "static" cache, if we're not testing compile no?
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.
Talked about this with @Cyrilvallez , the choice we made was to put "dynamic" everywhere unless it did not match the expected result, in which case we used "static"
|
[For maintainers] Suggested jobs to run (before merge) run-slow: gemma3 |
In
gemma3modeling tests, there are still mentions of the deprecated cache typehybridThis PR removes those mentions and adjust the expectations when needed.