-
Notifications
You must be signed in to change notification settings - Fork 79
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
feat(transformers): add GEMMA2 #821
base: master
Are you sure you want to change the base?
Conversation
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 | ||
# This file was automatically generated from src/transformers/models/gemma2/modular_gemma2.py. | ||
# Do NOT edit this file manually as any edits will be overwritten by the generation of | ||
# the file from the modular. If any change should be done, please apply the change to the | ||
# modular_gemma2.py file directly. One of our CI enforces this. |
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.
may remove this comment?
|
||
if past_key_value is not None: | ||
raise NotImplementedError( | ||
"Gemma2 is only used as diffusers text-encoder and will not be called sequently, it need no cache." |
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.
need -> needs
position_ids: Optional[ms.Tensor] = None, | ||
past_key_value: Optional[Cache] = None, | ||
output_attentions: bool = False, | ||
use_cache: bool = False, |
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.
May add docstring to claim use_cache is not supported
参考检视意见,已:
|
What does this PR do?
-Gemma2 report-
Add Gemma2 to MindONE transformers, for MindONE diffusers text-encoder
Before submitting
What's New
. Here are thedocumentation guidelines
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
@xxx