Skip to content

Fix a few typos in GenerationMixin's docstring#29277

Merged
gante merged 5 commits intohuggingface:mainfrom
sadra-barikbin:patch-5
Feb 27, 2024
Merged

Fix a few typos in GenerationMixin's docstring#29277
gante merged 5 commits intohuggingface:mainfrom
sadra-barikbin:patch-5

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
Contributor

@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
Contributor

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
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