Skip to content

fix(trtllm): [cherry-pick 1.5.0] stop a configured --context-length being silently discarded (#14450) - #14683

Merged
pvijayakrish merged 1 commit into
release/1.5.0from
yunzhoul/cherrypick-150-14450
Sep 11, 2026
Merged

fix(trtllm): [cherry-pick 1.5.0] stop a configured --context-length being silently discarded (#14450)#14683
pvijayakrish merged 1 commit into
release/1.5.0from
yunzhoul/cherrypick-150-14450

Conversation

@yunzhoul-nv

Copy link
Copy Markdown
Contributor

Cherry-pick of #14450 to release/1.5.0.

This backport makes an explicit TensorRT-LLM --context-length take precedence over the engine's reported value, avoiding an under-reported context window and incorrect default max_tokens. It also aligns the aggregate launch script's engine and sidecar context-length configuration.

Signed-off cherry-pick with -x --signoff.

Validation:

  • Applied cleanly with no conflicts.
  • Remote Git tree matches the locally verified cherry-pick tree (9e90791a0072bf14bf54f19fa80c3b61e1fd508e).
  • git diff --check release/1.5.0...HEAD passed.
  • The source PR's cargo fmt, cargo check, cargo clippy, and cargo test -p dynamo-trtllm-sidecar validations were not rerun because cargo is unavailable in this environment.
  • Focused pre-commit checks were not run because pre-commit is unavailable in this environment.

…ded (#14450)

Signed-off-by: svc-glamr@nvidia.com <svc-glamr@nvidia.com>
Signed-off-by: tanmayv25 <tanmay2592@gmail.com>
Co-authored-by: tanmayv25 <tanmay2592@gmail.com>
Co-authored-by: Tanmay Verma <tanmayv@nvidia.com>
(cherry picked from commit 38bb25d)
Signed-off-by: Yunzhou (David) Liu <232973175+yunzhoul-nv@users.noreply.github.com>
@yunzhoul-nv
yunzhoul-nv requested a review from a team as a code owner September 11, 2026 01:32
@copy-pr-bot

copy-pr-bot Bot commented Sep 11, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

let max_input_len = u32::try_from(info.max_input_len)
.ok()
.filter(|len| *len > 0);
if max_seq_len.is_some() && max_seq_len == max_input_len {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

An equal positive max_seq_len/max_input_len pair is not unique to the fallback case. In particular, an engine explicitly started with --max_seq_len 1024 has the documented default max_input_len of 1024, so this discards the real configured context length. With no separate --context-length, registration loses the context window and requests omitting max_tokens are rejected.

🤖 AI Fix

Only discard a reported value when TensorRT-LLM exposes an unambiguous indication that max_seq_len was omitted; otherwise preserve positive max_seq_len, including equal pairs.

@pvijayakrish
pvijayakrish merged commit 3198b06 into release/1.5.0 Sep 11, 2026
29 of 30 checks passed
@pvijayakrish
pvijayakrish deleted the yunzhoul/cherrypick-150-14450 branch September 11, 2026 22:51
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