feat(vlm): add Nemotron 3.5 Super VL (nemotron_h_omni) support
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 12/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- rust
調査の方向性
Start with the model detection arm in src/models/detection.rs and the loader in src/loading/vlm_nemotron_h_nano_omni.rs, then the forward path in src/vision/nemotron_h_nano_omni_vl.rs. Scope spans model routing, weight sanitizing, a new final LayerNorm, resize and pos-embed numerics, and multi-image concatenation, so it needs a maintainer to split it first. Done means the listed unit tests pass and a real Super VL pack generates matching greedy output.
索引モデルが issue の本文から書いたものです。
説明
Summary
Load Nemotron 3.5 Super VL (model_type: nemotron_h_omni, NemotronH_Omni_Reasoning_V3) on the existing Nemotron Omni VLM path. The decoder is the Nemotron-H hybrid that mlxcel already runs (88 Mamba/attention/LatentMoE layers, 512 experts, top-22, moe_latent_size 1024) and the vision side is the same C-RADIO tower and mlp1 projector as Nemotron 3 Nano Omni. What is new is the model type, an optional vision final LayerNorm, two extra checkpoint keys, and three numerics fixes in the shared Omni image path. The bundled MTP head is a separate issue (linked below).
Upstream reference
Neywa-Labs/mlx-vlm#2528, commit 63fc9795:
- https://github.com/Neywa-Labs/mlx-vlm/blob/main/mlx_vlm/utils.py:
MODEL_REMAPPING["nemotron_h_omni"] = "nemotron_h_nano_omni"(andnemotron_h_puzzletonemotron_h, Bolt, out of scope here). - https://github.com/Neywa-Labs/mlx-vlm/blob/main/mlx_vlm/models/nemotron_h_nano_omni/nemotron_h_nano_omni.py:
vision_final_layernorm = LayerNorm(vit_hidden_size, eps=vision_config.layer_norm_eps), built whenconfig.vision_final_layernormis true or, when that key is absent, whentext_config.num_nextn_predict_layers > 0. Applied to the RADIO features beforepixel_shuffle(_project_vision_features).sanitizedropsvision_model.summary_idxsandvision_model.radio_model.summary_idxsand mapsvision_projector.vision_final_layernorm.*tovision_final_layernorm.*.extract_featurereshapes each image's projected features to(-1, hidden)before concatenating a list of images on axis 0.- Pixel values are cast to the projector weight dtype.
- https://github.com/Neywa-Labs/mlx-vlm/blob/main/mlx_vlm/models/nemotron_h_nano_omni/config.py:
VisionConfig.layer_norm_eps = 1e-6,ModelConfig.vision_final_layernorm: Optional[bool] = None. - https://github.com/Neywa-Labs/mlx-vlm/blob/main/mlx_vlm/models/nemotron_h_nano_omni/image_processing_nemotron_h_nano_omni.py: the per-tile resize is float antialiased bicubic on the unrounded float32 image (
resize_bicubic_nhwc(..., antialias=True)), replacing PIL bicubic, which rounds and clips to u8 before normalization. - https://github.com/Neywa-Labs/mlx-vlm/blob/main/mlx_vlm/models/nemotron_h_nano_omni/vision.py:
ViTPatchGeneratorcastspos_embedto float32 before the resample.
Checkpoint facts (Hub API, 2026-11-23)
nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4, 75.1 GB:llm_config.model_type nemotron_h,hidden_size 4096,num_nextn_predict_layers 1,time_step_limit [0.0, {"__float__": "Infinity"}],downsample_ratio 0.5,vit_hidden_size 1280,projector_hidden_size 20480,img_context_token_id 18,video_pruning_rate 0.7. Keysvision_projector.vision_final_layernorm.{weight,bias}andvision_model.summary_idxs. Quantizationquant_method: modelopt_mixed(NVFP4 experts plus FP8 dense), which mlxcel cannot load until #3201.Duckets/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-MLX-4bit, 69.4 GB:nemotron_h_omni, affine 4-bit gs 64, 392 vision tensors, top-levelvision_final_layernorm.*, nomtp.*.nativ-community/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4, 80.2 GB:nemotron_h_omni, MLXmode: nvfp4gs 16 withweight_scale_2global scales, top-levelvision_final_layernorm.*, and the 26-tensor MTP head underlanguage_model.mtp.*.rapid-mlx/...-MLX-4bitand-MLX-3bitare text-onlynemotron_hexports (no vision tensors); they belong to the text path, not this issue.
Current mlxcel behavior
src/models/detection.rs:1083maps onlynemotron_h_nano_omniandnemotronh_nano_omni_reasoning_v3toModelType::NemotronHNanoOmniVLM;nemotron_h_omnihas no arm.load_nemotron_h_nano_omni_vlm(src/loading/vlm_nemotron_h_nano_omni.rs:328) already readsllm_config(parse_text_config,:198), parses the tagged infinity (src/models/nemotron_h.rs:152-170), dropsmtp.*inNemotronHModel::sanitize_weights(nemotron_h.rs:2361), and loads LatentMoE (fc1_latent_proj,nemotron_h.rs:1313) and NVFP4weight_scale_2planes (src/models/switch_layers.rs:714). It renames onlymlp1.{0,1,3}(rename_projector_weights,:163) and has no handling forvision_final_layernorm,vision_projector.*orsummary_idxs.NemotronHNanoOmniVlModel::extract_image_features_single(src/vision/nemotron_h_nano_omni_vl.rs:196-220) goes RADIO -> reshape ->pixel_shuffle-> projector with no final LayerNorm.extract_image_features(:226-241) concatenates the per-image[1, n_i, H]results on axis 0, which only works when every image yields the same token count.src/vision/processors/nemotron_h_nano_omni.rs:145-150resizes withimage::imageops::FilterType::CatmullRomon u8 pixels.- The RADIO pos-embed resample (
src/vision/encoders/nemotron_h_nano_omni.rs:530-560) runs in the stored weight dtype and casts after (:609).
Required changes
src/models/detection.rs: addnemotron_h_omnito theNemotronHNanoOmniVLMarm; add it to the alias list atsrc/models/registry.rs:1229-1231.src/loading/vlm_nemotron_h_nano_omni.rs:- Drop
vision_model.summary_idxsandvision_model.radio_model.summary_idxs. - Rename
vision_projector.vision_final_layernorm.*tovision_final_layernorm.*. - Parse
vision_config.layer_norm_eps(default 1e-6) and the top-levelvision_final_layernorm(default:num_nextn_predict_layers > 0). When enabled and the tensors are missing, fail the load namingvision_final_layernorm.weight.
- Drop
src/vision/nemotron_h_nano_omni_vl.rs: holdvision_final_layernorm: Option<LayerNorm>and apply it to the RADIO features before the reshape inextract_image_features_single. Flatten each image's projected features to[n_i, H]before concatenating, then restore the leading batch axis the scatter expects. Nano Omni has no such tensors and stays unchanged.src/vision/processors/nemotron_h_nano_omni.rs: resize the float32 image with the antialiased bicubic matrix fromsrc/vision/encoders/resample_matrix.rs:104(interp_matrix, the one #2465 established), applied separably on the unrounded[0, 255]floats, then normalize. Do not write a second bicubic.src/vision/encoders/nemotron_h_nano_omni.rsget_pos_embeddings: castpos_embedto float32 before the resample and back to the activation dtype afterwards.docs/supported-models.md: Super VL row with its memory need (the 4-bit pack is 69 GB; fits a 128 GB machine for short contexts).
Items 4 and 5 change Nano Omni numerics as well; report both families in the trace (see Validation).
Scope
In scope: text and image requests for Super VL on the two MLX packs above, CLI and server.
Out of scope: the native ModelOpt NVFP4 pack (#3201); the MTP head (#3260, blocked by this one); Nemotron 3.5 Bolt and its Puzzle block_configs per-layer overrides (no MLX pack, 150 GB BF16, a follow-up issue); native video input and its efficient video sampling (compute_retention_mask, video_pruning_rate), since mlxcel's Omni VL module has no native video path (src/vision/nemotron_h_nano_omni_vl.rs has no video handling); a follow-up issue if wanted.
Acceptance criteria
-
src/models/detection_tests.rsnemotron_h_omni_routes_to_the_omni_vlm: a config withmodel_type: nemotron_h_omniandllm_config.model_type: nemotron_hresolves toNemotronHNanoOmniVLM. -
src/loading/vlm_nemotron_h_nano_omni.rstests (its inlinemod tests):vision_projector_final_layernorm_is_renamed_and_summary_idxs_dropped, andfinal_layernorm_defaults_on_when_mtp_layers_declared(absent key plusnum_nextn_predict_layers: 1enables it; absent plus 0 disables it; an explicitfalsewins). -
src/vision/nemotron_h_nano_omni_vl_tests.rs:two_images_with_different_token_counts_concatenatebuilds features for a 512x512 and a 512x1024 tile set and getsn_1 + n_2rows; expected to fail on current code (possibly as a shape error rather than a wrong count). -
src/vision/processors/nemotron_h_nano_omni_tests.rs:resize_is_float_antialiased_bicubicdownsamples a 64x64 ramp to 32x32 and equals theinterp_matrix(.., antialias = true)product within 1e-4, and differs from the CatmullRom u8 result by more than 0.5/255 somewhere. -
src/vision/encoders/nemotron_h_nano_omni_tests.rs:pos_embed_resample_runs_in_f32with a bf16 table equals the f32 resample cast to bf16. - Real checkpoint:
mlxcel generate -m models/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-MLX-4bit --image cat.jpg -p "Describe this image." -n 128 --temp 0describes the image, and a text-only prompt is coherent. Greedy output matchesmlx_vlm.generate --temperature 0on the same pack for the first 64 tokens, using the logit trace indocs/benchmarks.md. The nativ-community NVFP4 pack also loads and answers. - Served through
mlxcel-server/v1/chat/completionswith animage_urlpart;mlxcel archlistsnemotron_h_omni. Nano Omni (nativ-community/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-4bit) still answers, and its trace against mlx-vlm main improves or holds.
Validation
Hardware: the 4-bit pack is 69.4 GB and the NVFP4 pack 80.2 GB, so both fit a 128 GB machine for short contexts.
make verify-test
cargo test --profile test-fast nemotron_h_nano_omni
cargo clippy --workspace --all-targets -- -D warnings
cargo fmt --check
python3 scripts/ci/check_cross_repo_refs.py
./target/release/mlxcel download Duckets/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-MLX-4bit
./target/release/mlxcel generate -m models/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-MLX-4bit --image cat.jpg -p "Describe this image." -n 128 --temp 0
The resize and pos-embed changes move numbers on Nano Omni too; per docs/benchmarks.md#judging-a-change-that-moves-the-numbers, run the logit trace with the change reverted and report both arms for both families.
Related
#3201 (ModelOpt MIXED_PRECISION loading, needed for the native NVIDIA pack), #2465 (antialiased cubic coefficient), #2351 (weight_scale_2 sidecars). #3260 (the bundled MTP head, blocked by this issue).
- 主要言語
- Rust
- スター
- 505
- フォーク
- 81
- 平均マージ
- 14時間 2分
- マージ済み PR(30日)
- 448
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
lablup/mlxcel のほかの issue
-
area:core priority:high status:ready type:security
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
priority:medium status:ready type:security
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
-
area:models modeltype:text priority:medium status:in-progress type:bug
難易度 4/5 3〜5日 初心者へのやさしさ 57/100
メンテナーはふだん 1 日以内に返信
-
area:models priority:low status:ready type:test
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
メンテナーはふだん 1 日以内に返信
-
area:models modeltype:omni priority:medium status:ready type:bug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
psmux-resurrect: restoring a session with a numeric name puts its windows into the wrong session (`new-window -t 4` is read as window 4)対応中かも @ealwanlee が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
psmux/psmux-plugins#47 ·
-
Link Checker Reportオープンautomated issue report
難易度 1/5 1時間未満 初心者へのやさしさ 76/100
ratatui/awesome-ratatui#598 ·
メンテナーはふだん 1 日以内に返信
-
release
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
github/gh-aw-mcpg#17603 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
C-Bug S-Needs-Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
bevyengine/bevy#26718 ·
メンテナーはふだん 2 日以内に返信