Skip to content

Conversation

zhenhuaw-me
Copy link
Member

@zhenhuaw-me zhenhuaw-me commented Aug 13, 2025

Summary by CodeRabbit

  • Documentation
    • Expanded troubleshooting: clarified max_batch_size and max_seq_len; added known CUDA OOM note on H200 with a workaround (set PYTORCH_CUDA_ALLOC_CONF=max_split_size_mb:8192) and link to PyTorch memory optimization.
    • Added optional accuracy evaluation guide using the lm-eval harness inside the TensorRT-LLM container, including FP8/FP4 GSM8K examples, tokenizer BOS token caveats, and sample results with expected outcomes for Blackwell environments.

@zhenhuaw-me zhenhuaw-me requested a review from a team as a code owner August 13, 2025 06:47
@zhenhuaw-me zhenhuaw-me requested review from QiJune and kaiyux August 13, 2025 06:47
Copy link
Contributor

coderabbitai bot commented Aug 13, 2025

📝 Walkthrough

Walkthrough

Updated the DeepSeek R1 deployment quick-start guide: refined troubleshooting tips with CUDA OOM guidance and env var, and added an optional lm-eval-based evaluation workflow with commands, tokenizer notes, and sample results for FP8/FP4 on GSM8K.

Changes

Cohort / File(s) Change Summary
Documentation: DeepSeek R1 Deployment Guide
docs/source/deployment-guide/quick-start-recipe-for-deepseek-r1-on-trtllm.md
Updated troubleshooting bullet to code-style params and added CUDA OOM note with PYTORCH_CUDA_ALLOC_CONF=max_split_size_mb:8192 and doc link; retained other tips; introduced lm-eval evaluation steps inside TRT-LLM container; added FP8/FP4 GSM8K commands, tokenizer BOS note, and sample result tables for Blackwell setups.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested labels

1.0_doc

Suggested reviewers

  • yuxianq
  • kevinch-nv
  • chenopis
  • QiJune
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

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

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@zhenhuaw-me zhenhuaw-me enabled auto-merge (squash) August 13, 2025 06:48
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🔭 Outside diff range comments (1)
docs/source/deployment-guide/quick-start-recipe-for-deepseek-r1-on-trtllm.md (1)

249-255: Use the correct pip package name and pin a version for reproducibility

The PyPI package is “lm-eval” (hyphen), not “lm_eval”. Pinning helps avoid accidental regressions.

-pip install lm_eval
+pip install 'lm-eval==0.4.5'
🧹 Nitpick comments (2)
docs/source/deployment-guide/quick-start-recipe-for-deepseek-r1-on-trtllm.md (2)

261-265: Optional: cap generation length to stabilize results across harness versions

Explicitly setting a max generation length avoids accidental defaults changing across lm-eval versions.

-lm_eval --model local-completions  --tasks gsm8k --batch_size 256 --gen_kwargs temperature=0.0,add_special_tokens=False --num_fewshot 5 --model_args model=${MODEL_PATH},base_url=http://localhost:8000/v1/completions,num_concurrent=32,max_retries=20,tokenized_requests=False --log_samples --output_path trtllm.fp8.gsm8k
+lm_eval --model local-completions --tasks gsm8k --batch_size 256 \
+  --gen_kwargs temperature=0.0,add_special_tokens=False,max_gen_toks=512 \
+  --num_fewshot 5 \
+  --model_args model=${MODEL_PATH},base_url=http://localhost:8000/v1/completions,num_concurrent=32,max_retries=20,tokenized_requests=False \
+  --log_samples --output_path trtllm.fp8.gsm8k

278-285: Mirror the lm-eval package-name/version fix in the FP4 section and consider a brief note on tuning concurrency

The FP4 command mirrors FP8; ensure the prior pip fix is applied and consider noting that very high concurrency may trigger rate-limits/timeouts depending on server scheduling and max_batch_size.

Optionally add:

-lm_eval --model local-completions  --tasks gsm8k --batch_size 256 --gen_kwargs temperature=0.0,add_special_tokens=False --num_fewshot 5 --model_args model=${MODEL_PATH},base_url=http://localhost:8000/v1/completions,num_concurrent=32,max_retries=20,tokenized_requests=False --log_samples --output_path trtllm.fp4.gsm8k
+lm_eval --model local-completions --tasks gsm8k --batch_size 256 \
+  --gen_kwargs temperature=0.0,add_special_tokens=False,max_gen_toks=512 \
+  --num_fewshot 5 \
+  --model_args model=${MODEL_PATH},base_url=http://localhost:8000/v1/completions,num_concurrent=32,max_retries=20,tokenized_requests=False \
+  --log_samples --output_path trtllm.fp4.gsm8k

If you notice 429s/timeouts, reduce num_concurrent (e.g., 16) to match your server’s effective max_batch_size and scheduling configuration.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2e0081b and f85cfcf.

📒 Files selected for processing (1)
  • docs/source/deployment-guide/quick-start-recipe-for-deepseek-r1-on-trtllm.md (1 hunks)
🔇 Additional comments (1)
docs/source/deployment-guide/quick-start-recipe-for-deepseek-r1-on-trtllm.md (1)

259-265: Verified local-completions args and add_special_tokens handling

  • The lm-evaluation-harness local-completions provider accepts base_url, model/pretrained, num_concurrent, tokenized_requests, max_retries, and other flags exactly as shown in your snippet.
  • The Triton-LLM /v1/completions OpenAI-compatible server exposes an add_special_tokens field (default True) and forwards it through tensorrt_llm/serve/openai_protocol.py and the preprocessing model, so setting add_special_tokens=False is honored.

No changes needed—the documentation snippet is accurate.

@zhenhuaw-me
Copy link
Member Author

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #15086 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #15086 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #11390 completed with status: 'SUCCESS'

@litaotju litaotju disabled auto-merge August 13, 2025 11:51
@litaotju litaotju merged commit 8416d7f into NVIDIA:main Aug 13, 2025
5 checks passed
zhenhuaw-me added a commit to zhenhuaw-me/TensorRT-LLM that referenced this pull request Aug 13, 2025
This is to address Kaiyu's offline suggestion to
NVIDIA#6853 .

Keep this separate from the original PR for clean.

Signed-off-by: Zhenhua Wang <[email protected]>
zhenhuaw-me added a commit to zhenhuaw-me/TensorRT-LLM that referenced this pull request Aug 14, 2025
This is to address Kaiyu's offline suggestion to
NVIDIA#6853 .

Keep this separate from the original PR for clean.

Signed-off-by: Zhenhua Wang <[email protected]>
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.

3 participants