Skip to content

Conversation

nico-martin
Copy link
Collaborator

added a check that sets generation_config.do_sample to false if temperature=0
Screenshot 2025-10-03 at 12 38 04

@nico-martin nico-martin requested a review from xenova October 3, 2025 10:44
@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

@xenova xenova left a comment

Choose a reason for hiding this comment

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

Thanks! This is the correct place to place the changes and now temperature: 0 will work correctly, even if do_sample: true is set by the user or default in the generation config.

Thanks!

just some wording choices in the warn message, but otherwise good to go.

Copy link
Collaborator

Choose a reason for hiding this comment

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

we can remove this file -- all examples will be moved to https://github.com/huggingface/transformers.js-examples in transformers.js v4, so this folder will be deleted

@xenova xenova linked an issue Oct 3, 2025 that may be closed by this pull request
5 tasks
nico-martin and others added 2 commits October 3, 2025 17:42
Co-authored-by: Joshua Lochner <admin@xenova.com>
Copy link
Collaborator

@xenova xenova left a comment

Choose a reason for hiding this comment

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

LGTM ✅

@xenova xenova merged commit 1538e3a into huggingface:main Oct 3, 2025
4 checks passed
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.

text-generation task fails with temperature: 0
3 participants