Skip to content

set default temperature to 0 in generation config#814

Merged
clefourrier merged 3 commits intomainfrom
nathan-forces-temperature-vllm
Jun 20, 2025
Merged

set default temperature to 0 in generation config#814
clefourrier merged 3 commits intomainfrom
nathan-forces-temperature-vllm

Conversation

@NathanHB
Copy link
Copy Markdown
Member

No description provided.

@NathanHB NathanHB requested a review from Copilot June 17, 2025 13:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the GenerationParameters model to default temperature to 0 (greedy decoding) instead of None.

  • Changed temperature from NonNegativeFloat | None = None to NonNegativeFloat = 0
  • Removed support for None as a temperature value
  • Added inline comment clarifying default greedy decoding behavior
Comments suppressed due to low confidence (3)

src/lighteval/models/model_input.py:39

  • Changing the default for temperature from None to 0 is a breaking API change; consider documenting this in the CHANGELOG and bumping the version or adding a deprecation note for the old behavior.
    temperature: NonNegativeFloat = (

src/lighteval/models/model_input.py:39

  • Add or update unit tests to cover the new default temperature=0 behavior and verify that greedy decoding is triggered when no custom value is provided.
    temperature: NonNegativeFloat = (

src/lighteval/models/model_input.py:40

  • Update the class docstring or external documentation to reflect that temperature now defaults to 0 and that passing None is no longer supported.
        0  # vllm, transformers, tgi, litellm, sglang # if not set, defaults to greedy decoding

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown
Collaborator

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
Copy Markdown
Member

@clefourrier clefourrier left a comment

Choose a reason for hiding this comment

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

lgtm

@clefourrier clefourrier merged commit 327071f into main Jun 20, 2025
5 checks passed
NathanHB added a commit that referenced this pull request Sep 19, 2025
* set default temperature to 0 in generation config

* issue warning when temperature == 0 with multiple samples

* fix test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants