Skip to content

feat(vlm): add Nemotron 3.5 Super VL (nemotron_h_omni) support - #3681

Merged
inureyes merged 2 commits into
mainfrom
feature/issue-3258-nemotron-super-vl
Dec 2, 2026
Merged

inureyes merged 2 commits into
mainfrom
feature/issue-3258-nemotron-super-vl

Conversation

@inureyes

@inureyes inureyes commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Summary

Loads 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 mlxcel already runs; the vision side is the same C-RADIOv2.5-H tower and mlp1 projector as Nemotron 3 Nano Omni, plus an optional vision final LayerNorm and numerics fixes in the shared Omni image path.

Closes #3258

Changes

  • Detection and registry: route nemotron_h_omni to NemotronHNanoOmniVLM and add it to the architecture registry aliases, so mlxcel arch --json lists it.
  • Loader: drop vision_model.summary_idxs and vision_model.radio_model.summary_idxs, rename vision_projector.vision_final_layernorm.* to vision_final_layernorm.*, parse vision_config.layer_norm_eps (default 1e-6) and the top-level vision_final_layernorm (default num_nextn_predict_layers > 0), and fail the load naming vision_final_layernorm.weight when the config enables the layer but the tensor is absent. A null sound_config is treated as absent, because the Super VL config keeps the key with a null value.
  • VLM wrapper: optional vision_final_layernorm: Option<LayerNorm> applied to the RADIO features before the pixel-shuffle reshape. Each image's projected features are flattened to [n_i, H] before concatenation, so mixed token counts stack, and the leading batch axis is restored for the scatter.
  • Processor: resize the unrounded float32 [0, 255] image with the shared antialiased bicubic interp_matrix, applied separably, before normalization, instead of the u8 CatmullRom path.
  • Vision tower: cast pos_embed to float32 before the resample and back to the activation dtype.
  • Docs: add the Super VL row, including the 69 GB 4-bit footprint.

The resize and pos-embed changes also move Nano Omni numerics, so both families are traced below.

Validation

Unit tests

cargo test --profile test-fast --features metal,accelerate --lib <filter> -- --test-threads=1: 50 passed in the Nemotron filter and 1 passed in the detection filter. New tests: nemotron_h_omni_routes_to_the_omni_vlm, vision_projector_final_layernorm_is_renamed_and_summary_idxs_dropped, final_layernorm_defaults_on_when_mtp_layers_declared, missing_final_layernorm_weight_names_the_tensor, two_images_with_different_token_counts_concatenate, resize_is_float_antialiased_bicubic, pos_embed_resample_runs_in_f32.

Static CI checks

check_env_var_docs.py, check_cross_repo_refs.py, check_kernel_dtype_keys.py, check_crate_versions.py, check_technical_report_layout.py, and cargo fmt --check all pass.

Real checkpoints (128 GB M1 Ultra)

  • Duckets/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-MLX-4bit (69 GB): loads in 24.5 s at 63.43 GB resident, 8 of 88 layers on the fp16 KV path. Text: -p "The capital of France is" -n 64 --temp 0 --show-reasoning answers The capital of France is **Paris**. (42 tokens, 24.17 tok/s). Image: --image tests/fixtures/test_image_shapes.png -p "Describe this image." -n 256 --temp 0 --show-reasoning describes the image's colored shapes and gradient (256 tokens, 32.29 tok/s); the prompt carries 256 image tokens, matching the processor's num_tokens.
  • nativ-community/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-4bit: loads in 3.8 s at 16.64 GB resident and still describes the same image (256 tokens, 77.74 tok/s).
  • mlxcel-server /v1/chat/completions with an image_url data URI returns HTTP 200, prompt_tokens: 277 (256 image tokens), and an image description in reasoning_content (the 128-token budget was spent on the reasoning channel).
  • mlxcel arch --json contains nemotron_h_omni.
  • The nativ-community/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4 pack was not re-run for this change; it shares the loader layout.

Numerics: changed vs reverted arm, both families

Teacher-forced image trace (examples/logit_trace with MLXCEL_TRACE_IMAGE=tests/fixtures/test_image_shapes.png, 61 positions, --decided 2). The reverted arm restores the u8 CatmullRom resize and the stored-dtype pos-embed resample, nothing else.

Family top-1 decided positions max gap at a disagreement perplexity (reverted -> changed)
Nemotron 3.5 Super VL 4-bit 2 / 61 0 / 18 0.500 18.4097 -> 18.1235 (-1.554%)
Nemotron 3 Nano Omni 4-bit 2 / 61 0 / 17 0.250 28.1970 -> 28.0835 (-0.403%)

Both arms move exactly the positions where the reference was undecided (gap < 0.5), which is the rounding class rather than a behaviour change; the decided-position disagreement is zero for both families. The input reaches the changed branches: the 448x448 fixture is upsampled to a 512x512/32x32 grid, and the stored RADIO grid is 128x128, so both the new resize and the f32 pos-embed resample run.

Lints

The cargo-clippy CI job passes on this PR. A local run under clippy 0.1.97 (rustc 1.97.1) reports two warnings in files this change does not touch, both byte-identical to origin/main: src/vision/dense/preprocess.rs:329 (excessive_precision on the ImageNet STD constants) and src/vision/encoders/qwen3_vl_tests.rs:49 (identity_op on 1 * 4 * 4). Neither file is in the diff, and no warning is reported in a changed file, so this is local toolchain drift rather than a regression from this PR.

@inureyes inureyes added type:enhancement New features, capabilities, or significant additions priority:medium Medium priority area:models Model architectures, weights, loading, metadata modelsize:large 4-bit checkpoint 50-100GB; runnable but dominates the machine modeltype:vlm Vision-language model arch:hybrid Hybrid attention stack (linear/sliding/full or attention+SSM interleave) status:review Under review status:done Completed and removed status:review Under review labels Dec 2, 2026
Route `nemotron_h_omni` to the Omni VLM path, rename the projector's `vision_final_layernorm` and drop the training-only `summary_idxs`, and build the optional vision final LayerNorm from `vision_config.layer_norm_eps` (default 1e-6) and the top-level `vision_final_layernorm` flag (default `num_nextn_predict_layers > 0`). A missing `vision_final_layernorm.weight` is a named load error, and a `null` `sound_config` is treated as absent because the Super VL config keeps the key with a null value.

Images whose projected features have different token counts now concatenate on the row axis before the batch axis is restored for the scatter. The shared Omni image path resizes the unrounded float32 `[0, 255]` pixels with the antialiased bicubic `interp_matrix` before normalization instead of the u8 CatmullRom path, and the RADIO position embedding is resampled in float32 and cast back to the activation dtype.

The resize and pos-embed changes also move Nano Omni numerics, so the PR reports both families and both arms of the logit trace. Docs add the Super VL row and its 69 GB 4-bit footprint.
@inureyes
inureyes force-pushed the feature/issue-3258-nemotron-super-vl branch from 8cf891e to 120f390 Compare December 2, 2026 04:22
@inureyes
inureyes marked this pull request as ready for review December 2, 2026 04:30
@inureyes
inureyes merged commit a8eb715 into main Dec 2, 2026
35 of 36 checks passed
@inureyes
inureyes deleted the feature/issue-3258-nemotron-super-vl branch December 2, 2026 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch:hybrid Hybrid attention stack (linear/sliding/full or attention+SSM interleave) area:models Model architectures, weights, loading, metadata modelsize:large 4-bit checkpoint 50-100GB; runnable but dominates the machine modeltype:vlm Vision-language model priority:medium Medium priority status:done Completed type:enhancement New features, capabilities, or significant additions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(vlm): add Nemotron 3.5 Super VL (nemotron_h_omni) support

1 participant