Feature: nemotron_omni decode is bound by 2944 conditional expert subgraphs per token (about 50 ms/token for a 3B-active model)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- machine-learning
Hướng nghiên cứu
Start with families/nemotron_omni/moe.py and inspect how each routed expert is built as an IIfConditional subgraph. Compare this with another family’s gathered MoE implementation, then investigate whether the selected experts’ weights can be run as a grouped or batched GEMM. Done means reducing per-token decode time and decoder plan and build size; the issue gives B200/B300 decode measurements for comparison.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Request type: Improvement to existing behavior
Problem and use case
families/nemotron_omni builds each MoE layer of the Nemotron-H language model as 128 IIfConditional expert subgraphs (moe.py, one per routed expert; top-6 run). With 23 MoE layers that is 2944 conditional expert subgraphs per decode step, and the decoder plan has about 25k to 64k layers.
On the official NVFP4 checkpoint (the manifests' nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-NVFP4), decode takes about 48 to 53 ms per token on B200 / B300 (about 20 tokens/s), for a model with about 3B active parameters (reading 3B parameters at about 8 TB/s would take well under 1 ms). Prefill is token by token through the same step, so it has the same cost per token.
The step time does not depend on the weight precision, which shows the step is bound by the conditional structure and kernel count, not by weight reads (decoder only, TensorRT 11.4, batch 1, ms per token at cache positions 100 / 2000):
| GPU | fp16 (from the BF16 checkpoint, built with the family decoder code) | FP8 (official FP8 checkpoint) | NVFP4 (as on main) |
|---|---|---|---|
| B200 | 47.7 / 47.8 | 48.3 / 48.4 | 49.7 / 49.8 |
| B300 | 48.9 / 48.8 | 48.9 / 48.7 | 49.7 / 49.6 |
Decoder build time is also large: 24 to 52 minutes on B200 / B300 and about 101 minutes on H100 for NVFP4.
Proposed outcome
Build the routed experts of each MoE layer without one conditional subgraph per expert, for example a gathered/batched expert formulation (gather the selected experts' weights and run them as one grouped or batched GEMM, as other families do with a gathered MoE), so the decode step time scales with the active weights and the plan and build time shrink.
Model and target details
nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-NVFP4 @ 16993199e436da4ba75ddc410855f87e0d996ee6 (the nemotron-omni-nvfp4-native manifest). Language model: 52 layers (23 Mamba2, 23 MoE with 128 routed experts top-6 plus 1 shared, 6 attention), hidden 2688. TensorRT 11.4; B200 / B300 (also seen on H100).
Alternatives considered
FP8 weights (official FP8 checkpoint) and fp16 weights give the same step time as NVFP4 (table above), so weight precision does not help while the MoE stays conditional.
Additional context
Found during an FP8 study of this family (not merged). Separate note for anyone building a Hugging Face reference for Nemotron-H: without mamba-ssm, the checkpoint's own PyTorch fallback in modeling_nemotron_h.py diverges after the first 128-token chunk (KL about 1e-8 on positions 0 to 127, 0.07 to 0.39 after); a plain sequential scan matches the fp16 engine (KL 0.0032).
- Ngôn ngữ chính
- Python
- Star
- 288
- Fork
- 73
- Merge trung bình
- 1 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 273
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của NVIDIA/TensorRT-Model-Connect
-
Docs: ITrtModule::forward() output-buffer lifetime and dtype contract are undocumentedCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
NVIDIA/TensorRT-Model-Connect#1126 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
NVIDIA/TensorRT-Model-Connect#2054 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 42/100
NVIDIA/TensorRT-Model-Connect#2053 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 46/100
NVIDIA/TensorRT-Model-Connect#2050 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
NVIDIA/TensorRT-Model-Connect#2049 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của NVIDIA/TensorRT-Model-Connect
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
NVIDIA/auto-ontology#463 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
NousResearch/hermes-agent#151165 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
code-health
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
tinaudio/synth-setter#3750 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] vllm-sr config migrate drops providers.models[].deploymentCó thể đã có người làm @Bevisy đã nhận hôm nay. Đang mởneeds-acceptance wg/developer-experience-ecosystem
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
vllm-project/semantic-router#5996 ·
Maintainer thường phản hồi trong vòng 2 ngày