Skip to content

[BugFix] fix greedy temperature in eagle#5423

Closed
bnbryan wants to merge 1 commit intovllm-project:mainfrom
bnbryan:fix-eagle-greedy-temperature
Closed

[BugFix] fix greedy temperature in eagle#5423
bnbryan wants to merge 1 commit intovllm-project:mainfrom
bnbryan:fix-eagle-greedy-temperature

Conversation

@bnbryan
Copy link
Copy Markdown

@bnbryan bnbryan commented Dec 27, 2025

What this PR does / why we need it?

Updated the GREEDY_TEMPERATURE value in rejection_sampler.py to 0.

Commit vllm-project/vllm@a676e66 changed greedy temperature from -1 to 0 in gpu_input_batch.py. So, previously setting this constant to -1 in rejection_sampler.py will compromised the correctness of the is_greedy flag, which will cause a crash if a batch contains a mix of sequences with temperature > 0 and temperature = 0.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

vLLM version: release/v0.13.0
vLLM main: vllm-project/vllm@be2a947

@github-actions
Copy link
Copy Markdown
Contributor

👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:‌‌

  • A PR should do only one thing, smaller PRs enable faster reviews.
  • Every PR should include unit tests and end-to-end tests ‌to ensure it works and is not broken by other future PRs.
  • Write the commit message by fulfilling the PR description to help reviewer and future developers understand.

If CI fails, you can run linting and testing checks locally according Contributing and Testing.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request addresses a critical bug in the rejection sampler for greedy decoding. By changing the GREEDY_TEMPERATURE constant from -1 to 0, it correctly identifies greedy sampling requests (where temperature is 0). This prevents a potential division-by-zero error during logit processing and ensures the is_greedy flag is set correctly, resolving a crash that occurred when mixing greedy and non-greedy requests in a batch. The change is correct and effectively fixes the described issue.

@github-actions
Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@jianzs
Copy link
Copy Markdown
Collaborator

jianzs commented Dec 28, 2025

The issue has already been resolved in #5417

@bnbryan bnbryan closed this Dec 31, 2025
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.

2 participants