-
Notifications
You must be signed in to change notification settings - Fork 27.4k
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
[docs] update input documentation for MAMBA2 and MISTRAL models to include cache_position and attention_mask details #34322
[docs] update input documentation for MAMBA2 and MISTRAL models to include cache_position and attention_mask details #34322
Conversation
Also, in attention_mask
...
- If `past_key_values` is used, optionally only the last `decoder_input_ids` have to be input (see
+ If `past_key_values` is used, optionally only the last `input_ids` have to be input (see
`past_key_values`). as suggested by docs of past_key_values and the forward args past_key_values
...
If `past_key_values` are used, the user can optionally input only the last `input_ids` (those that don't
have their past key value states given to this model) of shape `(batch_size, 1)` instead of all `input_ids`
of shape `(batch_size, sequence_length)`. |
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 for the update :)
If you can rebase on main, that should fix the failing CI tests.
d9c7406
to
6434c89
Compare
…clude cache_position and attention_mask details
…put_ids` instead of `decoder_input_ids`
6434c89
to
e73d151
Compare
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. |
…clude cache_position and attention_mask details (huggingface#34322) * [docs] update input documentation for MAMBA2 and MISTRAL models to include cache_position and attention_mask details * [docs] correct input documentation for MISTRAL model to reference `input_ids` instead of `decoder_input_ids` * [docs] clarify cache_position description in MISTRAL model documentation
…clude cache_position and attention_mask details (huggingface#34322) * [docs] update input documentation for MAMBA2 and MISTRAL models to include cache_position and attention_mask details * [docs] correct input documentation for MISTRAL model to reference `input_ids` instead of `decoder_input_ids` * [docs] clarify cache_position description in MISTRAL model documentation
What does this PR do?
Mamba2 and Mistral models had Input docstrings not exactly matching with forwrd pass of their respective models.
This doesn't have a big impact.
But I'm trying to add modular models. Which I'm subclassing from Mistral. #33916
And documentation mismatch is somehow not overriding. Which seems to be a lacking in Mistral model.
Fixes # (issue)
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
@stevhliu
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.