Skip to content

[None][fix] Increase max top logprobs limit#16851

Open
yibinl-nvidia wants to merge 1 commit into
NVIDIA:mainfrom
yibinl-nvidia:dev-yibinl-max-top-logprobs-100
Open

[None][fix] Increase max top logprobs limit#16851
yibinl-nvidia wants to merge 1 commit into
NVIDIA:mainfrom
yibinl-nvidia:dev-yibinl-max-top-logprobs-100

Conversation

@yibinl-nvidia

@yibinl-nvidia yibinl-nvidia commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Dev Engineer Review

  • Increased MAX_TOP_LOGPROBS from 20 to 100 in tensorrt_llm/sampling_params.py.
  • The change consistently raises the default validation limit for logprobs and prompt_logprobs without altering other behavior.
  • No performance, configuration, error-handling, or compatibility concerns identified.

QA Engineer Review

No test changes.

Description

Test Coverage

PR Checklist

Please review the following before submitting your PR:

  • PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.

  • PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.

  • Test cases are provided for new code paths (see test instructions)

  • If PR introduces API changes, an appropriate PR label is added - either api-compatible or api-breaking. For api-breaking, include BREAKING in the PR title.

  • Any new dependencies have been scanned for license and vulnerabilities

  • CODEOWNERS updated if ownership changes

  • Documentation updated as needed

  • Update tava architecture diagram if there is a significant design change in PR.

  • The reviewers assigned automatically/manually are appropriate for the PR.

  • Please check this after reviewing the above items as appropriate for this PR.

GitHub Bot Help

To see a list of available CI bot commands, please comment /bot help.

Signed-off-by: Yibin Li <109242046+yibinl-nvidia@users.noreply.github.com>
@yibinl-nvidia

Copy link
Copy Markdown
Collaborator Author

/bot run

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The default maximum allowed value for logprobs and prompt_logprobs validation increases from 20 to 100.

Changes

Logprob validation limit

Layer / File(s) Summary
Update logprob validation cap
tensorrt_llm/sampling_params.py
Increases MAX_TOP_LOGPROBS from 20 to 100, raising the default validation limit.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: asfiyab-nvidia

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is only the template and lacks the required issue, solution, and test coverage details. Fill in the Description and Test Coverage sections with the problem, the change made, and tests that cover the new limit.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title follows the required format and clearly states the main change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
tensorrt_llm/sampling_params.py (1)

28-28: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Add boundary tests for the new shared limit.

Add coverage confirming that logprobs and prompt_logprobs accept 100, reject 101, and preserve existing behavior for 0/None. This constant also controls downstream logprob storage sizing, so both validation paths should be covered.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tensorrt_llm/sampling_params.py` at line 28, Add boundary tests around
MAX_TOP_LOGPROBS covering both logprobs and prompt_logprobs: verify 100 is
accepted, 101 is rejected, and existing 0/None behavior remains unchanged.
Exercise both validation paths and confirm downstream logprob storage sizing
remains consistent with the shared limit.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@tensorrt_llm/sampling_params.py`:
- Line 28: Add boundary tests around MAX_TOP_LOGPROBS covering both logprobs and
prompt_logprobs: verify 100 is accepted, 101 is rejected, and existing 0/None
behavior remains unchanged. Exercise both validation paths and confirm
downstream logprob storage sizing remains consistent with the shared limit.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: cd3deba9-1b30-4183-8091-920617556a78

📥 Commits

Reviewing files that changed from the base of the PR and between 9d7ef31 and 78f9d89.

📒 Files selected for processing (1)
  • tensorrt_llm/sampling_params.py

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61647 [ run ] triggered by Bot. Commit: 78f9d89 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61647 [ run ] completed with state SUCCESS. Commit: 78f9d89
/LLM/main/L0_MergeRequest_PR pipeline #49853 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

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.

2 participants