Feature: nemotron_omni decode is bound by 2944 conditional expert subgraphs per token (about 50 ms/token for a 3B-active model)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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).
- 主要语言
- Python
- 星标
- 288
- 派生
- 73
- 平均合并
- 1 天 3 小时
- 30 天内合并 PR
- 273
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NVIDIA/TensorRT-Model-Connect 的其他 Issue
-
Docs: ITrtModule::forward() output-buffer lifetime and dtype contract are undocumented可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
NVIDIA/TensorRT-Model-Connect#1126 · 1 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
NVIDIA/TensorRT-Model-Connect#2054 ·
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 42/100
NVIDIA/TensorRT-Model-Connect#2053 ·
维护者通常 1 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 46/100
NVIDIA/TensorRT-Model-Connect#2050 ·
维护者通常 1 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 48/100
NVIDIA/TensorRT-Model-Connect#2049 ·
维护者通常 1 天内回复
查看 NVIDIA/TensorRT-Model-Connect 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
NVIDIA/auto-ontology#463 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 86/100
NousResearch/hermes-agent#151165 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
code-health
难度 2/5 1-3 小时 新手友好度 78/100
tinaudio/synth-setter#3750 ·
维护者通常 1 天内回复
-
[Bug] vllm-sr config migrate drops providers.models[].deployment可能已有人在做 @Bevisy 今天认领。 未关闭needs-acceptance wg/developer-experience-ecosystem
难度 2/5 1-3 小时 新手友好度 86/100
vllm-project/semantic-router#5996 ·
维护者通常 2 天内回复