-
Notifications
You must be signed in to change notification settings - Fork 27.5k
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
Mamba & RecurrentGemma: enable strict signature #31549
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -545,7 +545,6 @@ def forward( | |
use_cache: Optional[bool] = None, | ||
output_hidden_states: Optional[bool] = None, | ||
return_dict: Optional[bool] = None, | ||
**kwargs, # `attention_mask` is passed by the tokenizer and we don't want it | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. alternatively, we can accept There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removing this will break FDSP :( See #31161 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @amyeroberts I had a look and it should be fine: this PR removes We can see on There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK! |
||
) -> Union[Tuple, MambaOutput]: | ||
output_hidden_states = ( | ||
output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states | ||
|
@@ -673,7 +672,6 @@ def forward( | |
output_hidden_states: Optional[bool] = None, | ||
return_dict: Optional[bool] = None, | ||
use_cache: Optional[bool] = None, | ||
**kwargs, # for now we need this for generation | ||
) -> Union[Tuple, MambaCausalLMOutput]: | ||
r""" | ||
labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*): | ||
|
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.
yesssss I think I have a PR open where I dod this! Finally!