Skip to content

feat(single-controller): support the TRT-LLM generation backend - #5100

Draft
shuyixiong wants to merge 3 commits into
mainfrom
shuyix/trtllm_single_controller
Draft

shuyixiong wants to merge 3 commits into
mainfrom
shuyix/trtllm_single_controller

Conversation

@shuyixiong

Copy link
Copy Markdown
Contributor

What does this PR do ?

Add a one line overview of what this PR aims to accomplish.

Issues

List issues that this PR closes (syntax):

Usage

  • You can potentially add a usage example below
# Add a code snippet demonstrating how to use this

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you run the unit tests and functional tests locally? Visit our Testing Guide for how to run tests
  • Did you add or update any necessary documentation? Visit our Document Development Guide for how to write, build and test the docs.

Additional Information

  • ...

nanz-nv and others added 2 commits November 5, 2026 19:42
Cherry-picked from #4566, keeping only the TRT-LLM + SingleController
part; the in-loss sequence-logprob filtering and offline-evaluation
parts of that commit are not included.

- setup: TRT-LLM cluster topology, generation build, max sequence
  length, and NeMo-Gym support (build generation, then start Gym).
- TrtllmGeneration.validate_settings rejects SC options TRT-LLM cannot
  honor before any resources are reserved.

(cherry picked from commit b3c187a)
Signed-off-by: shuyixiong <[email protected]>
…E1 recipe

Follow-up to the TRT-LLM + SingleController cherry-pick from #4566:
- Size TRT-LLM replicas with main's disaggregation schema
  (replica_width) instead of the older trtllm_cfg.disaggregation keys.
- Build TRT-LLM generation in parallel with the trainer; NeMo-Gym waits
  for the generation future and fails if any shard lacks a server URL.
- Type validate_settings against MasterConfig and resolve PD layout via
  resolve_disagg_layout.
- Add the grpo-qwen3-1.7b-2n4g-megatron-trtllm-disagg-swe1-single-controller
  recipe and test-suite driver (PD disagg + NeMo-Gym SWE1).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: shuyixiong <[email protected]>
@copy-pr-bot

copy-pr-bot Bot commented Nov 6, 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.

…WE1 SC recipe

Host ledger-authoritative token capture for SingleController TRT-LLM on
the PD disagg frontend, the one hop that sees both Gym's admitted request
and the finished response:
- inbound: resolve the admission's prefix (staged chain or inline),
  render the prompt with that exact prefix spliced in, and pin it as
  prompt_token_ids_b64 so the prefill engine uses it verbatim;
- outbound: verify the engine prompt, stage the call's delta to
  TransferQueue, and answer with ng_commit_coords instead of the token
  arrays; context-length refusals and engine errors poison the call.
The frontends speak the vLLM-worker capture wire, so Gym needs no change
(nemo_gym maps trtllm to vllm_worker). Gym's capture modules are made
importable from the TRT-LLM venv by appending the in-tree checkout.

TrtllmGeneration.validate_settings now requires PD + frontend_tokenize for
token capture and rejects top_logprobs and router replay with it.

The SWE1 SC recipe enables token capture and the ready_first sampler
(force_on_policy_ratio=false; tool-call/thinking advantages off, which
the capture finalizer does not support yet).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: shuyixiong <[email protected]>

This branch has not been deployed

No deployments
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