[None][doc] Add Claude skill for multimodal model onboarding - #13842
Conversation
📝 WalkthroughWalkthroughThis PR introduces comprehensive onboarding documentation for integrating HuggingFace multimodal models (vision, audio, video + text) into the TensorRT-LLM PyTorch backend. The skill document details system architecture, design contracts, phased implementation steps, and pre-PR verification procedures. ChangesMultimodal Model Onboarding Guide
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In @.claude/skills/trtllm-model-onboard-multimodal/SKILL.md:
- Line 31: The fenced code block that begins with "[1] API event loop (async)
tensorrt_llm/serve/openai_server.py" is missing a language identifier, which
triggers markdownlint MD040; update the opening fence to include a language
(e.g., add "text" so it becomes ```text) to silence the linter and preserve
formatting for the block containing the lines like "logits → sampling
(PyExecutor) → tokens". Ensure only the fence line is changed and the block
content remains identical.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: d8c480c6-992d-4092-ab00-6425199a2ccb
📒 Files selected for processing (1)
.claude/skills/trtllm-model-onboard-multimodal/SKILL.md
Iterates on the trtllm-model-onboard-multimodal SKILL.md per reviewer feedback on PR NVIDIA#13842: - Tighten frontmatter description to a trigger-only summary; move implementation detail into the body. - "vision tower" -> "multimodal encoder(s)" throughout where the term is modality-agnostic (audio / video as well). - Trim system-map diagrams: drop file paths and private-method names that belong to debugging/perf rather than onboarding; restore the contributor-facing public APIs (find_input_mm_embeds, prepare_mrope_config, get_multimodal_embeddings cache hits, mrope CPU staging) and add explicit Key invariants. - Clarify "blocking" vs to_thread wording so it no longer contradicts the diagram's async/threaded staging. - Define what a shared-tensor "handle" actually is (small dict + IPC/shm key) instead of the jargon "handle-shaped". - Mark the get_text_with_mm_placeholders / expand_prompt_token_ids_for_mm fast path as optional pending the planned refactor. - Add Phase 4 host-memory guidance from PR NVIDIA#13283 (lazy encoder construction outside MetaInitMode + weights.mark_consumed for incremental mmap shard release). - Drop the duplicated compose-from rule under the dedicated Reuse section; expand the encoder-length / placeholder-count invariant with the chunked-prefill cache failure mode. - Expand "Be parsimonious" guidance for TestModelingMultimodal scenarios so CI runtime is bounded. - Add quickstart_multimodal.py as the first line of defense before trtllm-serve, plus the chunked-prefill log grep verification step. - Clarify AutoModelForCausalLM is TRT-LLM's, not transformers'. - Compute modules table: drop entries that are obvious or stale-prone, keep only non-obvious wiring (Linear TP/quant kwargs, Attention dual use for LLM/encoder, MLP/GatedMLP fused gate/up, mRoPE vs RotaryEmbedding split, MoE pointer to MOE_DEVELOPER_GUIDE.md). - "Port to TRT-LLM modules" is required (not preferred); spell out the two reasons (perf + transformers version coupling) and ban HF module/computation imports outright with one Qwen2-VL exception. - Add Contract 4: batch the multimodal encoder across requests in one forward (concat pixel_values + per-image seq_lens; nsys audit shows one wide block, not N narrow ones). - Replace Phase 2 model-wrapper template with the LlavaNext / Gemma3VL pattern (single class, super().__init__, text_config-based AutoModel.from_config, post_config, vocab_size_padded / infer_max_seq_len). Note Base/non-Base split (Qwen2VL/Qwen3VL) as a multi-variant implementation detail, not the default. Net change: +212/-160. File grows from 386 to 438 lines as new content (Contract 4, host-memory guidance, default Phase 2 template, quickstart verification, two-reason port argument) outweighs trims. Signed-off-by: yechank <161688079+yechank-nvidia@users.noreply.github.com>
Adds .claude/skills/trtllm-model-onboard-multimodal/SKILL.md, an agent skill guiding contributors through onboarding HuggingFace multimodal models to the TensorRT-LLM PyTorch backend (tensorrt_llm/_torch/models/). Covers the aggregated and EPD-disaggregated request lifecycles, module reuse rules, three performance contracts (sync-free forward, async server-side preprocessing, shared-tensor broadcast), an onboarding phase walk-through keyed off TestModelingMultimodal, and a pre-PR checklist. Signed-off-by: yechank <161688079+yechank-nvidia@users.noreply.github.com>
Iterates on the trtllm-model-onboard-multimodal SKILL.md per reviewer feedback on PR NVIDIA#13842: - Tighten frontmatter description to a trigger-only summary; move implementation detail into the body. - "vision tower" -> "multimodal encoder(s)" throughout where the term is modality-agnostic (audio / video as well). - Trim system-map diagrams: drop file paths and private-method names that belong to debugging/perf rather than onboarding; restore the contributor-facing public APIs (find_input_mm_embeds, prepare_mrope_config, get_multimodal_embeddings cache hits, mrope CPU staging) and add explicit Key invariants. - Clarify "blocking" vs to_thread wording so it no longer contradicts the diagram's async/threaded staging. - Define what a shared-tensor "handle" actually is (small dict + IPC/shm key) instead of the jargon "handle-shaped". - Mark the get_text_with_mm_placeholders / expand_prompt_token_ids_for_mm fast path as optional pending the planned refactor. - Add Phase 4 host-memory guidance from PR NVIDIA#13283 (lazy encoder construction outside MetaInitMode + weights.mark_consumed for incremental mmap shard release). - Drop the duplicated compose-from rule under the dedicated Reuse section; expand the encoder-length / placeholder-count invariant with the chunked-prefill cache failure mode. - Expand "Be parsimonious" guidance for TestModelingMultimodal scenarios so CI runtime is bounded. - Add quickstart_multimodal.py as the first line of defense before trtllm-serve, plus the chunked-prefill log grep verification step. - Clarify AutoModelForCausalLM is TRT-LLM's, not transformers'. - Compute modules table: drop entries that are obvious or stale-prone, keep only non-obvious wiring (Linear TP/quant kwargs, Attention dual use for LLM/encoder, MLP/GatedMLP fused gate/up, mRoPE vs RotaryEmbedding split, MoE pointer to MOE_DEVELOPER_GUIDE.md). - "Port to TRT-LLM modules" is required (not preferred); spell out the two reasons (perf + transformers version coupling) and ban HF module/computation imports outright with one Qwen2-VL exception. - Add Contract 4: batch the multimodal encoder across requests in one forward (concat pixel_values + per-image seq_lens; nsys audit shows one wide block, not N narrow ones). - Replace Phase 2 model-wrapper template with the LlavaNext / Gemma3VL pattern (single class, super().__init__, text_config-based AutoModel.from_config, post_config, vocab_size_padded / infer_max_seq_len). Note Base/non-Base split (Qwen2VL/Qwen3VL) as a multi-variant implementation detail, not the default. Net change: +212/-160. File grows from 386 to 438 lines as new content (Contract 4, host-memory guidance, default Phase 2 template, quickstart verification, two-reason port argument) outweighs trims. Signed-off-by: yechank <161688079+yechank-nvidia@users.noreply.github.com>
fcf479b to
6c1da15
Compare
Signed-off-by: Michal Guzek <mguzek@nvidia.com>
|
/bot skip --comment "Claude skill update for TRT-LLM multimodal" |
|
PR_Github #49543 [ skip ] triggered by Bot. Commit: |
|
PR_Github #49543 [ skip ] completed with state |
…13842) Signed-off-by: yechank <161688079+yechank-nvidia@users.noreply.github.com> Signed-off-by: Michal Guzek <mguzek@nvidia.com> Co-authored-by: Michal Guzek <mguzek@nvidia.com>
…13842) Signed-off-by: yechank <161688079+yechank-nvidia@users.noreply.github.com> Signed-off-by: Michal Guzek <mguzek@nvidia.com> Co-authored-by: Michal Guzek <mguzek@nvidia.com>
Adds .claude/skills/trtllm-model-onboard-multimodal/SKILL.md, an agent skill guiding contributors through onboarding HuggingFace multimodal models to the TensorRT-LLM PyTorch backend (tensorrt_llm/_torch/models/). Covers the aggregated and EPD-disaggregated request lifecycles, module reuse rules, three performance contracts (sync-free forward, async server-side preprocessing, shared-tensor broadcast), an onboarding phase walk-through keyed off TestModelingMultimodal, and a pre-PR checklist.
Summary by CodeRabbit