docs: Update LLM getting-started guide to PyTorch backend - #8896
Open
faradawn wants to merge 7 commits into
Open
docs: Update LLM getting-started guide to PyTorch backend#8896faradawn wants to merge 7 commits into
faradawn wants to merge 7 commits into
Conversation
Greptile SummaryThis PR replaces the deprecated Phi-3 TRT-LLM engine-build guide (~1,700 lines) with a concise (~185-line) getting-started guide for the modern LLM API / PyTorch backend, using
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Docker as Triton Container
participant HF as Hugging Face Hub
participant TRTLLM as TRT-LLM Repo v1.2.1
participant Triton as Triton Server
User->>Docker: docker run step 1
User->>Docker: check tensorrt_llm version
Docker-->>User: e.g. 1.2.1
User->>TRTLLM: git clone depth 1 branch v1.2.1 step 2
User->>TRTLLM: Edit model.yaml step 3
User->>Docker: python3 launch_triton_server.py step 4
Docker->>HF: Pull model weights
HF-->>Docker: Model weights
Docker->>Triton: Start with LLM API backend
Triton-->>User: HTTP 8000 gRPC 8001 Metrics 8002
User->>Triton: POST generate
Triton-->>User: Completion response
User->>Triton: POST generate_stream with decoupled True
Triton-->>User: Streamed tokens
Reviews (9): Last reviewed commit: "docs: Fix two broken commands found by v..." | Re-trigger Greptile |
faradawn
force-pushed
the
docs-llm-getting-started-pytorch
branch
2 times, most recently
from
July 22, 2026 21:02
f129ce7 to
5c46b3c
Compare
faradawn
force-pushed
the
docs-llm-getting-started-pytorch
branch
from
August 3, 2026 03:36
5c46b3c to
ae171ae
Compare
…4-Flash) Signed-off-by: Faradawn Yang <73060648+faradawn@users.noreply.github.com>
faradawn
force-pushed
the
docs-llm-getting-started-pytorch
branch
from
August 3, 2026 03:39
ae171ae to
b2c1cb2
Compare
Validated the guide end-to-end on an 8x B200 node. Testing found several steps that could not work as written; this commit fixes them. - Replace DeepSeek-V4-Flash with models that run on released containers. V4 needs TensorRT-LLM 1.3 (not GA); 26.03/26.07 ship 1.2.x, which do not register DeepseekV4ForCausalLM. Feature nvidia/DeepSeek-R1-0528-FP4-V2 (NVFP4 + FP8 KV, 385 GB) for 8x B200, Qwen3-8B for a single GPU. - Document the openai/tensorrt_llm version conflict in 26.03-26.07 that makes the backend fail to load (ImportError: PartReasoningText) and the `pip install -U openai` workaround. - Pin the TensorRT-LLM clone to the tag matching the container instead of cloning the default branch. - Replace the GenAI-Perf section. `--service-kind` no longer exists, and `--backend tensorrtllm` targets the legacy inflight_batcher_llm input schema, so it cannot drive the LLM API backend. Use benchmark_core_model.py --test-llmapi instead. - Explain that streaming needs model_transaction_policy in config.pbtxt; triton_config.decoupled in model.yaml is ignored because the launch script passes --disable-auto-complete-config. - Note that `generate` is a raw completion endpoint and does not apply the chat template, with a worked DeepSeek-R1 example. - Update the container tag to 26.07 and refresh the sample server logs. Signed-off-by: Faradawn Yang <73060648+faradawn@users.noreply.github.com>
The guide featured Qwen3-8B and relegated DeepSeek-R1 NVFP4 to a later section. Lead with the NVFP4 model instead, since that is the configuration validated on 8x B200, and keep Qwen3-8B as the single-GPU alternative. - Intro and the step 3 model.yaml now use nvidia/DeepSeek-R1-0528-FP4-V2 with tensor_parallel_size / moe_expert_parallel_size of 8. - Move the NVFP4 note (format comes from hf_quant_config.json, Blackwell only) next to the config it applies to. - Replace the duplicated multi-GPU example with a sizing table carrying the measured numbers: ~6 min to ready, ~145 GiB per GPU, 81.83 GiB KV cache. - Label the benchmark sample output as Qwen3-8B on one GPU, and take the tokenizer argument from model.yaml rather than hardcoding it. Signed-off-by: Faradawn Yang <73060648+faradawn@users.noreply.github.com>
Cut the guide down to the DeepSeek-R1 NVFP4 path only. - Shorten the intro to name the example model. - Reduce the openai version conflict to a one-line hint. - Drop the tag-pinning rationale, the NVFP4 format explanation, the launch_triton_server.py background-process note, and the chat template cross-reference. - Remove the Qwen3-8B single-GPU config, the DeepSeek-V4 and GLM notes, and the separate multi-GPU section; fold its measured sizing into step 4. - Show the working chat-templated request directly instead of a plain prompt plus an explanation of why it misbehaves. - Replace the GenAI-Perf incompatibility note with just the command that works. Signed-off-by: Faradawn Yang <73060648+faradawn@users.noreply.github.com>
The guide pinned the container tag and the TensorRT-LLM clone tag separately, so updating one without the other silently mismatched the model repository against the installed library. Read the version from the running container and clone that tag, leaving RELEASE as the only version to edit. Signed-off-by: Faradawn Yang <73060648+faradawn@users.noreply.github.com>
Condense the streaming section to the config.pbtxt change itself and trim the batching note to the fact, without the projection about future throughput behaviour. Signed-off-by: Faradawn Yang <73060648+faradawn@users.noreply.github.com>
A subagent ran the guide verbatim on an 8x B200 node (only substituting srun/pyxis for docker run). Two commands failed as written. - The derived clone tag did not work. `import tensorrt_llm` prints its banner to stdout, so the command substitution captured two lines and git failed with "Remote branch v[TensorRT-LLM] TensorRT LLM version: 1.2.1 1.2.1 not found in upstream origin". Go back to printing the version and passing the tag explicitly, which is verified to work. - Streaming did not work. Editing only config.pbtxt leaves model.py's own guard reading triton_config.decoupled from model.yaml, so the request fails with "Streaming is only supported in decoupled mode." Setting decoupled: True in model.yaml is what actually enables it. Also correct three measurements against the verification run: load takes a few minutes rather than about six, memory is ~143 GiB of each GPU's 179 GiB, and the benchmark reports 38 prompts at 1694.09 ms. Signed-off-by: Faradawn Yang <73060648+faradawn@users.noreply.github.com>
Contributor
|
When do these changes take effect? If they already apply, then I can approve now. If Triton needs to update to a newer version of TRTLLM, then we should wait until then. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Deprecating the engine build in favor of pytorch / llmapi backend.
Triton Latest release: 26.07. TRTLLM container 1.2.1. Thus using DSR1 as example. DSV4 and GLM-5.2 are not supported in this TRTLLM yet.
Tested on B200x8.