Instructions to use nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-BF16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-BF16 with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-BF16", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Bake vLLM-parity patches into modeling_nemotron_h.py
Move the two runtime monkey-patches from the eval script into the model file:
NemotronHHybridDynamicCache: initializessm_stateswithdtype=torch.float32(matches vLLM 0.20.0+DEFAULT_MAMBA_SSM_CACHE_DTYPE = 'float32'for NemotronH).NemotronHMamba2Mixer: replacemamba_chunk_scan_combinedwith a wrapper (_make_mamba_chunk_scan_combined) that uses vLLM'smamba_chunk_scan_combined_varlenkernel withstate_dtype=torch.float32when vLLM is installed (batch_size=1), falling back to mamba_ssm otherwise. This makes HF single-sample prefill bit-compatible with vLLM 0.20.0 inference.
Verified on ChartQA (first 100 test samples, no reasoning, 256 max tokens):
- HF: 63%, vLLM: 59%, HF/vLLM correct-wrong agreement: 92%
- New model-file patches produce identical outputs to the monkey-patch approach (100% agreement).
This PR is not necessary for matching with vLLM.