Skip to content
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

Fix a few typos in GenerationMixin's docstring #29277

Merged
merged 5 commits into from
Feb 27, 2024

Conversation

sadra-barikbin
Copy link
Contributor

Hi there!

To fix a few typos in GenerationMixin's docstring.

@gante

@sadra-barikbin
Copy link
Contributor Author

Shouldn't we change the parameter shape in

sequences (`torch.LongTensor` of shape `(batch_size, sequence_length)`):

to (batch_size*num_return_sequences, sequence_length) to account for SampleOutput and its variants which have do_sample=True, num_return_sequences>1?

Copy link
Member

@gante gante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fixes 💛

@gante
Copy link
Member

gante commented Feb 26, 2024

Shouldn't we change the parameter shape in

sequences (`torch.LongTensor` of shape `(batch_size, sequence_length)`):

to (batch_size*num_return_sequences, sequence_length) to account for SampleOutput and its variants which have do_sample=True, num_return_sequences>1?

yes, absolutely!

@gante gante requested a review from ArthurZucker February 26, 2024 17:33
Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧼 good typo catches !

@HuggingFaceDocBuilderDev

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.

@gante gante merged commit 227cd54 into huggingface:main Feb 27, 2024
8 checks passed
itazap pushed a commit that referenced this pull request May 14, 2024
Co-authored-by: Joao Gante <joao@huggingface.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants