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

Docs: update example with assisted generation + sample #30853

Merged
merged 1 commit into from
May 16, 2024

Conversation

gante
Copy link
Member

@gante gante commented May 16, 2024

What does this PR do?

Fixes example failing doctest, caused by #30778.

The seed is set at the beginning of the example. Before, the assistant model was doing sampling, so it “consumed” the random state set by the seed. Now, the assistant is not doing sampling, so it doesn’t consume the random state. When the main model produces its samples, it sees a different random state!

@gante gante requested a review from ydshieh May 16, 2024 11:07
@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.

Copy link
Collaborator

@ydshieh ydshieh left a comment

Choose a reason for hiding this comment

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

❤️

@gante gante merged commit f4014e7 into huggingface:main May 16, 2024
8 checks passed
@gante gante deleted the assisted_random_state branch May 16, 2024 13:32
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.

None yet

3 participants