Model
ankit/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4
- Task:Image Text To Text
- Libraries:transformerspytorch
- Formats:safetensors
- Languages:GermanEnglishSpanishFrenchItalianJapanese
- License:other
Dedicated endpoint
Sign in to deployInference Providers
This hub serves this model on demand.
Try itSpaces
Create a Space with this modelUse this model
Choose individual files there, or download a full snapshot with the Python example below.
Download with the whiteduck client
pip install https://provyd.xyz/clients/whiteduck-0.1.0-py3-none-any.whl
wd login --host 'https://api.provyd.xyz'
wd download 'ankit/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4'Using the Hugging Face client instead
Install huggingface_hub with pip install huggingface_hub, then download this pinned snapshot. Set HF_TOKEN (the variable the Hugging Face client reads) to a whiteduck Read token for private repositories. Running the downloaded model requires software that supports its architecture.
Keep your whiteduck token away from calls that ignore HF_ENDPOINT, such as list_inference_endpoints: they send it to Hugging Face. See Docs.
from huggingface_hub import snapshot_download
import os
path = snapshot_download(
repo_id='ankit/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4',
revision='f145a010eb6cafac2e532b8b81c2dc76df47ff25',
endpoint='https://api.provyd.xyz',
token=os.environ.get("HF_TOKEN") or False,
)Load with transformers
import os
os.environ["HF_ENDPOINT"] = 'https://api.provyd.xyz'
from transformers import AutoModel, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained('ankit/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4')
model = AutoModel.from_pretrained('ankit/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4')Use with local apps
This hub is self-hosted, so each command points the tool at it. Add a whiteduck access token as HF_TOKEN (the variable the Hugging Face client reads) for private repositories.
vLLM
# vLLM downloads through huggingface_hub, which honours HF_ENDPOINT; set HF_TOKEN for a private repository.
HF_ENDPOINT='https://api.provyd.xyz' vllm serve 'ankit/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4'Clone with git
git clone 'https://api.provyd.xyz/ankit/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4'Clone with git over SSH
git clone 'ssh://git@wd.provyd.xyz:2222/ankit/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4'Needs an SSH key on your account. Add an SSH key
Use the API
Read repository metadata at this commit. Set HF_TOKEN (the variable the Hugging Face client reads) to a whiteduck Read token. Tokens grant account-level access, not access to just this model.
curl 'https://api.provyd.xyz/api/models/ankit/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4/revision/f145a010eb6cafac2e532b8b81c2dc76df47ff25' \
-H "Authorization: Bearer $HF_TOKEN"Inference is separate from file storage. The owner must configure and start a supported model using the inference controls. To call it you need a model API key (made on the model page), or a token of any scope (Read or stronger) from the model owner. Visitors can use the try box only when the owner allows it. A token cannot enable unavailable GPU hardware.
Add files using upload-large-folder tool
ankit committed on October 28, 2026
cb6f83b4253f90b2a5f1cccdd6aa9cd16684fdfcParent 951ba44Browse files
50 files changed+2716 -0
README.md
Added+1207 -0
README.md
| @@ -0,0 +1,1207 @@ | |||
| 1 | Added: --- | ||
| 2 | Added: library_name: transformers | ||
| 3 | Added: license: other | ||
| 4 | Added: license_name: openmdw-1.1 | ||
| 5 | Added: license_link: https://openmdw.ai/license/1-1/ | ||
| 6 | Added: pipeline_tag: image-text-to-text | ||
| 7 | Added: language: | ||
| 8 | Added: - en | ||
| 9 | Added: - es | ||
| 10 | Added: - fr | ||
| 11 | Added: - de | ||
| 12 | Added: - it | ||
| 13 | Added: - ja | ||
| 14 | Added: tags: | ||
| 15 | Added: - nvidia | ||
| 16 | Added: - pytorch | ||
| 17 | Added: - nemotron-3.5 | ||
| 18 | Added: track_downloads: true | ||
| 19 | Added: base_model: | ||
| 20 | Added: - nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-BF16 | ||
| 21 | Added: base_model_relation: quantized | ||
| 22 | Added: --- | ||
| 23 | Added: | ||
| 24 | Added: # NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4 | ||
| 25 | Added: | ||
| 26 | Added: <div align="center" style="line-height: 1;"> | ||
| 27 | Added: <a href="https://huggingface.co/collections/nvidia/nemotron-pre-training-datasets" target="_blank" style="margin: 2px;"> | ||
| 28 | Added: <img alt="Pre-Training Datasets" src="https://img.shields.io/badge/🗄️_Pre--Training_Datasets-Available_Here-76B900?logoColor=white" style="display: inline-block; vertical-align: middle;"/> | ||
| 29 | Added: </a> | ||
| 30 | Added: <a href="https://developer.nvidia.com/nemotron" target="_blank" style="margin: 2px;"> | ||
| 31 | Added: <img alt="Homepage" src="https://img.shields.io/badge/🏠Nemotron Developer Page-Learn More Here!-536af5?color=76B900&logoColor=white" style="display: inline-block; vertical-align: middle;"/> | ||
| 32 | Added: </a> | ||
| 33 | Added: <a href="https://research.nvidia.com/labs/nemotron/files/NVIDIA-Nemotron-3.5-Super-and-Lightning-Technical-Report.pdf" target="_blank" style="margin: 2px;"> | ||
| 34 | Added: <img alt="Paper" src="https://img.shields.io/badge/📝Paper-Read Now!-536af5?color=76B900&logoColor=white" style="display: inline-block; vertical-align: middle;"/> | ||
| 35 | Added: </a> | ||
| 36 | Added: <a href="https://discord.gg/9xpKQtVvrk" target="_blank" style="margin: 2px;"> | ||
| 37 | Added: <img alt="Discord" src="https://img.shields.io/badge/Discord-NVIDIA%20AI%20Developer-7289da?logo=discord&logoColor=white&color=7289da" style="display: inline-block; vertical-align: middle;"/> | ||
| 38 | Added: </a> | ||
| 39 | Added: </div> | ||
| 40 | Added: | ||
| 41 | Added: <div style="text-align: center; line-height: 1;"> | ||
| 42 | Added: <a href="https://openmdw.ai/license/1-1/" style="margin: 2px;"> | ||
| 43 | Added: <img alt="License" src="https://img.shields.io/badge/License-OpenMDW--1.1-f5de53" style="display: inline-block; vertical-align: middle;"/> | ||
| 44 | Added: </a> | ||
| 45 | Added: </div> | ||
| 46 | Added: | ||
| 47 | Added:  | ||
| 48 | Added: | ||
| 49 | Added: ## Description | ||
| 50 | Added: | ||
| 51 | Added: **NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4** is the quantized release of NVIDIA Nemotron 3.5 Super VL, a vision-language model for reasoning, coding, tool use, document understanding, and video understanding. It uses NVFP4 quantization to reduce memory requirements, with quantization-aware distillation from the [BF16 model](https://huggingface.co/nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-BF16). | ||
| 52 | Added: | ||
| 53 | Added: The model combines interleaved Mamba-2, Mixture-of-Experts (MoE), and attention layers with a C-RADIO vision encoder and a vision-language connector. It has **120B total parameters** and **12B active parameters** and supports context lengths up to **1M tokens**. Multi-Token Prediction (MTP) enables native speculative decoding. | ||
| 54 | Added: | ||
| 55 | Added: This model is ready for commercial or non-commercial use. | ||
| 56 | Added: | ||
| 57 | Added: ## Model Summary | ||
| 58 | Added: | ||
| 59 | Added: | | | | ||
| 60 | Added: |:---|:---| | ||
| 61 | Added: | **Total Parameters** | 120B (12B active) | | ||
| 62 | Added: | **Architecture** | Mamba-2–Transformer hybrid Mixture of Experts with a C-RADIO vision encoder | | ||
| 63 | Added: | **Precision** | NVFP4 (mixed-precision quantized weights) | | ||
| 64 | Added: | **Context Length** | Up to 1M tokens; deployment settings are listed below | | ||
| 65 | Added: | **Inputs / Outputs** | Text, images, and video / text | | ||
| 66 | Added: | **Deployment** | 1× DGX Spark, 1x NVIDIA RTX PRO 6000, 1× H200, 2× H100, or 1× GB200 | | ||
| 67 | Added: | **Speculative Decoding** | Native Multi-Token Prediction (MTP) | | ||
| 68 | Added: | **Reasoning Mode** | Configurable through the chat template (`enable_thinking=True/False`) | | ||
| 69 | Added: | **Recommended Sampling** | Text: temperature 1.0, top_p 0.95; vision: temperature 0.6, top_p 0.95 | | ||
| 70 | Added: | **Best For** | Efficient deployment of text and vision-language agents | | ||
| 71 | Added: | **License** | [OpenMDW-1.1](https://openmdw.ai/license/1-1/) | | ||
| 72 | Added: | ||
| 73 | Added: ## Model Overview | ||
| 74 | Added: | ||
| 75 | Added: **Model Developer:** NVIDIA Corporation | ||
| 76 | Added: | ||
| 77 | Added: ### What is Nemotron? | ||
| 78 | Added: | ||
| 79 | Added: NVIDIA Nemotron™ is a family of open models with open weights, training data, and recipes, delivering leading efficiency and accuracy for building specialized AI agents. | ||
| 80 | Added: | ||
| 81 | Added: ## Quick Start | ||
| 82 | Added: | ||
| 83 | Added: This vLLM configuration is intended for **DGX Spark (GB10) only**. It serves the model with one concurrent sequence and seven speculative tokens per draft using [LiLiCorr](https://huggingface.co/nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4-LiLiCorr). | ||
| 84 | Added: | ||
| 85 | Added: > Nemotron 3.5 Super VL has configurable reasoning levels: `off`, `on (medium)`, and `on`. Selecting `on (medium)` will reduce the number of tokens generated compared to `on`, but may impact accuracy. You can learn about the reasoning budget [here](https://huggingface.co/nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4#text-and-reasoning)! | ||
| 86 | Added: | ||
| 87 | Added: Use Docker with NVIDIA GPU support and the `vllm/vllm-openai:nightly-3f1bcfd82bb2e93fcd364fc7a5491718453a77e2` or (`vllm/vllm-openai:v0.32.0`) image. If the model requires authentication, set `HF_TOKEN` in your shell before launching the container. | ||
| 88 | Added: | ||
| 89 | Added: ```bash | ||
| 90 | Added: export MODEL=nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4 | ||
| 91 | Added: export DRAFT_MODEL=nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4-LiLiCorr | ||
| 92 | Added: ``` | ||
| 93 | Added: | ||
| 94 | Added: ```bash | ||
| 95 | Added: vllm serve $MODEL \ | ||
| 96 | Added: --served-model-name nemotron-3.5-super-vl \ | ||
| 97 | Added: --max-num-seqs 1 \ | ||
| 98 | Added: --trust-remote-code \ | ||
| 99 | Added: --gpu-memory-utilization 0.75 \ | ||
| 100 | Added: --max-num-batched-tokens 8192 \ | ||
| 101 | Added: --speculative_config.model $DRAFT_MODEL\ | ||
| 102 | Added: --speculative_config.num_speculative_tokens 7 \ | ||
| 103 | Added: --speculative_config.method dflash \ | ||
| 104 | Added: --mamba-backend flashinfer \ | ||
| 105 | Added: --mamba-ssm-cache-dtype float16 \ | ||
| 106 | Added: --enable-mamba-cache-stochastic-rounding \ | ||
| 107 | Added: --mamba-cache-philox-rounds 5 \ | ||
| 108 | Added: --enable-mamba-shared-prefix-checkpoint \ | ||
| 109 | Added: --video-pruning-rate 0.5 \ | ||
| 110 | Added: --media-io-kwargs '{"video": {"fps": 2, "num_frames": 256}}' \ | ||
| 111 | Added: --block-size 64 \ | ||
| 112 | Added: --prefix-match-unit 64 \ | ||
| 113 | Added: --enable-auto-tool-choice \ | ||
| 114 | Added: --tool-call-parser qwen3_coder \ | ||
| 115 | Added: --reasoning-parser nemotron_v3 | ||
| 116 | Added: ``` | ||
| 117 | Added: | ||
| 118 | Added: Wait for the server to finish loading the model and compiling kernels, then check the endpoint: | ||
| 119 | Added: | ||
| 120 | Added: ```bash | ||
| 121 | Added: curl --fail http://localhost:8000/v1/models | ||
| 122 | Added: ``` | ||
| 123 | Added: | ||
| 124 | Added: All vLLM and SGLang examples use port `8000` and the API model name `nemotron-3.5-super-vl`. See the [API Client](#api-client) for text, image, video, and tool-calling examples. | ||
| 125 | Added: | ||
| 126 | Added: ## License/Terms of Use | ||
| 127 | Added: | ||
| 128 | Added: **Governing Download Terms:** Use of this model is governed by the [OpenMDW License Agreement, version 1.1](https://openmdw.ai/license/1-1/). | ||
| 129 | Added: | ||
| 130 | Added: ## Benchmarks | ||
| 131 | Added: | ||
| 132 | Added: We evaluated our model on the following benchmarks: | ||
| 133 | Added: | ||
| 134 | Added: | Benchmark | Nemotron 3.5 Super VL BF16 | Nemotron 3.5 Super VL NVFP4 | | ||
| 135 | Added: | --- | ---: | ---: | | ||
| 136 | Added: | GPQA-Diamond | 89.52 | 89.90 | | ||
| 137 | Added: | HLE, text-only | 31.79 | 31.44 | | ||
| 138 | Added: | MMLU-ProX | 76.91 | 73.76 | | ||
| 139 | Added: | AA-Omniscience accuracy | 26.20 | 25.86 | | ||
| 140 | Added: | AA-Omniscience hallucination rate | 30.0 | 27.7 | | ||
| 141 | Added: | AA-Omniscience index | 4.03 | 5.3 | | ||
| 142 | Added: | APEX shortlist | 88.36 | 89.36 | | ||
| 143 | Added: | LiveCodeBench v6 | 88.22 | 87.41 | | ||
| 144 | Added: | SciCode, subtask | 47.13 | 46.61 | | ||
| 145 | Added: | AA-LCR v1.1 | 68.62 | 67.69 | | ||
| 146 | Added: | GraphWalks | 89.71 | 90.34 | | ||
| 147 | Added: | IFBench | 70.86 | 71.50 | | ||
| 148 | Added: | LMArena v3 proxy | 52.67 | 51.93 | | ||
| 149 | Added: | WMT24++ | 84.80 | 84.76 | | ||
| 150 | Added: | tau2-bench retail | 69.24 | 69.30 | | ||
| 151 | Added: | tau2-bench airline | 76.50 | 75.75 | | ||
| 152 | Added: | tau2-bench telecom | 73.19 | 73.19 | | ||
| 153 | Added: | tau3-bench banking | 18.88 | 17.78 | | ||
| 154 | Added: | GDPval-AA v2 | 1211 | 1206 | | ||
| 155 | Added: | BrowseComp | 78 | 77.5 | | ||
| 156 | Added: | SWE-bench Verified | 71.10 | 71.07 | | ||
| 157 | Added: | SWE-bench Multilingual | 67.72 | 67.00 | | ||
| 158 | Added: | SWE-bench Pro | 51.78 | 51.30 | | ||
| 159 | Added: | Terminal-Bench 2.1 | 60.67 | 62.78 | | ||
| 160 | Added: | BabyVision | 29.60 | 29.51 | | ||
| 161 | Added: | MMLongBench-Doc | 62.82 | 62.82 | | ||
| 162 | Added: | V* | 85.60 | 85.95 | | ||
| 163 | Added: | OCR-Reasoning | 65.08 | 65.09 | | ||
| 164 | Added: | MathVision | 78.16 | 77.79 | | ||
| 165 | Added: | HLE, full set | 29.20 | 29.00 | | ||
| 166 | Added: | OCRBench v2, EN | 68.12 | 68.34 | | ||
| 167 | Added: | OCRBench v2, ZH | 59.15 | 59.03 | | ||
| 168 | Added: | CharXiv reasoning | 80.82 | 79.88 | | ||
| 169 | Added: | Video-MME v2 | 32.85 | 32.54 | | ||
| 170 | Added: | OSWorld-Verified | 51.14 | 52.3 | | ||
| 171 | Added: | BrowseComp [offline] | 78 | 77.5 | | ||
| 172 | Added: | WebVoyager [offline] | 77.72 | 66.31 | | ||
| 173 | Added: | AA-Briefcase-Lite [offline] | 1137 (-) \| 1252 (-) \| 40 | 1137 (-) \| 1188 (-) \| 45 | | ||
| 174 | Added: | AutomationBench-AA [offline] | 32.44 | 32.3 | | ||
| 175 | Added: | GDP.pdf [offline] | 6.6 (AA 6.6) | 6.0 | | ||
| 176 | Added: | Terminal Bench 4 [offline] | 1 | 1.5 | | ||
| 177 | Added: | DeepSWE [offline] | 24.65 | 18.2 | | ||
| 178 | Added: | ||
| 179 | Added: > The evaluations between the BF16 checkpoint and NVFP4 checkpoint are done with all configs, harnesses, and other non-model parameters held static to ensure fair comparison that isolates the checkpoint impact | ||
| 180 | Added: | ||
| 181 | Added: We evaluated Nemotron 3.5 Super on a comprehensive suite of benchmarks spanning agentic capabilities, reasoning and knowledge, multimodal, conversational ability and instruction following, long-context understanding, and multilingual performance. All evaluation results for Nemotron 3.5 Super and baselines were collected via NeMo Gym. For reproducibility purposes, more details on the evaluation settings can be found in the [NeMo Gym recipes folder](https://github.com/NVIDIA-NeMo/Gym) and the [corresponding reproducibility tutorial](https://github.com/NVIDIA-NeMo/Gym/blob/main/nemotron_recipes/super-3.5/reproducibility.md). The published recipes specify the benchmark-specific containers, prompts, inference parameters, parser configurations, and scoring settings used to produce the results. | ||
| 182 | Added: | ||
| 183 | Added: There were a few benchmarks that were not yet onboarded in our open source tools, and for these we used either their official open source implementation or an internal scaffolding that we plan to open source in the future: BabyVision, CharXiv-RQ, MathVision, MMLongBench-Doc, OCR-Reasoning, OCRBench-v2, V*, Video-MME-v2. | ||
| 184 | Added: | ||
| 185 | Added: ### Agentic Coding Benchmarks | ||
| 186 | Added: | ||
| 187 | Added: Additional harness-level coding-agent results for SWE-Bench Pro and Terminal-Bench 2.1 are shown below. | ||
| 188 | Added: | ||
| 189 | Added:  | ||
| 190 | Added: | ||
| 191 | Added: ### Deployment Geography: Global | ||
| 192 | Added: | ||
| 193 | Added: ### Use Case | ||
| 194 | Added: | ||
| 195 | Added: This model is intended for developers deploying vision-language agents for coding, search, tool-assisted workflows, document question answering, and image and video understanding, on NVIDIA data center and DGX Spark systems. | ||
| 196 | Added: | ||
| 197 | Added: ### Release Date | ||
| 198 | Added: | ||
| 199 | Added: Hugging Face - 10/15/2026 via [Hugging Face](https://huggingface.co/nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4) | ||
| 200 | Added: | ||
| 201 | Added: ## Reference(s) | ||
| 202 | Added: | ||
| 203 | Added: * [NVIDIA Nemotron 3.5 Super VL and Lightning Technical Report](https://research.nvidia.com/labs/nemotron/files/NVIDIA-Nemotron-3.5-Super-and-Lightning-Technical-Report.pdf) | ||
| 204 | Added: | ||
| 205 | Added: ## Model Architecture | ||
| 206 | Added: | ||
| 207 | Added: - **Architecture Type:** Mamba-2–Transformer hybrid Mixture of Experts (MoE) with Multi-Token Prediction (MTP) | ||
| 208 | Added: - **Network Architecture:** Nemotron Hybrid MoE with 512 routed experts per MoE layer, a C-RADIO vision encoder, and a vision-language connector | ||
| 209 | Added: - **Number of Model Parameters:** 120B total / 12B active | ||
| 210 | Added: | ||
| 211 | Added: ## Model Design | ||
| 212 | Added: | ||
| 213 | Added: The model combines sparse expert computation, attention, and Mamba-2 layers to support long-context processing. The vision encoder and connector turn visual inputs into representations processed by the language backbone. A shared MTP head predicts future tokens recursively for speculative decoding. | ||
| 214 | Added: | ||
| 215 | Added: The model supports up to 1M tokens of context. The prompt, visual inputs, conversation history, tool results, and generated response share this context window. Individual deployment recipes may use a smaller context window to accommodate the available GPU memory and concurrency. | ||
| 216 | Added: | ||
| 217 | Added: ## Training Methodology | ||
| 218 | Added: | ||
| 219 | Added: **Stage 1: Foundation and Multi-Token Prediction** | ||
| 220 | Added: | ||
| 221 | Added: The language backbone is initialized from Nemotron 3 Super Base. A shared MTP head is trained for 100B tokens while the backbone remains frozen, followed by 1T tokens of distillation from Nemotron 3 Ultra Base. | ||
| 222 | Added: | ||
| 223 | Added: **Stage 2: Continued Pre-Training and Mid-Training** | ||
| 224 | Added: | ||
| 225 | Added: The model undergoes 100B tokens of Indic continued pre-training, a 35B-token extension to 1M context, 67B tokens of software-engineering mid-training at 256K context, and a final 9B-token long-context recovery stage. Software-engineering data includes repositories, issue–pull-request pairs, commit diffs, build and CI logs, and agent trajectories. | ||
| 226 | Added: | ||
| 227 | Added: **Stage 3: Vision-Language Training** | ||
| 228 | Added: | ||
| 229 | Added: A C-RADIO vision encoder and connector extend the language backbone to visual inputs, including images, document pages, and video frames. | ||
| 230 | Added: | ||
| 231 | Added: **Stage 4: Supervised Fine-Tuning** | ||
| 232 | Added: | ||
| 233 | Added: A two-stage supervised fine-tuning pipeline jointly trains the language and vision components on vision, reasoning, code, tools, chat, safety, and long-context data. Training uses packed sequences of up to 524,288 tokens. | ||
| 234 | Added: | ||
| 235 | Added: **Stage 5: Reinforcement Learning and Distillation** | ||
| 236 | Added: | ||
| 237 | Added: Reinforcement learning with verifiable rewards, reinforcement learning from human feedback, and specialized teacher training improve reasoning, agentic, chat, and vision capabilities. Multi-teacher on-policy distillation consolidates these capabilities into a single model. | ||
| 238 | Added: | ||
| 239 | Added: **Stage 6: MTP Boosting** | ||
| 240 | Added: | ||
| 241 | Added: The MTP head is further trained against the frozen post-trained backbone to improve speculative-decoding acceptance. | ||
| 242 | Added: | ||
| 243 | Added: **Stage 7: Quantization and Quantization-Aware Distillation** | ||
| 244 | Added: | ||
| 245 | Added: The model is quantized with [NVIDIA Model Optimizer](https://github.com/NVIDIA/Model-Optimizer) and refined through quantization-aware distillation using the supervised fine-tuning data blend. The vision encoder, connector, Mamba convolutions, and embeddings remain in BF16, and the MoE router remains in FP32. Inference uses W4A4 on Blackwell and W4A16 on non-Blackwell platforms, according to the serving configuration. | ||
| 246 | Added: | ||
| 247 | Added: ## Input | ||
| 248 | Added: | ||
| 249 | Added: - **Input Type(s):** Text, images, and video | ||
| 250 | Added: - **Input Format(s):** Text strings, images, and sampled video frames | ||
| 251 | Added: - Video: mp4, up to 2 minutes. | ||
| 252 | Added: - Image: Red, Green, Blue (RGB) (jpeg, png) | ||
| 253 | Added: - **Input Parameters:** | ||
| 254 | Added: - Video: Three-Dimensional (3D) | ||
| 255 | Added: - Image: Two-Dimensional (2D) | ||
| 256 | Added: - Text: One-Dimensional (1D) | ||
| 257 | Added: - **Other Properties Related to Input:** Maximum context length up to 1M tokens. Documents can be supplied as page images with accompanying text. | ||
| 258 | Added: | ||
| 259 | Added: ## Output | ||
| 260 | Added: | ||
| 261 | Added: - **Output Type(s):** Text | ||
| 262 | Added: - **Output Format:** String | ||
| 263 | Added: - **Output Parameters:** One-dimensional sequences | ||
| 264 | Added: - **Other Properties Related to Output:** Input and output tokens share the configured context window. | ||
| 265 | Added: | ||
| 266 | Added: Our AI models are designed and optimized to run on NVIDIA GPU-accelerated systems. By leveraging NVIDIA's hardware (e.g. GPU cores) and software frameworks (e.g., CUDA libraries), the model achieves faster training and inference times compared to CPU-only solutions. | ||
| 267 | Added: | ||
| 268 | Added: ## Software Integration | ||
| 269 | Added: | ||
| 270 | Added: - **Runtime Engine(s):** vLLM; SGLang; TensorRT-LLM | ||
| 271 | Added: - **Hardware:** | ||
| 272 | Added: - NVIDIA Blackwell | ||
| 273 | Added: - NVIDIA Hopper | ||
| 274 | Added: - **Operating System(s):** Linux | ||
| 275 | Added: | ||
| 276 | Added: The integration of foundation and fine-tuned models into AI systems requires additional testing using use-case-specific data to ensure safe and effective deployment. Following the V-model methodology, iterative testing and validation at both unit and system levels are essential to mitigate risks, meet technical and functional requirements, and ensure compliance with safety and ethical standards before deployment. | ||
| 277 | Added: | ||
| 278 | Added: ## Model Version(s) | ||
| 279 | Added: | ||
| 280 | Added: * v1.0 - NVFP4 GA | ||
| 281 | Added: | ||
| 282 | Added: ## Quick Start Guide | ||
| 283 | Added: | ||
| 284 | Added: ### Choose your deployment | ||
| 285 | Added: | ||
| 286 | Added: | Hardware | Runtime | Configuration | | ||
| 287 | Added: |:---|:---|:---| | ||
| 288 | Added: | 1× DGX Spark | vLLM | Text, image; 1M-token context; MTP with 5 draft tokens | | ||
| 289 | Added: | 1x NVIDIA RTX PRO 6000 | vLLM | Text, image; 1M-token context; MTP with 5 draft tokens | | ||
| 290 | Added: | 2× H100 | vLLM | Text, image, and video; 1M-token context; MTP with 3 draft tokens | | ||
| 291 | Added: | 1× H200 | vLLM | Text, image, and video; 1M-token context; MTP with 3 draft tokens | | ||
| 292 | Added: | 1× GB200 | vLLM | Text, image, and video; 1M-token context; MTP with 5 draft tokens | | ||
| 293 | Added: | 1× GB200, 2× H100 or 1× DGX Spark | SGLang | Text, image; 1M-token context; MTP with 5 draft steps | | ||
| 294 | Added: | 1× GB200 | TensorRT-LLM | 1M-token context; MTP with 5 draft tokens | | ||
| 295 | Added: | ||
| 296 | Added: ### NIM and Dynamo | ||
| 297 | Added: | ||
| 298 | Added: For production workloads, leverage our best-in-class deployment solutions: | ||
| 299 | Added: | ||
| 300 | Added: NVIDIA NIM packages the model with an optimized inference engine, validated configurations, and standard APIs for deployment in cloud and data center environments. Get started with the Nemotron 3.5 Super VL NIM [here](https://catalog.ngc.nvidia.com/orgs/nim/nvidia/containers/nemotron-3.5-super-vl-120b-a12b/-). | ||
| 301 | Added: | ||
| 302 | Added: NVIDIA Dynamo is a distributed inference framework. It supports KV-cache-aware routing, KV cache management, and disaggregated serving. Get started with Nemotron 3.5 Super VL Dynamo recipes optimized for 7 HW SKUs across Hopper, Blackwell, and Rubin [here](https://docs.nvidia.com/dynamo/dev/recipes/nemotron-3-5-super-vl). | ||
| 303 | Added: | ||
| 304 | Added: ### Running on Local Hardware | ||
| 305 | Added: | ||
| 306 | Added: For Local inference on DGX Spark, RTX Spark, and RTX Pro 6000 you can find details on running the model through the following libraries: | ||
| 307 | Added: | ||
| 308 | Added: - llama.cpp available [here](https://huggingface.co/collections/ggml-org/nvidia-nemotron-3.5-super-vl) | ||
| 309 | Added: - Unsloth available [here](https://unsloth.ai/docs/models/nemotron-3.5-super-vl) | ||
| 310 | Added: | ||
| 311 | Added: ### Speculative Decoding | ||
| 312 | Added: | ||
| 313 | Added: The serving examples enable the model's native MTP head. No separate drafter download is required for these vLLM and SGLang recipes leveraging MTP. In vLLM, `num_speculative_tokens` controls draft length; in SGLang, the MTP draft length uses `--speculative-num-steps` to config. | ||
| 314 | Added: | ||
| 315 | Added: For DGX Spark, we also provide a [LiLiCorr](https://huggingface.co/nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4-LiLiCorr) speculative drafter, which accelerates decoding by drafting multiple future tokens in parallel and using a lightweight correlation head to select compatible candidates across adjacent positions. Nemotron Super 3.5 VL verifies the proposed block, allowing generation to advance by multiple accepted tokens per verification step while preserving the target model's output distribution with correct speculative verification. It is recommended to use LiLiCorr for DGX Spark deployments in all scenarios. | ||
| 316 | Added: | ||
| 317 | Added: Performance depends on hardware, request length, and concurrency. To compare with standard decoding, remove the speculative configuration while keeping the model, workload, sampling parameters, and other server settings the same. | ||
| 318 | Added: | ||
| 319 | Added: ### vLLM | ||
| 320 | Added: | ||
| 321 | Added: Use `vllm/vllm-openai:nightly-3f1bcfd82bb2e93fcd364fc7a5491718453a77e2` for these commands (or `vllm/vllm-openai:v0.32.0`). | ||
| 322 | Added: | ||
| 323 | Added: #### 2× H100 (up to 1M Context Length) | ||
| 324 | Added: | ||
| 325 | Added: Use this command if you need to serve the model with up to 1M context length. | ||
| 326 | Added: | ||
| 327 | Added: ```bash | ||
| 328 | Added: vllm serve $MODEL \ | ||
| 329 | Added: --served-model-name nemotron-3.5-super-vl \ | ||
| 330 | Added: --tensor-parallel-size 2 \ | ||
| 331 | Added: --max-num-seqs 128 \ | ||
| 332 | Added: --trust-remote-code \ | ||
| 333 | Added: --gpu-memory-utilization 0.89 \ | ||
| 334 | Added: --max-num-batched-tokens 16384 \ | ||
| 335 | Added: --block-size 64 \ | ||
| 336 | Added: --prefix-match-unit 64 \ | ||
| 337 | Added: --compilation_config.max_cudagraph_capture_size 256 \ | ||
| 338 | Added: --mamba-backend flashinfer \ | ||
| 339 | Added: --mamba-ssm-cache-dtype float16 \ | ||
| 340 | Added: --enable-mamba-cache-stochastic-rounding \ | ||
| 341 | Added: --mamba-cache-philox-rounds 5 \ | ||
| 342 | Added: --enable-mamba-shared-prefix-checkpoint \ | ||
| 343 | Added: --mamba-cache-mode align \ | ||
| 344 | Added: --speculative-config.method mtp \ | ||
| 345 | Added: --speculative-config.num_speculative_tokens 3 \ | ||
| 346 | Added: --video-pruning-rate 0.5 \ | ||
| 347 | Added: --media-io-kwargs '{"video": {"fps": 2, "num_frames": 256}}' \ | ||
| 348 | Added: --enable-auto-tool-choice \ | ||
| 349 | Added: --tool-call-parser qwen3_coder \ | ||
| 350 | Added: --reasoning-parser nemotron_v3 | ||
| 351 | Added: ``` | ||
| 352 | Added: | ||
| 353 | Added: For **one H200**, use the same command with `--tensor-parallel-size 1`. | ||
| 354 | Added: | ||
| 355 | Added: #### 1× GB200 (up to 1M Context Length) | ||
| 356 | Added: | ||
| 357 | Added: Use this command if you need to serve the model with up to 1M context length. | ||
| 358 | Added: | ||
| 359 | Added: ```bash | ||
| 360 | Added: vllm serve $MODEL \ | ||
| 361 | Added: --served-model-name nemotron-3.5-super-vl \ | ||
| 362 | Added: --trust-remote-code \ | ||
| 363 | Added: --max-num-seqs 512 \ | ||
| 364 | Added: --enable-prefix-caching \ | ||
| 365 | Added: --max-num-batched-tokens 32768 \ | ||
| 366 | Added: --prefix-match-unit 16 \ | ||
| 367 | Added: --enable-mamba-shared-prefix-checkpoint \ | ||
| 368 | Added: --async-scheduling \ | ||
| 369 | Added: --kernel-config '{"linear_backend_per_quant":{"fp8_w8a8":"torch"}}' \ | ||
| 370 | Added: --compilation-config '{"pass_config":{"fuse_attn_quant":true},"use_inductor_graph_partition":true,"cudagraph_mode":"FULL_AND_PIECEWISE"}' \ | ||
| 371 | Added: --mamba-backend flashinfer \ | ||
| 372 | Added: --mamba-ssm-cache-dtype float16 \ | ||
| 373 | Added: --enable-mamba-cache-stochastic-rounding \ | ||
| 374 | Added: --mamba-cache-philox-rounds 5 \ | ||
| 375 | Added: --mamba-cache-mode align \ | ||
| 376 | Added: --video-pruning-rate 0.5 \ | ||
| 377 | Added: --media-io-kwargs '{"video": {"fps": 2, "num_frames": 256}}' \ | ||
| 378 | Added: --enable-auto-tool-choice \ | ||
| 379 | Added: --speculative_config.method mtp \ | ||
| 380 | Added: --speculative_config.num_speculative_tokens 5 \ | ||
| 381 | Added: --tool-call-parser qwen3_coder \ | ||
| 382 | Added: --reasoning-parser nemotron_v3 | ||
| 383 | Added: ``` | ||
| 384 | Added: | ||
| 385 | Added: For the multimodal examples, each request can contain one image and one video. The video configuration samples up to 256 frames at 2 FPS with a pruning rate of 0.5. For 1080p videos, use 1 FPS and up to 128 frames; 2 FPS and 256 frames can be used for lower-resolution video such as 720p. Start with short MP4 clips of one to two minutes. | ||
| 386 | Added: | ||
| 387 | Added: ### SGLang | ||
| 388 | Added: | ||
| 389 | Added: Use Docker with NVIDIA GPU support and the `lmsysorg/sglang:nemotron3-5-super` image. | ||
| 390 | Added: | ||
| 391 | Added: ```bash | ||
| 392 | Added: export MODEL=nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4 | ||
| 393 | Added: export DRAFT_MODEL=nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4-LiLiCorr | ||
| 394 | Added: ``` | ||
| 395 | Added: | ||
| 396 | Added: #### 1× GB200 | ||
| 397 | Added: | ||
| 398 | Added: ```bash | ||
| 399 | Added: sglang serve \ | ||
| 400 | Added: --model-path $MODEL \ | ||
| 401 | Added: --host 0.0.0.0 \ | ||
| 402 | Added: --port 8000 \ | ||
| 403 | Added: --trust-remote-code \ | ||
| 404 | Added: --kv-cache-dtype fp8_e4m3 \ | ||
| 405 | Added: --tp-size 1 \ | ||
| 406 | Added: --max-running-requests 512 \ | ||
| 407 | Added: --attention-backend trtllm_mha \ | ||
| 408 | Added: --mamba-backend flashinfer \ | ||
| 409 | Added: --mamba-ssm-dtype bfloat16 \ | ||
| 410 | Added: --enable-mamba-cache-stochastic-rounding \ | ||
| 411 | Added: --mamba-cache-philox-rounds 5 \ | ||
| 412 | Added: --mamba-radix-cache-strategy extra_buffer \ | ||
| 413 | Added: --reasoning-parser nemotron_3 \ | ||
| 414 | Added: --tool-call-parser qwen3_coder \ | ||
| 415 | Added: --speculative-algorithm EAGLE \ | ||
| 416 | Added: --speculative-num-steps 5 \ | ||
| 417 | Added: --speculative-eagle-topk 1 \ | ||
| 418 | Added: --speculative-num-draft-tokens 6 | ||
| 419 | Added: ``` | ||
| 420 | Added: | ||
| 421 | Added: #### 2× H100 | ||
| 422 | Added: | ||
| 423 | Added: ```bash | ||
| 424 | Added: sglang serve \ | ||
| 425 | Added: --model-path $MODEL \ | ||
| 426 | Added: --host 0.0.0.0 \ | ||
| 427 | Added: --port 8000 \ | ||
| 428 | Added: --trust-remote-code \ | ||
| 429 | Added: --kv-cache-dtype fp8_e4m3 \ | ||
| 430 | Added: --tp-size 2 \ | ||
| 431 | Added: --max-running-requests 512 \ | ||
| 432 | Added: --attention-backend flashinfer \ | ||
| 433 | Added: --mamba-backend flashinfer \ | ||
| 434 | Added: --mamba-ssm-dtype bfloat16 \ | ||
| 435 | Added: --enable-mamba-cache-stochastic-rounding \ | ||
| 436 | Added: --mamba-cache-philox-rounds 5 \ | ||
| 437 | Added: --mamba-radix-cache-strategy extra_buffer \ | ||
| 438 | Added: --reasoning-parser nemotron_3 \ | ||
| 439 | Added: --tool-call-parser qwen3_coder \ | ||
| 440 | Added: --speculative-algorithm EAGLE \ | ||
| 441 | Added: --speculative-num-steps 5 \ | ||
| 442 | Added: --speculative-eagle-topk 1 \ | ||
| 443 | Added: --speculative-num-draft-tokens 6 | ||
| 444 | Added: ``` | ||
| 445 | Added: | ||
| 446 | Added: #### 1× DGX Spark(use `LiLiCorr` speculative drafter) | ||
| 447 | Added: | ||
| 448 | Added: ```bash | ||
| 449 | Added: sglang serve \ | ||
| 450 | Added: --model-path $MODEL \ | ||
| 451 | Added: --host 0.0.0.0 \ | ||
| 452 | Added: --port 8000 \ | ||
| 453 | Added: --trust-remote-code \ | ||
| 454 | Added: --kv-cache-dtype fp8_e4m3 \ | ||
| 455 | Added: --tp-size 1 \ | ||
| 456 | Added: --max-running-requests 1 \ | ||
| 457 | Added: --attention-backend flashinfer \ | ||
| 458 | Added: --mamba-backend flashinfer \ | ||
| 459 | Added: --mamba-ssm-dtype bfloat16 \ | ||
| 460 | Added: --enable-mamba-cache-stochastic-rounding \ | ||
| 461 | Added: --mamba-cache-philox-rounds 5 \ | ||
| 462 | Added: --mamba-radix-cache-strategy extra_buffer \ | ||
| 463 | Added: --reasoning-parser nemotron_3 \ | ||
| 464 | Added: --tool-call-parser qwen3_coder \ | ||
| 465 | Added: --speculative-algorithm DFLASH \ | ||
| 466 | Added: --speculative-draft-model-path $DRAFT_MODEL | ||
| 467 | Added: ``` | ||
| 468 | Added: | ||
| 469 | Added: ### TensorRT-LLM | ||
| 470 | Added: | ||
| 471 | Added: The following configurations use TensorRT-LLM **1.3.0rc28**, built from commit `55f7eca861613bd60e1ac34d5916f091cd89d558` with Python 3.12 and the [Mamba cache patch](https://github.com/NVIDIA/TensorRT-LLM/pull/19597). | ||
| 472 | Added: | ||
| 473 | Added: Download the NVFP4 checkpoint locally: | ||
| 474 | Added: | ||
| 475 | Added: ```bash | ||
| 476 | Added: hf download "$MODEL_CKPT" --local-dir ./models/super-vl-nvfp4 | ||
| 477 | Added: ``` | ||
| 478 | Added: | ||
| 479 | Added: #### 1× GB200 | ||
| 480 | Added: | ||
| 481 | Added: Save the following as `super-vl-gb200.yaml`: | ||
| 482 | Added: | ||
| 483 | Added: ```yaml | ||
| 484 | Added: tensor_parallel_size: 1 | ||
| 485 | Added: moe_expert_parallel_size: 1 | ||
| 486 | Added: trust_remote_code: true | ||
| 487 | Added: enable_chunked_prefill: true | ||
| 488 | Added: disable_overlap_scheduler: false | ||
| 489 | Added: max_batch_size: 16 | ||
| 490 | Added: max_num_tokens: 8192 | ||
| 491 | Added: max_seq_len: 1048576 | ||
| 492 | Added: attn_backend: TRTLLM | ||
| 493 | Added: moe_config: | ||
| 494 | Added: backend: TRTLLM | ||
| 495 | Added: kv_cache_config: | ||
| 496 | Added: dtype: fp8 | ||
| 497 | Added: tokens_per_block: 32 | ||
| 498 | Added: mamba_ssm_cache_dtype: float16 | ||
| 499 | Added: mamba_ssm_stochastic_rounding: false | ||
| 500 | Added: free_gpu_memory_fraction: 0.85 | ||
| 501 | Added: enable_block_reuse: true | ||
| 502 | Added: mamba_state_config: | ||
| 503 | Added: periodic_snapshot_interval: 0 | ||
| 504 | Added: additional_snapshot_offsets_from_start: [50016] | ||
| 505 | Added: additional_snapshot_offsets_from_end: [0] | ||
| 506 | Added: enable_branch_snapshot: true | ||
| 507 | Added: cuda_graph_config: | ||
| 508 | Added: enable_padding: true | ||
| 509 | Added: batch_sizes: [1, 2, 4, 8, 12, 16] | ||
| 510 | Added: speculative_config: | ||
| 511 | Added: decoding_type: MTP | ||
| 512 | Added: max_draft_len: 5 | ||
| 513 | Added: guided_decoding_backend: xgrammar | ||
| 514 | Added: ``` | ||
| 515 | Added: | ||
| 516 | Added: ```bash | ||
| 517 | Added: trtllm-serve ./models/super-vl-nvfp4 \ | ||
| 518 | Added: --config super-vl-gb200.yaml \ | ||
| 519 | Added: --served_model_name nemotron-3.5-super-vl \ | ||
| 520 | Added: --host 0.0.0.0 \ | ||
| 521 | Added: --port 8000 \ | ||
| 522 | Added: --tool_parser qwen3_coder \ | ||
| 523 | Added: --reasoning_parser nemotron-v3 | ||
| 524 | Added: ``` | ||
| 525 | Added: | ||
| 526 | Added: `max_seq_len` sets the context limit; `max_num_tokens` controls the token batch size. For TensorRT-LLM clients, use the model identifier returned by `/v1/models`. | ||
| 527 | Added: | ||
| 528 | Added: #### 1× DGX Spark | ||
| 529 | Added: | ||
| 530 | Added: Save the following as `super-vl-gb200.yaml`: | ||
| 531 | Added: | ||
| 532 | Added: ```yaml | ||
| 533 | Added: trust_remote_code: true | ||
| 534 | Added: dtype: bfloat16 | ||
| 535 | Added: tensor_parallel_size: 1 | ||
| 536 | Added: moe_expert_parallel_size: 1 | ||
| 537 | Added: max_batch_size: 2 | ||
| 538 | Added: max_num_tokens: 4096 | ||
| 539 | Added: max_seq_len: 131072 | ||
| 540 | Added: | ||
| 541 | Added: enable_chunked_prefill: true | ||
| 542 | Added: disable_overlap_scheduler: false | ||
| 543 | Added: cuda_graph_config: null | ||
| 544 | Added: attn_backend: TRTLLM | ||
| 545 | Added: | ||
| 546 | Added: kv_cache_config: | ||
| 547 | Added: dtype: fp8 | ||
| 548 | Added: free_gpu_memory_fraction: 0.9 | ||
| 549 | Added: max_gpu_total_bytes: 5368709120 | ||
| 550 | Added: host_cache_size: 0 | ||
| 551 | Added: mamba_ssm_cache_dtype: float16 | ||
| 552 | Added: mamba_ssm_stochastic_rounding: false | ||
| 553 | Added: enable_block_reuse: true | ||
| 554 | Added: use_kv_cache_manager_v2: true | ||
| 555 | Added: mamba_state_config: | ||
| 556 | Added: enable_branch_snapshot: true | ||
| 557 | Added: | ||
| 558 | Added: nvfp4_gemm_config: | ||
| 559 | Added: allowed_backends: [cutlass, cublaslt, cuda_core] | ||
| 560 | Added: | ||
| 561 | Added: moe_config: | ||
| 562 | Added: backend: CUTEDSL | ||
| 563 | Added: | ||
| 564 | Added: speculative_config: | ||
| 565 | Added: decoding_type: DFlash | ||
| 566 | Added: speculative_model: ./models/super-vl-lilicorr | ||
| 567 | Added: max_draft_len: 7 | ||
| 568 | Added: attention_backend: TRTLLM | ||
| 569 | Added: context_recompute_tail: 0 | ||
| 570 | Added: | ||
| 571 | Added: guided_decoding_backend: xgrammar | ||
| 572 | Added: ``` | ||
| 573 | Added: | ||
| 574 | Added: ```bash | ||
| 575 | Added: trtllm-serve ./models/super-vl-nvfp4 \ | ||
| 576 | Added: --config super-vl-spark-lilicorr.yaml \ | ||
| 577 | Added: --served_model_name nemotron-3.5-super-vl \ | ||
| 578 | Added: --host 0.0.0.0 \ | ||
| 579 | Added: --port 8000 \ | ||
| 580 | Added: --reasoning_parser nemotron-v3 | ||
| 581 | Added: ``` | ||
| 582 | Added: | ||
| 583 | Added: ### API Client | ||
| 584 | Added: | ||
| 585 | Added: Install the OpenAI-compatible client: | ||
| 586 | Added: | ||
| 587 | Added: ```bash | ||
| 588 | Added: pip install openai | ||
| 589 | Added: ``` | ||
| 590 | Added: | ||
| 591 | Added: #### Text and reasoning | ||
| 592 | Added: | ||
| 593 | Added: ```python | ||
| 594 | Added: from openai import OpenAI | ||
| 595 | Added: | ||
| 596 | Added: client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY") | ||
| 597 | Added: model = "nemotron-3.5-super-vl" | ||
| 598 | Added: | ||
| 599 | Added: response = client.chat.completions.create( | ||
| 600 | Added: model=model, | ||
| 601 | Added: messages=[{"role": "user", "content": "Explain why binary search takes logarithmic time."}], | ||
| 602 | Added: temperature=1.0, | ||
| 603 | Added: top_p=0.95, | ||
| 604 | Added: max_tokens=16384, | ||
| 605 | Added: extra_body={"chat_template_kwargs": {"enable_thinking": True}}, | ||
| 606 | Added: ) | ||
| 607 | Added: choice = response.choices[0] | ||
| 608 | Added: if choice.finish_reason == "length": | ||
| 609 | Added: raise RuntimeError("The response reached max_tokens; increase the output budget.") | ||
| 610 | Added: print(choice.message.content) | ||
| 611 | Added: ``` | ||
| 612 | Added: | ||
| 613 | Added: Set `enable_thinking` to `False` to disable reasoning. For medium reasoning effort, use `{"enable_thinking": True, "medium_effort": True}`. Reasoning tokens and the final answer share the `max_tokens` budget. | ||
| 614 | Added: | ||
| 615 | Added: #### Images | ||
| 616 | Added: | ||
| 617 | Added: Use a multimodal server configuration. The example below sends a local image as a base64 data URL. | ||
| 618 | Added: | ||
| 619 | Added: ```python | ||
| 620 | Added: import base64 | ||
| 621 | Added: from pathlib import Path | ||
| 622 | Added: from openai import OpenAI | ||
| 623 | Added: | ||
| 624 | Added: client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY") | ||
| 625 | Added: image_bytes = Path("image.png").read_bytes() | ||
| 626 | Added: image_url = "data:image/png;base64," + base64.b64encode(image_bytes).decode() | ||
| 627 | Added: | ||
| 628 | Added: response = client.chat.completions.create( | ||
| 629 | Added: model="nemotron-3.5-super-vl", | ||
| 630 | Added: messages=[{"role": "user", "content": [ | ||
| 631 | Added: {"type": "text", "text": "Describe the image and any visible text."}, | ||
| 632 | Added: {"type": "image_url", "image_url": {"url": image_url}}, | ||
| 633 | Added: ]}], | ||
| 634 | Added: temperature=1.0, | ||
| 635 | Added: top_p=0.95, | ||
| 636 | Added: max_tokens=16384, | ||
| 637 | Added: ) | ||
| 638 | Added: if response.choices[0].finish_reason == "length": | ||
| 639 | Added: raise RuntimeError("The response reached max_tokens; increase the output budget.") | ||
| 640 | Added: print(response.choices[0].message.content) | ||
| 641 | Added: ``` | ||
| 642 | Added: | ||
| 643 | Added: #### Video with vLLM | ||
| 644 | Added: | ||
| 645 | Added: Use a multimodal vLLM configuration with the video sampling settings above. | ||
| 646 | Added: | ||
| 647 | Added: ```python | ||
| 648 | Added: import base64 | ||
| 649 | Added: from pathlib import Path | ||
| 650 | Added: from openai import OpenAI | ||
| 651 | Added: | ||
| 652 | Added: client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY") | ||
| 653 | Added: video_bytes = Path("video.mp4").read_bytes() | ||
| 654 | Added: video_url = "data:video/mp4;base64," + base64.b64encode(video_bytes).decode() | ||
| 655 | Added: | ||
| 656 | Added: response = client.chat.completions.create( | ||
| 657 | Added: model="nemotron-3.5-super-vl", | ||
| 658 | Added: messages=[{"role": "user", "content": [ | ||
| 659 | Added: {"type": "text", "text": "Summarize the events in this video in order."}, | ||
| 660 | Added: {"type": "video_url", "video_url": {"url": video_url}}, | ||
| 661 | Added: ]}], | ||
| 662 | Added: temperature=1.0, | ||
| 663 | Added: top_p=0.95, | ||
| 664 | Added: max_tokens=16384, | ||
| 665 | Added: ) | ||
| 666 | Added: if response.choices[0].finish_reason == "length": | ||
| 667 | Added: raise RuntimeError("The response reached max_tokens; increase the output budget.") | ||
| 668 | Added: print(response.choices[0].message.content) | ||
| 669 | Added: ``` | ||
| 670 | Added: | ||
| 671 | Added: #### Tool calling | ||
| 672 | Added: | ||
| 673 | Added: The model requests a tool call; the application executes it and returns the result. This complete example uses a local inventory lookup. | ||
| 674 | Added: | ||
| 675 | Added: ```python | ||
| 676 | Added: import json | ||
| 677 | Added: from openai import OpenAI | ||
| 678 | Added: | ||
| 679 | Added: client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY") | ||
| 680 | Added: model = "nemotron-3.5-super-vl" | ||
| 681 | Added: inventory = {"keyboard": 12, "monitor": 5} | ||
| 682 | Added: tools = [{"type": "function", "function": { | ||
| 683 | Added: "name": "get_inventory", | ||
| 684 | Added: "description": "Return the inventory count for a product.", | ||
| 685 | Added: "parameters": { | ||
| 686 | Added: "type": "object", | ||
| 687 | Added: "properties": {"product": {"type": "string", "enum": ["keyboard", "monitor"]}}, | ||
| 688 | Added: "required": ["product"], | ||
| 689 | Added: "additionalProperties": False, | ||
| 690 | Added: }, | ||
| 691 | Added: }}] | ||
| 692 | Added: messages = [{"role": "user", "content": "How many keyboards are in stock?"}] | ||
| 693 | Added: | ||
| 694 | Added: def complete(history, tool_choice="auto"): | ||
| 695 | Added: response = client.chat.completions.create( | ||
| 696 | Added: model=model, | ||
| 697 | Added: messages=history, | ||
| 698 | Added: tools=tools, | ||
| 699 | Added: tool_choice=tool_choice, | ||
| 700 | Added: temperature=1.0, | ||
| 701 | Added: top_p=0.95, | ||
| 702 | Added: max_tokens=16384, | ||
| 703 | Added: extra_body={"chat_template_kwargs": {"enable_thinking": True}}, | ||
| 704 | Added: ) | ||
| 705 | Added: choice = response.choices[0] | ||
| 706 | Added: if choice.finish_reason == "length": | ||
| 707 | Added: raise RuntimeError("The response was truncated; increase max_tokens.") | ||
| 708 | Added: return choice.message | ||
| 709 | Added: | ||
| 710 | Added: message = complete(messages) | ||
| 711 | Added: messages.append(message.model_dump(exclude_none=True)) | ||
| 712 | Added: if not message.tool_calls: | ||
| 713 | Added: print(message.content) | ||
| 714 | Added: else: | ||
| 715 | Added: for call in message.tool_calls: | ||
| 716 | Added: arguments = json.loads(call.function.arguments) | ||
| 717 | Added: if (call.function.name != "get_inventory" | ||
| 718 | Added: or not isinstance(arguments, dict) | ||
| 719 | Added: or set(arguments) != {"product"} | ||
| 720 | Added: or not isinstance(arguments["product"], str) | ||
| 721 | Added: or arguments["product"] not in inventory): | ||
| 722 | Added: raise ValueError("Invalid inventory tool call") | ||
| 723 | Added: product = arguments["product"] | ||
| 724 | Added: messages.append({ | ||
| 725 | Added: "role": "tool", | ||
| 726 | Added: "tool_call_id": call.id, | ||
| 727 | Added: "content": json.dumps({"product": product, "count": inventory[product]}), | ||
| 728 | Added: }) | ||
| 729 | Added: print(complete(messages, tool_choice="none").content) | ||
| 730 | Added: ``` | ||
| 731 | Added: | ||
| 732 | Added: ## Training, Testing, and Evaluation Datasets | ||
| 733 | Added: | ||
| 734 | Added: ### Training | ||
| 735 | Added: | ||
| 736 | Added: **Data Modality:** Text, images, and video | ||
| 737 | Added: **Foundation Training Data Size:** More than 20 trillion tokens | ||
| 738 | Added: **Image Training Data Size:** 1 Million to 1 Billion Images | ||
| 739 | Added: **Text Training Data Size:** More than 10 Trillion Tokens | ||
| 740 | Added: **Video Training Data Size:** 10,000 to 1 Million Hours | ||
| 741 | Added: **Foundation Data Collection Period:** 2013 to December 2025 | ||
| 742 | Added: **Data Collection Method:** Hybrid: automated, manually-collected, and synthetic | ||
| 743 | Added: **Labeling Method:** Hybrid: automated, manually-labeled, and synthetic | ||
| 744 | Added: | ||
| 745 | Added: The foundation corpus contains curated and synthetic text covering English, 19 other spoken languages, and 43 programming languages. Sources include webpages, dialogue, articles, code, and other written materials across math, science, legal, finance, and general knowledge domains. | ||
| 746 | Added: | ||
| 747 | Added: The post-training corpus includes reasoning, coding, tool use, instruction following, structured outputs, chat, safety, and long-context tasks, together with image and video understanding. Synthetic trajectories are filtered for structural correctness, repetition, and task validity. | ||
| 748 | Added: | ||
| 749 | Added: For more information about the datasets used to train this model, please see the [Public Summary of Training Content](https://assets.ngc.nvidia.com/products/api-catalog/nemotron-3.5-super-vl/Nemotron_3.5_Super_VL_EU_Training_Content_Summary.pdf) | ||
| 750 | Added: | ||
| 751 | Added: <details> | ||
| 752 | Added: <summary>Detailed dataset information</summary> | ||
| 753 | Added: | ||
| 754 | Added: #### **Base Pre-Training Corpus (Nemotron 3 Foundation)** | ||
| 755 | Added: | ||
| 756 | Added: The foundation of the model is trained on the Nemotron 3 corpus, comprising the following datasets from the [Nemotron Pretraining Datasets collection](https://huggingface.co/collections/nvidia/nemotron-pre-training-datasets): | ||
| 757 | Added: | ||
| 758 | Added: | Dataset Collection | Token Counts | Description | | ||
| 759 | Added: | :--- | :--- | :--- | | ||
| 760 | Added: | **Nemotron-CC-v2** & **v2.1** | 9.1T | A massive collection of English web data filtered from Common Crawl, including 2.5T+ tokens of new organic, translated, and synthetically rephrased content. | | ||
| 761 | Added: | **Nemotron-CC-Code-v1** | 427.9B | High-quality code tokens extracted from Common Crawl using the Lynx + LLM pipeline to preserve structure and equations. | | ||
| 762 | Added: | **Nemotron-Pretraining-Code-v1** & **v2** & **v3** | 1.7T | Curated GitHub code references with multi-stage filtering, deduplication, and large-scale synthetic code data. | | ||
| 763 | Added: | **Nemotron-CC-Math-v1** | 133.3B | High-quality math pre-training dataset preserving LaTeX formatting and mathematical structures. | | ||
| 764 | Added: | **Nemotron-Pretraining-Specialized-v1** & **v1.1** & **v1.2** & **Nemotron-Pretraining-SFT-v1** | 660.0B | Synthetic datasets targeting specialized domains such as STEM reasoning and scientific coding. | | ||
| 765 | Added: | **Nemotron-Pretraining-Legal-v1** | 4.3B | Synthetic datasets targeting the legal domain. | | ||
| 766 | Added: | ||
| 767 | Added: ### Public Datasets | ||
| 768 | Added: | ||
| 769 | Added: | Dataset | Collection Period | | ||
| 770 | Added: | :---- | :---- | | ||
| 771 | Added: | [GSM8K](https://github.com/openai/grade-school-math) | 4/23/2025 | | ||
| 772 | Added: | [CC-NEWS](https://commoncrawl.org/blog/news-dataset-available) | 4/23/2025 | | ||
| 773 | Added: | [Common Crawl](https://commoncrawl.org/) | 4/23/2025 | | ||
| 774 | Added: | [Wikimedia](https://dumps.wikimedia.org/) | 4/23/2025 | | ||
| 775 | Added: | [Bespoke-Stratos-17k](https://huggingface.co/datasets/bespokelabs/Bespoke-Stratos-17k) | 4/23/2025 | | ||
| 776 | Added: | [tigerbot-kaggle-leetcodesolutions-en-2k](https://huggingface.co/datasets/TigerResearch/tigerbot-kaggle-leetcodesolutions-en-2k) | 4/23/2025 | | ||
| 777 | Added: | [glaive-function-calling-v2](https://huggingface.co/datasets/glaiveai/glaive-function-calling-v2) | 4/23/2025 | | ||
| 778 | Added: | [APIGen Function-Calling](https://huggingface.co/datasets/Salesforce/xlam-function-calling-60k) | 4/23/2025 | | ||
| 779 | Added: | [LMSYS-Chat-1M](https://huggingface.co/datasets/lmsys/lmsys-chat-1m) | 4/23/2025 | | ||
| 780 | Added: | [Open Textbook Library - CC BY-SA & GNU subset](https://open.umn.edu/opentextbooks/textbooks/) and [OpenStax - CC BY-SA subset](https://openstax.org/) | 4/23/2025 | | ||
| 781 | Added: | [Advanced Reasoning Benchmark](https://github.com/TheDuckAI/arb), [tigerbot-kaggle-leetcodesolutions-en-2k](https://huggingface.co/datasets/TigerResearch/tigerbot-kaggle-leetcodesolutions-en-2k), [PRM800K](https://github.com/openai/prm800k), and [SciBench](https://github.com/mandyyyyii/scibench) | 4/23/2025 | | ||
| 782 | Added: | [FineWeb-2](https://huggingface.co/datasets/HuggingFaceFW/fineweb-2) | 4/23/2025 | | ||
| 783 | Added: | [Court Listener](https://www.courtlistener.com/help/api/bulk-data/) | Legacy Download | | ||
| 784 | Added: | [peS2o](https://huggingface.co/datasets/allenai/peS2o) | Legacy Download | | ||
| 785 | Added: | [OpenWebMath](https://huggingface.co/datasets/open-web-math/open-web-math) | Legacy Download | | ||
| 786 | Added: | [BioRxiv](https://www.biorxiv.org/tdm) | Legacy Download | | ||
| 787 | Added: | [PMC Open Access Subset](https://pmc.ncbi.nlm.nih.gov/tools/openftlist/) | Legacy Download | | ||
| 788 | Added: | [OpenWebText2](https://openwebtext2.readthedocs.io/en/latest/) | Legacy Download | | ||
| 789 | Added: | [Stack Exchange Data Dump](https://archive.org/details/stackexchange) | Legacy Download | | ||
| 790 | Added: | [PubMed Abstracts](https://github.com/thoppe/The-Pile-PubMed) | Legacy Download | | ||
| 791 | Added: | [NIH ExPorter](https://exporter.nih.gov/ExPORTER_Catalog.aspx) | Legacy Download | | ||
| 792 | Added: | [arXiv](https://info.arxiv.org/help/bulk_data/index.html) | Legacy Download | | ||
| 793 | Added: | [BigScience Workshop Datasets](https://github.com/bigscience-workshop/bigscience/tree/master/train/tr11-176B-ml#datasets) | Legacy Download | | ||
| 794 | Added: | [SEC's Electronic Data Gathering, Analysis, and Retrieval (EDGAR)](https://www.sec.gov/search-filings) | Legacy Download | | ||
| 795 | Added: | [Advanced Mathematical Problem Solving](https://github.com/hendrycks/math?tab=readme-ov-file) | Legacy Download | | ||
| 796 | Added: | [MathPile](https://github.com/GAIR-NLP/MathPile/) | Legacy Download | | ||
| 797 | Added: | [NuminaMath CoT](https://huggingface.co/datasets/AI-MO/NuminaMath-CoT) | Legacy Download | | ||
| 798 | Added: | [PMC Article](https://pmc.ncbi.nlm.nih.gov/tools/textmining/) | Legacy Download | | ||
| 799 | Added: | [FLAN](https://github.com/google-research/FLAN) | Legacy Download | | ||
| 800 | Added: | [Advanced Reasoning Benchmark](https://github.com/TheDuckAI/arb) | Legacy Download | | ||
| 801 | Added: | [SciBench](https://github.com/mandyyyyii/scibench) | Legacy Download | | ||
| 802 | Added: | [WikiTableQuestions](https://huggingface.co/datasets/wikitablequestions) | Legacy Download | | ||
| 803 | Added: | [FinQA](https://finqasite.github.io/) | Legacy Download | | ||
| 804 | Added: | [Riddles](https://github.com/crawsome/riddles) | Legacy Download | | ||
| 805 | Added: | [Problems in Elementary Mathematics for Home Study](https://archive.org/details/AntonovVygodskyNikitinSankinProblemsInElementaryMathematicsForHomeStudyMir1982) | Legacy Download | | ||
| 806 | Added: | [MedMCQA](https://huggingface.co/datasets/openlifescienceai/medmcqa) | Legacy Download | | ||
| 807 | Added: | [Cosmos QA](https://huggingface.co/datasets/allenai/cosmos_qa) | Legacy Download | | ||
| 808 | Added: | [MCTest](https://huggingface.co/datasets/sagnikrayc/mctest) | Legacy Download | | ||
| 809 | Added: | [AI2's Reasoning Challenge](https://huggingface.co/datasets/ai2_arc) | Legacy Download | | ||
| 810 | Added: | [OpenBookQA](https://github.com/allenai/OpenBookQA) | Legacy Download | | ||
| 811 | Added: | [MMLU Auxiliary Train](https://huggingface.co/datasets/cais/mmlu/viewer/all/auxiliary_train) | Legacy Download | | ||
| 812 | Added: | [social-chemestry-101](https://huggingface.co/datasets/tasksource/social-chemestry-101) | Legacy Download | | ||
| 813 | Added: | [Moral Stories](https://huggingface.co/datasets/demelin/moral_stories) | Legacy Download | | ||
| 814 | Added: | [The Common Pile v0.1](https://huggingface.co/common-pile) | Legacy Download | | ||
| 815 | Added: | [FineMath](https://huggingface.co/datasets/HuggingFaceTB/finemath) | Legacy Download | | ||
| 816 | Added: | [MegaMath](https://huggingface.co/datasets/LLM360/MegaMath) | Legacy Download | | ||
| 817 | Added: | [MultiverseMathHard](https://huggingface.co/datasets/Nexusflow/MultiverseMathHard) | 10/2/2025 | | ||
| 818 | Added: | [SWE-Gym](https://huggingface.co/datasets/SWE-Gym/SWE-Gym) | 10/2/2025 | | ||
| 819 | Added: | [WorkBench](https://github.com/olly-styles/WorkBench/tree/main/data/raw) | 10/2/2025 | | ||
| 820 | Added: | [WildChat-1M](https://huggingface.co/datasets/allenai/WildChat-1M) | 10/2/2025 | | ||
| 821 | Added: | [OpenCodeReasoning-2](https://huggingface.co/datasets/nvidia/OpenCodeReasoning-2) | 10/2/2025 | | ||
| 822 | Added: | [HelpSteer3](https://huggingface.co/datasets/nvidia/HelpSteer3) | 10/2/2025 | | ||
| 823 | Added: | [opc-sft-stage2](https://huggingface.co/datasets/OpenCoder-LLM/opc-sft-stage2) | 10/2/2025 | | ||
| 824 | Added: | [Big-Math-RL-Verified](https://huggingface.co/datasets/SynthLabsAI/Big-Math-RL-Verified) | 10/2/2025 | | ||
| 825 | Added: | [MetaMathQA](https://huggingface.co/datasets/meta-math/MetaMathQA) | 10/2/2025 | | ||
| 826 | Added: | [simple-arithmetic-problems](https://huggingface.co/datasets/garrethlee/simple-arithmetic-problems) | 10/2/2025 | | ||
| 827 | Added: | [arithmetic](https://huggingface.co/datasets/EleutherAI/arithmetic) | 10/2/2025 | | ||
| 828 | Added: | [Skywork-OR1-RL-Data](https://huggingface.co/datasets/Skywork/Skywork-OR1-RL-Data) | 10/2/2025 | | ||
| 829 | Added: | [FastChat](https://github.com/lm-sys/FastChat/blob/main/playground/data/dummy.json) | 10/2/2025 | | ||
| 830 | Added: | [News Commentary](https://opus.nlpl.eu/News-Commentary.php) | 10/2/2025 | | ||
| 831 | Added: | [Essential-Web](https://huggingface.co/datasets/EssentialAI/essential-web-v1.0) | 10/2/2025 | | ||
| 832 | Added: | [finepdfs](https://huggingface.co/datasets/HuggingFaceFW/finepdfs) | 10/2/2025 | | ||
| 833 | Added: | [HotpotQA](https://huggingface.co/hotpot_qa/datasets) | 10/2/2025 | | ||
| 834 | Added: | [SQuAD2.0](https://rajpurkar.github.io/SQuAD-explorer/) | 10/2/2025 | | ||
| 835 | Added: | [NLTK Words Lists](https://www.nltk.org/nltk_data/) | 10/2/2025 | | ||
| 836 | Added: | NVClip (NV-CC-Img-Text-Dataset) | 2022-2026 | | ||
| 837 | Added: | [ScaleCUA, Processed Training Subset](https://huggingface.co/datasets/OpenGVLab/ScaleCUA-Data) | 2022-2026 | | ||
| 838 | Added: | [RoboInter-VQA](https://huggingface.co/datasets/InternRobotics/RoboInter-VQA) | 2022-2026 | | ||
| 839 | Added: | [Open Images V6, Object-Detection Training Records](https://storage.googleapis.com/openimages/web/index.html) | 2022-2026 | | ||
| 840 | Added: | YT1B PLM Video QA, Custom No-Thinking and Safety-Filtered | 2022-2026 | | ||
| 841 | Added: | YT1B PLM Dense Captions, No-Thinking and Safety-Filtered | 2022-2026 | | ||
| 842 | Added: | [RoboVQA](https://robovqa.github.io/) | 2022-2026 | | ||
| 843 | Added: | YT1B PLM Thinking Traces, Safety-Filtered | 2022-2026 | | ||
| 844 | Added: | Boyi Short-Video QA | 2022-2026 | | ||
| 845 | Added: | Boyi Short-Video QA, Custom No-Thinking and Safety-Filtered | 2022-2026 | | ||
| 846 | Added: | K710 Video Classification, Full Training Snapshot | 2022-2026 | | ||
| 847 | Added: | Molmo2-VideoCapQA | 2022-2026 | | ||
| 848 | Added: | Molmo2-VideoCapQA, Custom No-Thinking and Safety-Filtered | 2022-2026 | | ||
| 849 | Added: | Molmo2-VideoPoint, Custom No-Thinking and Safety-Filtered | 2022-2026 | | ||
| 850 | Added: | Molmo2-VideoPoint | 2022-2026 | | ||
| 851 | Added: | ||
| 852 | Added: ### **Crawled and Scraped from Online Sources by NVIDIA** | ||
| 853 | Added: | ||
| 854 | Added: The English Common Crawl data was downloaded from the Common Crawl Foundation (see their FAQ for details on their crawling) and includes the snapshots CC-MAIN-2013-20 through CC-MAIN-2025-13. The data was subsequently deduplicated and filtered in various ways used in the Nemotron-CC data pipeline. Additionally, we extracted data for fifteen languages from the following three Common Crawl snapshots: CC-MAIN-2024-51, CC-MAIN-2025-08, CC-MAIN-2025-18. The fifteen languages included were Arabic, Chinese, Danish, Dutch, French, German, Italian, Japanese, Korean, Polish, Portuguese, Russian, Spanish, Swedish, and Thai. As we did not have reliable multilingual model-based quality classifiers available, we applied just heuristic filtering instead—similar to what we did for lower quality English data in the Nemotron-CC pipeline, but selectively removing some filters for some languages that did not work well. Deduplication was done in the same way as for Nemotron-CC. | ||
| 855 | Added: | ||
| 856 | Added: The GitHub Crawl was collected using the GitHub REST API and the Amazon S3 API. Each crawl was operated in accordance with the rate limits set by its respective source, either GitHub or S3. We collect raw source code and subsequently remove any having a license which does not exist in our permissive-license set. | ||
| 857 | Added: | ||
| 858 | Added: | Dataset | Modality | Dataset Size | Collection Period | Collecting Organisation | | ||
| 859 | Added: | :---- | :---- | :---- | :---- | :---- | | ||
| 860 | Added: | English Common Crawl | Text | 3.36T | 4/8/2025 | NVIDIA Advanced Deep Learning Research | | ||
| 861 | Added: | English Common Crawl 1.1 | Text | Not disclosed | 10/2/2025 | NVIDIA Advanced Deep Learning Research | | ||
| 862 | Added: | Multilingual Common Crawl | Text | 812.7B | 5/1/2025 | NVIDIA Advanced Deep Learning Research | | ||
| 863 | Added: | GitHub Crawl | Text | 747.4B | 4/29/2025 | NVIDIA Advanced Deep Learning Research | | ||
| 864 | Added: | GitHub Crawl 1.1 | Text | 172.7B | 9/30/2025 | NVIDIA Advanced Deep Learning Research | | ||
| 865 | Added: | [Sangraha](https://huggingface.co/datasets/ai4bharat/sangraha) | Text | 109,263,115 indexed source sequences: 77,231,480 verified and 32,031,635 unverified | Undisclosed | NVIDIA Advanced Deep Learning Research | | ||
| 866 | Added: | LITA Chunked Video Labels, Custom No-Thinking Dense Captions | Text (video labels) | 151,349 records | Undisclosed | NVIDIA Advanced Deep Learning Research| | ||
| 867 | Added: | LITA Chunked Video Labels, Cleaned v2 | Text (video labels) | 150,434 records | Undisclosed | NVIDIA Advanced Deep Learning Research | | ||
| 868 | Added: | Single-Page Document Labels, Qwen3.5 v2 | Text and images | 50,930 records | Undisclosed | NVIDIA Advanced Deep Learning Research | | ||
| 869 | Added: | Processed YouTube Videos, Cosmos Dense Captions | Text and video | 274,472 records | Undisclosed | NVIDIA Advanced Deep Learning Research | | ||
| 870 | Added: | ||
| 871 | Added: ## Private Non-publicly Accessible Datasets of Third Parties | ||
| 872 | Added: | ||
| 873 | Added: | Dataset | Model(s) used | | ||
| 874 | Added: |---------|---------------| | ||
| 875 | Added: | Global Regulation | Unknown | | ||
| 876 | Added: | TAUS Translation Memory | Unknown | | ||
| 877 | Added: | Scale HLE | Unknown | | ||
| 878 | Added: | HackerRank Coding | Unknown | | ||
| 879 | Added: | RL data for Search | Gemini 3; GPT-5 | | ||
| 880 | Added: | Mercor SWE-AgentsV1 | Undisclosed | | ||
| 881 | Added: | KeenSight Batch 1, Relabeled Subset | Qwen3.5-122B-A10B | | ||
| 882 | Added: | KeenSight Batch 1, Remaining Subset | Qwen3.5-122B-A10B | | ||
| 883 | Added: | Camio Multilingual OCR and Document Layout | Undisclosed | | ||
| 884 | Added: | Chinese Visual Question Answering, Relabeled Subset | Qwen3.5-122B-A10B | | ||
| 885 | Added: | Camio Chinese OCR, Cleaned Variant | Qwen3.5-122B-A10B | | ||
| 886 | Added: | Camio English OCR, Cleaned Variant | Qwen3.5-122B-A10B | | ||
| 887 | Added: | KeenSight Batch 2, Remaining Subset | Qwen3.5-122B-A10B | | ||
| 888 | Added: | KeenSight Batch 1, Safety-Filtered Trace Variant | Qwen3.5-122B-A10B | | ||
| 889 | Added: | Chinese Visual Question Answering, Safety-Filtered Trace Variant | Qwen3.5-122B-A10B | | ||
| 890 | Added: | Camio Chinese Question Answering, Verified-Correct Subset | Qwen3.5 | | ||
| 891 | Added: | KeenSight Chinese OCR, Filtered Subset | DeepSeek-OCR | | ||
| 892 | Added: | Camio Synthetic Trading-Graph Question Answering | Undisclosed | | ||
| 893 | Added: | Camio Synthetic Menu and Receipt Question Answering | Qwen3.5-122B-A10B | | ||
| 894 | Added: | Camio Chinese OCR, Formatted Variant | Qwen3.5-122B-A10B | | ||
| 895 | Added: | Camio Synthetic Time-Series Question Answering | Undisclosed | | ||
| 896 | Added: | Camio English OCR, Formatted Variant | Qwen3.5-122B-A10B | | ||
| 897 | Added: | Lean Formal Proofs — RL | Undisclosed | | ||
| 898 | Added: | Document-Grounded Finance Reasoning, Patch Tasks — RL | Undisclosed | | ||
| 899 | Added: | Math CoT — SFT | Kimi K3 | | ||
| 900 | Added: | Chat — SFT | Undisclosed | | ||
| 901 | Added: | Chat, Reasoning Off — SFT | Undisclosed | | ||
| 902 | Added: | Conversational Tool-Use Simulation — RL | Undisclosed | | ||
| 903 | Added: | Math CoT, Low Variant — SFT | Kimi K3 | | ||
| 904 | Added: | Document-Grounded Finance Reasoning — SFT | Undisclosed | | ||
| 905 | Added: | Safety Preference v0.3 — RL | Undisclosed | | ||
| 906 | Added: | Response-Length Instruction Following, Reasoning Off — SFT | Undisclosed | | ||
| 907 | Added: | Math Python TIR, Low Variant — SFT | Kimi K3 | | ||
| 908 | Added: | Math Python TIR — SFT | Kimi K3 | | ||
| 909 | Added: | General-Purpose Tool Calling — SFT | Qwen3.5-397B-A17B; Gemma-4-31B-it | | ||
| 910 | Added: | Knowledge Agent — SFT | Undisclosed | | ||
| 911 | Added: | DataFunnel arXiv Science4 v1.0 — RL | DeepSeek-V4-Flash (problem extraction); GLM-5.2 (refinement); Kimi K3 and K3 V5 (verification and filtering); Super 3.5 r14 (difficulty profiling); Qwen3-235B-A22B-Instruct-2507-FP8 (reward judging) | | ||
| 912 | Added: | Structured Outputs v3 — RL | gpt-oss-120b | | ||
| 913 | Added: | Response-Length Instruction Following — SFT | Undisclosed | | ||
| 914 | Added: | Filtered CUDA Coding — SFT | Undisclosed | | ||
| 915 | Added: | Reasoning Gym — RL | Undisclosed | | ||
| 916 | Added: | Competitive Coding Challenges v2 — SFT | GLM-5.2 | | ||
| 917 | Added: | Multi-Turn Instruction Following, Reasoning Off — SFT | Undisclosed | | ||
| 918 | Added: | Multi-Turn Instruction Following — SFT | Undisclosed | | ||
| 919 | Added: | Instruction Following, Filtered RLHF Prompts — SFT | Undisclosed | | ||
| 920 | Added: | Citation Formatting — RL | gpt-oss-120b | | ||
| 921 | Added: | Long-Context General Data — SFT | Undisclosed | | ||
| 922 | Added: | Free-Form Formatting — RL | gpt-oss-120b | | ||
| 923 | Added: | Structured Outputs v4 — RL | Undisclosed | | ||
| 924 | Added: | Tool-Call Schema — RL | No model used for RL conversion; source-generation models undisclosed | | ||
| 925 | Added: | Competitive Coding, OCR Python — SFT | DeepSeek-V4-Pro | | ||
| 926 | Added: | Lean Formal Proofs — SFT | gpt-oss-120b; Goedel-Prover-V2-32B; Qwen2.5-32B-Instruct | | ||
| 927 | Added: | Citation Instruction Following — RL | Undisclosed | | ||
| 928 | Added: | Search Graph Walks — SFT | MiniMax-M2 | | ||
| 929 | Added: | General-Purpose Tool Calling, Reasoning Off — SFT | Undisclosed | | ||
| 930 | Added: | Knowledge Agent Tau3, Reasoning Off — SFT | Undisclosed | | ||
| 931 | Added: | ARC-AGI Puzzle Reasoning — SFT | Kimi-K2.5; Qwen3-235B-A22B-Thinking-2507; DeepSeek-V3.2; Qwen3-Next-80B-A3B-Thinking; GLM-4.5-Air-FP8; gpt-oss-120b; GLM-4.7-FP8; Ring-1T; Ministral-3-14B-Reasoning-2512 | | ||
| 932 | Added: | Calendar — RL | Undisclosed | | ||
| 933 | Added: | ACEProof — SFT | Undisclosed | | ||
| 934 | Added: | Long Translation — SFT | Undisclosed | | ||
| 935 | Added: | Agentless Software Engineering — SFT | Undisclosed | | ||
| 936 | Added: | Long-Context PDF Translation v1.0 — SFT | DeepSeek-V4-Flash (translation generation); GPT-5.6 Sol (filtering and judging) | | ||
| 937 | Added: | KeenSight Batch 2, Relabeled and Filtered Subset | Qwen3.5-122B-A10B; Gemini 3 Flash Preview (filtering) | | ||
| 938 | Added: | Camio Chinese Letter QA, Cleaned `entrace_cleaned` Variant | Qwen3-VL-30B-A3B-Thinking-FP8; gpt-oss-120b; Qwen3.5-122B-A10B; GPT-4o mini (filtering and quality checks) | | ||
| 939 | Added: | Camio Chinese Letter QA, Cleaned Variant | Qwen3-VL-30B-A3B-Thinking-FP8; gpt-oss-120b; Qwen3.5-122B-A10B; GPT-4o mini (filtering and quality checks) | | ||
| 940 | Added: | Camio Chinese Text QA, Cleaned `entrace_cleaned` Variant | Qwen3-VL-30B-A3B-Thinking-FP8; gpt-oss-120b; Qwen3.5-122B-A10B; GPT-4o mini (filtering and quality checks) | | ||
| 941 | Added: | ||
| 942 | Added: | ||
| 943 | Added: ## Private Non-publicly Accessible Datasets by NVIDIA | ||
| 944 | Added: | ||
| 945 | Added: | Dataset | Model(s) used | | ||
| 946 | Added: |---------|---------------| | ||
| 947 | Added: | Simple Minesweeper | Undisclosed | | ||
| 948 | Added: | Simple Sudoku | Undisclosed | | ||
| 949 | Added: | Multitool Typewriter Hard | Undisclosed | | ||
| 950 | Added: | Machine Translation of News Commentary and TAUS Translation Memory | Undisclosed | | ||
| 951 | Added: | Machine Translation of STEM - | [Qwen2.5-14B-Instruct](https://huggingface.co/Qwen/Qwen2.5-14B-Instruct) | | ||
| 952 | Added: | Competitive Coding RL data from Nemotron Cascade | Undisclosed | | ||
| 953 | Added: | Long context RL | Undisclosed | | ||
| 954 | Added: | Single-step SWE RL for patch generation | Undisclosed | | ||
| 955 | Added: | OpenHands SWE | Undisclosed | | ||
| 956 | Added: | ||
| 957 | Added: ## NVIDIA-Sourced Synthetic Datasets (Pre-Training) | ||
| 958 | Added: | ||
| 959 | Added: | Dataset | Modality | Dataset Size | Seed Dataset | Model(s) used for generation | | ||
| 960 | Added: | :---- | :---- | :---- | :---- | :---- | | ||
| 961 | Added: | Nemotron-Pretraining-Fact-Seeking | Text | 35.0B | [FineWiki](https://huggingface.co/datasets/HuggingFaceFW/finewiki) | [Qwen3-30B-A3B-Instruct-2507](https://huggingface.co/Qwen/Qwen3-30B-A3B-Instruct-2507) | | ||
| 962 | Added: | Nemotron-Pretraining-Legal | Text | 4.3B | CommonPile (caselaw_access_project_filtered); California Code of Regulations; Judicial Ethics Opinions; [GLOBALCIT](https://globalcit.eu/); [CUAD](https://www.atticusprojectai.org/cuad); Nemotron Personas; [ToSDR Terms of Service Corpus](https://www.kaggle.com/datasets/sonu1607/tosdr-terms-of-service-corpus); CodeHima/TOS_Dataset; [ContractNLI](https://stanfordnlp.github.io/contract-nli/); CaseHOLD; Code of Federal Regulations; [Canadian Case Law](https://huggingface.co/datasets/a2aj/canadian-case-law) (subsets that allow commercial use) | [Qwen3-235B-A22B-Thinking-2507](https://huggingface.co/Qwen/Qwen3-235B-A22B-Thinking-2507) | | ||
| 963 | Added: | Nemotron-Pretraining-Formal-Logic | Text | 128M | [Nemotron Personas](https://huggingface.co/datasets/nvidia/Nemotron-Personas-USA) | [Qwen3-235B-A22B-Thinking-2507](https://huggingface.co/Qwen/Qwen3-235B-A22B-Thinking-2507) | | ||
| 964 | Added: | Nemotron-Pretraining-Economics | Text | 73.4M | - | [Qwen3-235B-A22B-Thinking-2507](https://huggingface.co/Qwen/Qwen3-235B-A22B-Thinking-2507) | | ||
| 965 | Added: | Nemotron-Pretraining-Multiple-Choice | Text | 1.6B | [MMLU Auxiliary Train](https://huggingface.co/datasets/cais/mmlu/viewer/all/auxiliary_train) | [DeepSeek-V3](https://huggingface.co/deepseek-ai/DeepSeek-V3); [Qwen3-235B-A22B](https://huggingface.co/Qwen/Qwen3-235B-A22B) | | ||
| 966 | Added: | Nemotron-Pretraining-Code-Concepts | Text | 7.3B | - | [gpt-oss-20b](https://huggingface.co/openai/gpt-oss-20b); [gpt-oss-120b](https://huggingface.co/openai/gpt-oss-120b) | | ||
| 967 | Added: | Nemotron-Pretraining-Unconditional-Algorithmic | Text | 196.5M | - | [gpt-oss-120b](https://huggingface.co/openai/gpt-oss-120b); [Qwen3-235B-A22B](https://huggingface.co/Qwen/Qwen3-235B-A22B) | | ||
| 968 | Added: | More Synthetic Tasks from DeepSeek-V3 and Qwen3-235B-A22B | Text | 1.1B | train splits of acp_bench; ai2_arc; babi; gsm8k; hendrycks_math; IFEval; MedText; mediqa_qa; mlqa; MMLU-Pro; mmlu-pro-plus; MMLU-ProX; nq_open; tinyGSM8k; truthful_qa; truthfulqa-multi; MATH-lighteval; mmlu; awesome-chatgpt-prompts; super_glue | [DeepSeek v3](https://huggingface.co/deepseek-ai/DeepSeek-V3); [Qwen3-235B-A22B](https://huggingface.co/Qwen/Qwen3-235B-A22B) | | ||
| 969 | Added: | Synthetic Tasks from DeepSeek-V3 and Qwen3-235B-A22B | Text | 6.7B | train splits of Into the Unknown; AI2 ARC (AI2 Reasoning Challenge); BLiMP (Benchmark of Linguistic Minimal Pairs); CommonSenseQA; GLUE; HeadQA; Hendrycks Ethics; Memo Trap; modus-tollens; NeQA; pattern-matching-suppression; mastermind_24_mcq_random; mastermind_24_mcq_close; quote-repetition; redefine-math; Repetitive Algebra; sig-figs; MMLU-Pro; MC-TACO; MedConceptsQA; MMLU_dataset; OpenbooksQA; PIQA (Physical Interaction Question Answering); SocialIQA; SuperGLUE; tinyAI2_arc; tinyMMLU; tinyWinogrande; TruthfulQA; WebQuestions; Winogrande; GPQA; MBPP | [DeepSeek v3](https://huggingface.co/deepseek-ai/DeepSeek-V3); [Qwen3-235B-A22B](https://huggingface.co/Qwen/Qwen3-235B-A22B) | | ||
| 970 | Added: | Synthetic Art of Problem Solving from DeepSeek-R1 | Text | 40B | [Art of Problem Solving](https://artofproblemsolving.com/company); [American Mathematics Competitions 8](https://artofproblemsolving.com/wiki/index.php/AMC_8_Problems_and_Solutions); [American Mathematics Competitions 10](https://artofproblemsolving.com/wiki/index.php/AMC_10_Problems_and_Solutions) | [DeepSeek-R1](https://huggingface.co/deepseek-ai/DeepSeek-R1) | | ||
| 971 | Added: | Synthetic Moral Stories and Social Chemistry from Qwen3-235B-A22B-Thinking-2507 and Mixtral-8x22B-v0.1 | Text | 15.2M | [social-chemestry-101](https://huggingface.co/datasets/tasksource/social-chemestry-101); [Moral Stories](https://huggingface.co/datasets/demelin/moral_stories) | [Qwen3-235B-A22B-Thinking-2507](https://huggingface.co/Qwen/Qwen3-235B-A22B-Thinking-2507); [Mixtral-8x22B-v0.1](https://huggingface.co/mistralai/Mixtral-8x22B-v0.1) | | ||
| 972 | Added: | Synthetic Moral Stories and Social Chemistry from Mixtral-8x22B-v0.1 | Text | 327M | [social-chemestry-101](https://huggingface.co/datasets/tasksource/social-chemestry-101); [Moral Stories](https://huggingface.co/datasets/demelin/moral_stories) | [Mixtral-8x22B-v0.1](https://huggingface.co/mistralai/Mixtral-8x22B-v0.1) | | ||
| 973 | Added: | Synthetic Social Sciences seeded with OpenStax from DeepSeek-V3, Mixtral-8x22B-v0.1, and Qwen2.5-72B | Text | 83.6M | [OpenStax - CC BY-SA subset](https://openstax.org/) | [DeepSeek-V3](https://huggingface.co/deepseek-ai/DeepSeek-V3); [Mixtral-8x22B-v0.1](https://huggingface.co/mistralai/Mixtral-8x22B-v0.1); [Qwen2.5-72B](https://huggingface.co/Qwen/Qwen2.5-72B) | | ||
| 974 | Added: | Synthetic Health Sciences seeded with OpenStax from DeepSeek-V3, Mixtral-8x22B-v0.1, and Qwen2.5-72B | Text | 9.7M | [OpenStax - CC BY-SA subset](https://openstax.org/) | [DeepSeek-V3](https://huggingface.co/deepseek-ai/DeepSeek-V3); [Mixtral-8x22B-v0.1](https://huggingface.co/mistralai/Mixtral-8x22B-v0.1); [Qwen2.5-72B](https://huggingface.co/Qwen/Qwen2.5-72B) | | ||
| 975 | Added: | Synthetic STEM seeded with OpenStax, Open Textbook Library, and GSM8K from DeepSeek-R1, DeepSeek-V3, DeepSeek-V3-0324, and Qwen2.5-72B | Text | 175M | [OpenStax - CC BY-SA subset](https://openstax.org/); [GSM8K](https://github.com/openai/grade-school-math); [Open Textbook Library - CC BY-SA & GNU subset](https://open.umn.edu/opentextbooks/textbooks/) | [DeepSeek-R1](https://huggingface.co/deepseek-ai/DeepSeek-R1), [DeepSeek-V3](https://huggingface.co/deepseek-ai/DeepSeek-V3); [DeepSeek-V3-0324](https://huggingface.co/deepseek-ai/DeepSeek-V3-0324); [Qwen2.5-72B](https://huggingface.co/Qwen/Qwen2.5-72B) | | ||
| 976 | Added: | [Nemotron-PrismMath](https://huggingface.co/datasets/nvidia/Nemotron-PrismMath) | Text | 4.6B | [Big-Math-RL-Verified](https://huggingface.co/datasets/SynthLabsAI/Big-Math-RL-Verified); [OpenR1-Math-220k](https://huggingface.co/datasets/open-r1/OpenR1-Math-220k) | [Qwen2.5-0.5B-instruct](https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct), [Qwen2.5-72B-Instruct](https://huggingface.co/Qwen/Qwen2.5-72B-Instruct); [DeepSeek-R1-Distill-Qwen-32B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-32B) | | ||
| 977 | Added: | Synthetic Question Answering Data from Papers and Permissible Books from Qwen2.5-72B-Instruct | Text | 350M | [arXiv](https://info.arxiv.org/help/bulk_data/index.html); [National Institutes of Health ExPorter](https://www.nih.gov/); [BioRxiv](https://www.biorxiv.org/tdm); [PMC Article](https://pmc.ncbi.nlm.nih.gov/tools/textmining/); [USPTO Backgrounds](https://data.uspto.gov/apis/transition-guide/bdss#pats); [peS2o](https://huggingface.co/datasets/allenai/peS2o); Global Regulation; [CORE](https://core.ac.uk/documentation/dataset); [PG-19](https://github.com/google-deepmind/pg19); [DOAB CC BY & CC BY-SA subset](https://www.doabooks.org/en); [NDLTD](https://ndltd.org/thesis-resources/global-etd-search/) | [Qwen2.5-72B-Instruct](https://huggingface.co/Qwen/Qwen2.5-72B-Instruct) | | ||
| 978 | Added: | Synthetic Rephrased [Math Data from Common Crawl](https://huggingface.co/datasets/nvidia/Nemotron-MIND) from phi-4 | Text | 73B | [Common Crawl](https://commoncrawl.org/latest-crawl) | [phi-4](https://huggingface.co/microsoft/phi-4) | | ||
| 979 | Added: | Synthetic Math Data from Common Crawl 4plus | Text | 52.3B | [Common Crawl](https://commoncrawl.org/latest-crawl) | [phi-4](https://huggingface.co/microsoft/phi-4) | | ||
| 980 | Added: | Synthetic Math Data from Common Crawl 3 | Text | 80.9B | [Common Crawl](https://commoncrawl.org/latest-crawl) | [phi-4](https://huggingface.co/microsoft/phi-4) | | ||
| 981 | Added: | Synthetic AGIEval seeded with AQUA-RAT, LogiQA, and AR-LSAT from DeepSeek-V3 and DeepSeek-V3-0324 | Text | 4.0B | [AQUA-RAT](https://huggingface.co/datasets/deepmind/aqua_rat); [LogiQA](https://huggingface.co/datasets/lucasmccabe/logiqa); [AR-LSAT](https://github.com/zhongwanjun/AR-LSAT) | [DeepSeek-V3](https://huggingface.co/deepseek-ai/DeepSeek-V3); [DeepSeek-V3-0324](https://huggingface.co/deepseek-ai/DeepSeek-V3-0324) | | ||
| 982 | Added: | Synthetic AGIEval seeded with AQUA-RAT, LogiQA, and AR-LSAT from Qwen3-30B-A3B | Text | 4.2B | [AQUA-RAT](https://huggingface.co/datasets/deepmind/aqua_rat); [LogiQA](https://huggingface.co/datasets/lucasmccabe/logiqa); [AR-LSAT](https://github.com/zhongwanjun/AR-LSAT) | [Qwen3-30B-A3B](https://huggingface.co/Qwen/Qwen3-30B-A3B) | | ||
| 983 | Added: | Synthetic Art of Problem Solving from Qwen2.5-32B-Instruct, Qwen2.5-Math-72B, Qwen2.5-Math-7B, and Qwen2.5-72B-Instruct | Text | Undisclosed | [Art of Problem Solving](https://artofproblemsolving.com/company); [American Mathematics Competitions 8](https://artofproblemsolving.com/wiki/index.php/AMC_8_Problems_and_Solutions); [American Mathematics Competitions 10](https://artofproblemsolving.com/wiki/index.php/AMC_10_Problems_and_Solutions); [GSM8K](https://github.com/openai/grade-school-math); [PRM800K](https://github.com/openai/prm800k) | [Qwen2.5-32B-Instruct](https://huggingface.co/Qwen/Qwen2.5-32B-Instruct); [Qwen2.5-Math-72B](https://huggingface.co/Qwen/Qwen2.5-Math-72B); [Qwen2.5-Math-7B](https://huggingface.co/Qwen/Qwen2.5-Math-7B); [Qwen2.5-72B-Instruct](https://huggingface.co/Qwen/Qwen2.5-72B-Instruct) | | ||
| 984 | Added: | Synthetic MMLU Auxiliary Train from DeepSeek-R1 | Text | 0.5B | [MMLU Auxiliary Train](https://huggingface.co/datasets/cais/mmlu/viewer/all/auxiliary_train) | [DeepSeek-R1](https://huggingface.co/deepseek-ai/DeepSeek-R1) | | ||
| 985 | Added: | Synthetic Long Context Continued Post-Training Data from Papers and Permissible Books from Qwen2.5-72B-Instruct | Text | Undisclosed | [arXiv](https://info.arxiv.org/help/bulk_data/index.html); [National Institutes of Health ExPorter](https://www.nih.gov/); [BioRxiv](https://www.biorxiv.org/tdm); [PMC Article](https://pmc.ncbi.nlm.nih.gov/tools/textmining/); [USPTO Backgrounds](https://data.uspto.gov/apis/transition-guide/bdss#pats); [peS2o](https://huggingface.co/datasets/allenai/peS2o); Global Regulation; [CORE](https://core.ac.uk/documentation/dataset); [PG-19](https://github.com/google-deepmind/pg19); [DOAB CC BY & CC BY-SA subset](https://www.doabooks.org/en); [NDLTD](https://ndltd.org/thesis-resources/global-etd-search/) | [Qwen2.5-72B-Instruct](https://huggingface.co/Qwen/Qwen2.5-72B-Instruct) | | ||
| 986 | Added: | Synthetic Common Crawl from Qwen3-30B-A3B and Mistral-Nemo-12B-Instruct | Text | 415.8B | [Common Crawl](https://commoncrawl.org/) | [Qwen3-30B-A3B](https://huggingface.co/Qwen/Qwen3-30B-A3B); [Mistral-NeMo-12B-Instruct](https://huggingface.co/nvidia/Mistral-NeMo-12B-Instruct) | | ||
| 987 | Added: | Synthetic Multilingual Data from Common Crawl from Qwen3-30B-A3B | Text | Undisclosed | [Common Crawl](https://commoncrawl.org/) | [Qwen3-30B-A3B](https://huggingface.co/Qwen/Qwen3-30B-A3B) | | ||
| 988 | Added: | Synthetic Multilingual Data from Wikimedia from Qwen3-30B-A3B | Text | Undisclosed | [Wikimedia](https://dumps.wikimedia.org/) | [Qwen3-30B-A3B](https://huggingface.co/Qwen/Qwen3-30B-A3B) | | ||
| 989 | Added: | Synthetic Math Data from Wikimedia from Nemotron-4-340B-Instruct | Text | Undisclosed | - | [Nemotron-4-340B-Instruct](https://huggingface.co/nvidia/Nemotron-4-340B-Instruct) | | ||
| 990 | Added: | Synthetic Common Crawl Code from phi-4 | Text | 427.9B | [Common Crawl](https://commoncrawl.org/latest-crawl) | [phi-4](https://huggingface.co/microsoft/phi-4) | | ||
| 991 | Added: | Synthetic Scientific Coding from Qwen3-235B-A22B | Text | 1.2B | [Wikimedia](https://dumps.wikimedia.org/) | [Qwen3-235B-A22B](https://huggingface.co/Qwen/Qwen3-235B-A22B-Instruct-2507) | | ||
| 992 | Added: | Tool Calling Data | Text | 26.2B | - | [Qwen3-235B-A22B-2507](https://huggingface.co/Qwen/Qwen3-235B-A22B-Instruct-2507); [gpt-oss-120b](https://huggingface.co/openai/gpt-oss-120b) | | ||
| 993 | Added: | Synthetic Essential-Web from QwQ-32B | Text | 28.1B | [Essential-Web](https://huggingface.co/datasets/EssentialAI/essential-web-v1.0) | [QwQ-32B](https://huggingface.co/Qwen/QwQ-32B) | | ||
| 994 | Added: | Translated Synthetic Crawl | Text | 389.9B | [Common Crawl](https://commoncrawl.org/) | [Qwen3-30B-A3B](https://huggingface.co/Qwen/Qwen3-30B-A3B) | | ||
| 995 | Added: | Translated Synthetic Wikipedia | Text | 7.9B | [Wikimedia](https://dumps.wikimedia.org/) | [Qwen3-30B-A3B](https://huggingface.co/Qwen/Qwen3-30B-A3B) | | ||
| 996 | Added: | Synthetic Long Context from Qwen3-235B-A22B-Instruct-2507 | Text | Undisclosed | [CORE](https://core.ac.uk/documentation/dataset); [PG-19](https://github.com/google-deepmind/pg19); [DOAB CC BY & CC BY-SA subset](https://www.doabooks.org/en); [NDLTD](https://ndltd.org/thesis-resources/global-etd-search/) | [Qwen3-235B-A22B-Instruct-2507](https://huggingface.co/Qwen/Qwen3-235B-A22B-Instruct-2507) | | ||
| 997 | Added: | Synthetic Search STEM OPENQ from DeepSeek-R1-0528 | Text | Undisclosed | - | [DeepSeek-R1-0528](https://huggingface.co/deepseek-ai/DeepSeek-R1-0528) | | ||
| 998 | Added: | Synthetic MCQ from Qwen2.5-32B-Instruct and DeepSeek-R1-0528 | Text | Undisclosed | - | [Qwen2.5-32B-Instruct](https://huggingface.co/Qwen/Qwen2.5-32B-Instruct); [DeepSeek-R1-0528](https://huggingface.co/deepseek-ai/DeepSeek-R1-0528) | | ||
| 999 | Added: | Synthetic Offline Search MCQA HLE from DeepSeek-R1-0528 | Text | Undisclosed | - | [DeepSeek-R1-0528](https://huggingface.co/deepseek-ai/DeepSeek-R1-0528) | | ||
| 1000 | Added: | Synthetic Offline Search MCQA GPQA from Qwen3-235B-A22B and DeepSeek-R1-0528 | Text | Undisclosed | - | [Qwen3-235B-A22B](https://huggingface.co/Qwen/Qwen3-235B-A22B); [DeepSeek-R1-0528](https://huggingface.co/deepseek-ai/DeepSeek-R1-0528) | | ||
| 1001 | Added: | Synthetic Human Preference from QwQ-32B, Qwen3-30B-A3B, Qwen3-235B-A22B, Qwen3-235B-A22B-Instruct-2507, Mistral-Small-3.1-24B-Instruct-2503, Mistral-Small-3.2-24B-Instruct-2506, MiniMax-M1-80k, MiniMax-M1-40k, Kimi-K2-Instruct, DeepSeek-V3-0324, DeepSeek-R1-0528 | Text | Undisclosed | - | [QwQ-32B](https://huggingface.co/Qwen/QwQ-32B); [Qwen3-30B-A3B](https://huggingface.co/Qwen/Qwen3-30B-A3B); [Qwen3-235B-A22B](https://huggingface.co/Qwen/Qwen3-235B-A22B); [Qwen3-235B-A22B-Instruct-2507](https://huggingface.co/Qwen/Qwen3-235B-A22B-Instruct-2507); [Mistral-Small-3.1-24B-Instruct-2503](https://huggingface.co/mistralai/Mistral-Small-3.1-24B-Instruct-2503); [Mistral-Small-3.2-24B-Instruct-2506](https://huggingface.co/mistralai/Mistral-Small-3.2-24B-Instruct-2506); [MiniMax-M1-80k](https://huggingface.co/MiniMaxAI/MiniMax-M1-80k); [MiniMax-M1-40k](https://huggingface.co/MiniMaxAI/MiniMax-M1-40k); [Kimi-K2-Instruct](https://huggingface.co/moonshotai/Kimi-K2-Instruct); [DeepSeek-V3-0324](https://huggingface.co/deepseek-ai/DeepSeek-V3-0324); [DeepSeek-R1-0528](https://huggingface.co/deepseek-ai/DeepSeek-R1-0528) | | ||
| 1002 | Added: | Synthetic WildChat-1M and arena-human-preference-140k from DeepSeek-R1, gemma-2-2b-it, gemma-3-27b-it, gpt-oss-20b, gpt-oss-120b, Mistral-7B-Instruct-v0.3, Mixtral-8x22B-Instruct-v0.1, Nemotron-4-340B-Instruct, NVIDIA-Nemotron-Nano-9B-v2, Phi-4-mini-instruct, Phi-3-small-8k-instruct, Phi-3-medium-4k-instruct, Qwen3-235B-A22B, QwQ-32B | Text | Undisclosed | [WildChat-1M](https://huggingface.co/datasets/allenai/WildChat-1M); [arena-human-preference-140k](https://huggingface.co/datasets/lmarena-ai/arena-human-preference-140k) | [DeepSeek-R1](https://huggingface.co/deepseek-ai/DeepSeek-R1); [gemma-2-2b-it](https://huggingface.co/google/gemma-2-2b-it); [gemma-3-27b-it](https://huggingface.co/google/gemma-3-27b-it); [gpt-oss-20b](https://huggingface.co/openai/gpt-oss-20b); [gpt-oss-120b](https://huggingface.co/openai/gpt-oss-120b); [Mistral-7B-Instruct-v0.3](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.3); [Mixtral-8x22B-Instruct-v0.1](https://huggingface.co/mistralai/Mixtral-8x22B-Instruct-v0.1); [Nemotron-4-340B-Instruct](https://huggingface.co/nvidia/Nemotron-4-340B-Instruct); [NVIDIA-Nemotron-Nano-9B-v2](https://huggingface.co/nvidia/NVIDIA-Nemotron-Nano-9B-v2); [Phi-4-mini-instruct](https://huggingface.co/microsoft/Phi-4-mini-instruct); [Phi-3-small-8k-instruct](https://huggingface.co/microsoft/Phi-3-small-8k-instruct); [Phi-3-medium-4k-instruct](https://huggingface.co/microsoft/Phi-3-medium-4k-instruct); [Qwen3-235B-A22B](https://huggingface.co/Qwen/Qwen3-235B-A22B); [QwQ-32B](https://huggingface.co/Qwen/QwQ-32B) | | ||
| 1003 | Added: | Synthetic Code from Qwen3-32B | Text | Undisclosed | English Common Crawl; English Common Crawl 1.1 | [Qwen3-32B](https://huggingface.co/Qwen/Qwen3-32B) | | ||
| 1004 | Added: | Synthetic OpenCodeReasoning from DeepSeek-R1 | Text | Undisclosed | [OpenCodeReasoning](https://huggingface.co/datasets/nvidia/OpenCodeReasoning) | [DeepSeek-R1](https://huggingface.co/deepseek-ai/DeepSeek-R1) | | ||
| 1005 | Added: | Synthetic OpenCodeReasoning from DeepSeek-R1-0528 | Text | Undisclosed | [OpenCodeReasoning](https://huggingface.co/datasets/nvidia/OpenCodeReasoning) | [DeepSeek-R1-0528](https://huggingface.co/deepseek-ai/DeepSeek-R1-0528) | | ||
| 1006 | Added: | Synthetic HackerRank Coding from DeepSeek-R1-0528 | Text | Undisclosed | HackerRank Coding Dataset | [DeepSeek-R1-0528](https://huggingface.co/deepseek-ai/DeepSeek-R1-0528) | | ||
| 1007 | Added: | Synthetic LIMO from DeepSeek-R1-0528 | Text | Undisclosed | [LIMO](https://huggingface.co/datasets/GAIR/LIMO) | [DeepSeek-R1-0528](https://huggingface.co/deepseek-ai/DeepSeek-R1-0528) | | ||
| 1008 | Added: | Synthetic SCP from DeepSeek-R1-0528 | Text | Undisclosed | [SCP-116K](https://huggingface.co/datasets/EricLu/SCP-116K) | [DeepSeek-R1-0528](https://huggingface.co/deepseek-ai/DeepSeek-R1-0528) | | ||
| 1009 | Added: | Synthetic Stack Exchange from DeepSeek-R1-0528 | Text | Undisclosed | [Stack Exchange](https://archive.org/details/stackexchange) | [DeepSeek-R1-0528](https://huggingface.co/deepseek-ai/DeepSeek-R1-0528) | | ||
| 1010 | Added: | Synthetic Stack Exchange from gpt-oss-120b and Qwen2.5-32B-Instruct | Text | Undisclosed | [Stack Exchange](https://archive.org/details/stackexchange) | [gpt-oss-120b](https://huggingface.co/openai/gpt-oss-120b); [Qwen2.5-32B-Instruct](https://huggingface.co/Qwen/Qwen2.5-32B-Instruct) | | ||
| 1011 | Added: | Synthetic Stack Exchange from gpt-oss-120b | Text | Undisclosed | [Stack Exchange](https://archive.org/details/stackexchange) | [gpt-oss-120b](https://huggingface.co/openai/gpt-oss-120b) | | ||
| 1012 | Added: | Synthetic Art of Problem Solving from gpt-oss-120b and Qwen2.5-32B-Instruct | Text | Undisclosed | [Art of Problem Solving](https://artofproblemsolving.com/company); [American Mathematics Competitions 8](https://artofproblemsolving.com/wiki/index.php/AMC_8_Problems_and_Solutions); [American Mathematics Competitions 10](https://artofproblemsolving.com/wiki/index.php/AMC_10_Problems_and_Solutions) | [gpt-oss-120b](https://huggingface.co/openai/gpt-oss-120b); [Qwen2.5-32B-Instruct](https://huggingface.co/Qwen/Qwen2.5-32B-Instruct) | | ||
| 1013 | Added: | Synthetic Common Crawl from Qwen3-30B-A3B | Text | Undisclosed | [Common Crawl](https://commoncrawl.org/) | [Qwen3-30B-A3B](https://huggingface.co/Qwen/Qwen3-30B-A3B) | | ||
| 1014 | Added: | Synthetic Wikipedia from Qwen3-30B-A3B | Text | Undisclosed | [Wikimedia](https://dumps.wikimedia.org/) | [Qwen3-30B-A3B](https://huggingface.co/Qwen/Qwen3-30B-A3B) | | ||
| 1015 | Added: | Synthetic Essential-Web from Qwen3-30B-A3B and Qwen3-235B-A22B-Thinking-2507 | Text | Undisclosed | [Essential-Web](https://huggingface.co/datasets/EssentialAI/essential-web-v1.0) | [Qwen3-30B-A3B](https://huggingface.co/Qwen/Qwen3-30B-A3B); [Qwen3-235B-A22B-Thinking-2507](https://huggingface.co/Qwen/Qwen3-235B-A22B-Thinking-2507) | | ||
| 1016 | Added: | Synthetic Essential-Web from gpt-oss-120b | Text | Undisclosed | [Essential-Web](https://huggingface.co/datasets/EssentialAI/essential-web-v1.0) | [gpt-oss-120b](https://huggingface.co/openai/gpt-oss-120b) | | ||
| 1017 | Added: | Synthetic Textbook Math from Qwen3-30B-A3B, Qwen3-235B-A22B, phi-4 | Text | Undisclosed | [Common Crawl](https://commoncrawl.org/); [FineMath](https://huggingface.co/datasets/HuggingFaceTB/finemath) | [Qwen3-30B-A3B](https://huggingface.co/Qwen/Qwen3-30B-A3B); [Qwen3-235B-A22B](https://huggingface.co/Qwen/Qwen3-235B-A22B); [phi-4](https://huggingface.co/microsoft/phi-4) | | ||
| 1018 | Added: | Synthetic Math and Code from DeepSeek-R1 and DeepSeek-R1-0528 | Text | Undisclosed | [Magicoder-Evol-Instruct-110K](https://huggingface.co/datasets/ise-uiuc/Magicoder-Evol-Instruct-110K); [opc-sft-stage2](https://huggingface.co/datasets/OpenCoder-LLM/opc-sft-stage2); [TACO](https://huggingface.co/datasets/BAAI/TACO); [OpenCodeReasoning](https://huggingface.co/datasets/nvidia/OpenCodeReasoning); [OpenMathReasoning](https://huggingface.co/datasets/nvidia/OpenMathReasoning); [NuminaMath CoT](https://huggingface.co/datasets/AI-MO/NuminaMath-CoT) | [DeepSeek-R1](https://huggingface.co/deepseek-ai/DeepSeek-R1); [DeepSeek-R1-0528](https://huggingface.co/deepseek-ai/DeepSeek-R1-0528) | | ||
| 1019 | Added: | Synthetic Math from gpt-oss-120b and Qwen2.5-32B-Instruct | Text | Undisclosed | - | [gpt-oss-120b](https://huggingface.co/openai/gpt-oss-120b); [Qwen2.5-32B-Instruct](https://huggingface.co/Qwen/Qwen2.5-32B-Instruct) | | ||
| 1020 | Added: | Synthetic OpenMathReasoning from gpt-oss-120b and Qwen2.5-32B-Instruct | Text | Undisclosed | [OpenMathReasoning](https://huggingface.co/datasets/nvidia/OpenMathReasoning) | [gpt-oss-120b](https://huggingface.co/openai/gpt-oss-120b); [Qwen2.5-32B-Instruct](https://huggingface.co/Qwen/Qwen2.5-32B-Instruct) | | ||
| 1021 | Added: | Synthetic KernelBook from DeepSeek-R1-0528 | Text | Undisclosed | [KernelBook](https://huggingface.co/datasets/GPUMODE/KernelBook) | [DeepSeek-R1-0528](https://huggingface.co/deepseek-ai/DeepSeek-R1-0528) | | ||
| 1022 | Added: | Synthetic Scale HLE from gpt-oss-120b | Text | Undisclosed | Scale HLE | [gpt-oss-120b](https://huggingface.co/openai/gpt-oss-120b) | | ||
| 1023 | Added: | Synthetic CDQuestions from gpt-oss-120b | Text | Undisclosed | [CDQuestions](https://cdquestions.com/) | [gpt-oss-120b](https://huggingface.co/openai/gpt-oss-120b) | | ||
| 1024 | Added: | Synthetic GPQA from gpt-oss-120b and Qwen2.5-32B-Instruct | Text | Undisclosed | [Stack Exchange](https://archive.org/details/stackexchange) | [gpt-oss-120b](https://huggingface.co/openai/gpt-oss-120b); [Qwen2.5-32B-Instruct](https://huggingface.co/Qwen/Qwen2.5-32B-Instruct) | | ||
| 1025 | Added: | Synthetic Vedantu from gpt-oss-120b | Text | Undisclosed | [Vedantu](https://www.vedantu.com/) | [gpt-oss-120b](https://huggingface.co/openai/gpt-oss-120b) | | ||
| 1026 | Added: | Synthetic Search STEM MCQ from Qwen3-235B-A22B and DeepSeek-R1-0528 | Text | Undisclosed | - | [Qwen3-235B-A22B](https://huggingface.co/Qwen/Qwen3-235B-A22B); [DeepSeek-R1-0528](https://huggingface.co/deepseek-ai/DeepSeek-R1-0528) | | ||
| 1027 | Added: | Synthetic OpenSTEM from Qwen2.5-32B-Instruct and DeepSeek-R1-0528 | Text | Undisclosed | - | [Qwen2.5-32B-Instruct](https://huggingface.co/Qwen/Qwen2.5-32B-Instruct); [DeepSeek-R1-0528](https://huggingface.co/deepseek-ai/DeepSeek-R1-0528) | | ||
| 1028 | Added: | Synthetic MCQ10 from DeepSeek-R1-0528 | Text | Undisclosed | - | [DeepSeek-R1-0528](https://huggingface.co/deepseek-ai/DeepSeek-R1-0528) | | ||
| 1029 | Added: | Synthetic MCQ4 from Qwen3-235B-A22B, DeepSeek-R1-0528, and Qwen3-235B-A22B-Instruct-2507 | Text | Undisclosed | - | [Qwen3-235B-A22B](https://huggingface.co/Qwen/Qwen3-235B-A22B); [DeepSeek-R1-0528](https://huggingface.co/deepseek-ai/DeepSeek-R1-0528); [Qwen3-235B-A22B-Instruct-2507](https://huggingface.co/Qwen/Qwen3-235B-A22B-Instruct-2507) | | ||
| 1030 | Added: | Indic SDG for Nemotron | Text | 711,276,565 indexed source-sequence entries; final training-blend count not confirmed | nvidia/Nemotron-CC-v2 | google/gemma-4-31B-it; google/gemma-4-31B-it-assistant | | ||
| 1031 | Added: | ||
| 1032 | Added: ## NVIDIA-Sourced Synthetic Datasets (Post-Training) | ||
| 1033 | Added: | ||
| 1034 | Added: | Dataset | Modality | Dataset Size | Seed Dataset | Model(s) used for generation | | ||
| 1035 | Added: | :---- | :---- | :---- | :---- | :---- | | ||
| 1036 | Added: | Synthetic Single-Step Tool Use — RL | Text | Approximately 1,433,203 samples | Handwritten prompts; no external seed data | DeepSeek-V3.2; DeepSeek-R1-0528; Qwen3-235B-A22B-Thinking-2507; Qwen3-32B | | ||
| 1037 | Added: | Synthetic Sparse Tables with Mixed Prompts | Text and images | 100,000 records | Generated in-house; no external seed data | None; generated without an SDG model | | ||
| 1038 | Added: | Synthetic Single-Step Tool Use — RL | Text | Approximately 1,433,203 samples | Handwritten prompts; no external seed data | DeepSeek-V3.2; DeepSeek-R1-0528; Qwen3-235B-A22B-Thinking-2507; Qwen3-32B | | ||
| 1039 | Added: | Synthetic Sparse Tables with Mixed Prompts | Text and images | 100,000 records | Generated in-house; no external seed data | None; generated without an SDG model | | ||
| 1040 | Added: | Synthetic Competitive MATH Proofs from DeepSeek-V4-Pro | Text | Undisclosed | [AMC 8 Problems and Solutions, AMC 10 Problems and Solution, and AIME Problems and Solutions] | [deepseek-ai/DeepSeek-V4-Pro] | | ||
| 1041 | Added: | Synthetic Hermes Agent Reasoning Traces | Text | Undisclosed | [lambda/hermes-agent-reasoning-traces] | [hermes-agent-generator] | | ||
| 1042 | Added: | Synthetic Competitive Coding from DeepSeek-V4-Pro | Text | Undisclosed | [NVCompetitiveCodingV1] | [deepseek-ai/DeepSeek-V4-Pro] | | ||
| 1043 | Added: | Synthetic Competitive Science Reasoning from DeepSeek-V4-Pro | Text | Undisclosed | [AMC 8 Problems and Solutions, AMC 10 Problems and Solution, and AIME Problems and Solutions]; [EssentialAI/essential-web-v1.0]; [cdquestions.com]; [Pile-FreeLaw]; [Vedantu]; [askfilo]; [doubtnut]; [ICHO-IPH0 Dataset]; [LIMO dataset (Less is More for Reasoning)]; [AAPT]; [ChemData 700K]; [oMeBench]; [Flavor Analysis and Recognition Transformer]; [ChemCoTBench]; [Llama Nemotron Dataset] | [deepseek-ai/DeepSeek-V4-Pro] | | ||
| 1044 | Added: | Synthetic Competitive MATH CoT and TIR from Nemotron 5.5 | Text | Undisclosed | [Pile-FreeLaw]; [AMC 8 Problems and Solutions, AMC 10 Problems and Solution, and AIME Problems and Solutions] | [Nemotron 5.5] | | ||
| 1045 | Added: | Vendor Terminal Bench-like Tasks from Mercor | Text | Undisclosed | [Terminal bench like tasks curated by the vendor] | [Undisclosed - purchased dataset] | | ||
| 1046 | Added: | Turing Math Data Pack | Text | Undisclosed | [Turing Math Data Pack dataset] | [Undisclosed - purchased dataset] | | ||
| 1047 | Added: | Synthetic Holdout, Skywork, DAPO, and Turing Math from GPT-5.5 | Text | Undisclosed | [DocQA-RL-1.6K]; [DAPO-Math-17k] | [GPT-5.5] | | ||
| 1048 | Added: | Synthetic Long Context RL from QwenLong L1 and DocQA-RL-1.6K | Text | Undisclosed | [DocQA-RL-1.6K] | Undisclosed | | ||
| 1049 | Added: | Synthetic Competitive Coding Gym Tasks | Text | Undisclosed | [NVCompetitiveCodingV1.1] | Undisclosed | | ||
| 1050 | Added: | Synthetic Finance SEC Search Agent from GPT-OSS-120B and Qwen3 | Text | Undisclosed | [SEC filings from sec.gov] | [GPT-OSS-120B]; [Qwen3-235B-A22B-Instruct]; [Qwen3-4B-Instruct] | | ||
| 1051 | Added: | Synthetic Structured Outputs from Qwen3-30B-A3B-Instruct-2507, Qwen3-30B-A3B-Thinking-2507, Qwen3-235B-A22B-Instruct-2507, and Qwen3-235B-A22B-Thinking-2507 | Text | Undisclosed | [Nemotron-RL-agent-structured-outputs-v1] | [Qwen3-30B-A3B-Instruct-2507]; [Qwen3-235B-A22B-Instruct-2507] | | ||
| 1052 | Added: | Synthetic Long Context Equivalence Rule from Qwen3-235B-A22B-Thinking-2507 and DeepSeek-R1 | Text | Undisclosed | [Long-context SFT data] | [Qwen/Qwen3-235B-A22B-Thinking-2507]; [Deepseek-ai/DeepSeek-R1] | | ||
| 1053 | Added: | Synthetic Science RL Data Blend from Qwen2.5-32B | Text | Undisclosed | [doubtnut]; [Pile-FreeLaw]; [Llama Nemotron Dataset]; [askfilo]; [EssentialAI/essential-web-v1.0]; [Vedantu]; [auxiliary_train]; [cdquestions.com]; [AMC 8 Problems and Solutions, AMC 10 Problems and Solution, and AIME Problems and Solutions]; [AAPT]; [ICHO-IPH0 Dataset]; [LIMO dataset (Less is More for Reasoning)] | [Qwen2.5-32B] | | ||
| 1054 | Added: | Synthetic Abstention Data from Nemotron Super v3 | Text | Undisclosed | [Go abstention Dataset] | [nvidia/nvidia/nemotron-3-super-v3] | | ||
| 1055 | Added: | Synthetic Chemistry Data from Nemotron Super v3 | Text | Undisclosed | [ChemData 700K] | [nvidia/nvidia/nemotron-3-super-v3] | | ||
| 1056 | Added: | Synthetic Tool Call Schema for RL | Text | 469,983 | [UltraTool]; [ToolEyes]; [AutoTools]; [API-Bank]; [Nemotron-Personas-USA]; [Salesforce xLAM function-calling]; [Glaive function-calling-v2]; [Agent-Ark/Toucan-1.5M] | [DeepSeek-V3.2]; [GLM-4.6]; [gpt-oss-120b]; [Kimi-K2-Instruct] | | ||
| 1057 | Added: | Synthetic Freeform Text Formatting from GPT-OSS-120B | Text | Undisclosed | [In-house data] | [GPT OSS 120B - Apache 2.0] | | ||
| 1058 | Added: | Synthetic Citation Formatting from GPT-OSS-120B | Text | Undisclosed | [In-house data] | [GPT OSS 120B - Apache 2.0] | | ||
| 1059 | Added: | Droid Harness Pivot Vendor Data | Text | Undisclosed | [Droid Harness Pivot vendor data] | Undisclosed | | ||
| 1060 | Added: | Synthetic HotpotQA Training Data from Qwen3-235B | Text | Undisclosed | [HotpotQA] | [Qwen3-235B] | | ||
| 1061 | Added: | Synthetic Natural Language Math Proofs from Nemotron 5.5 | Text | Undisclosed | [AMC8, AMC10, and AIME problem sets hosted on Art of Problem Solving]; [Pile-StackExchange] | [Nemotron 5.5] | | ||
| 1062 | Added: | Synthetic Stack Overflow OpenQ | Text | Undisclosed | [Pile-FreeLaw] | Undisclosed | | ||
| 1063 | Added: | Chemistry Ether0 Vendor Data | Text | Undisclosed | [Chemistry ether0 vendor data] | Undisclosed | | ||
| 1064 | Added: | Synthetic Litmus-Bench Chemistry from ChEMBL | Text | Undisclosed | [ChEMBL]; [Nemo Gym RL dataset generated from ChEMBL with RDKit] | Undisclosed | | ||
| 1065 | Added: | Synthetic ZINC Chemistry from Nemotron Super v3 | Text | Undisclosed | [ZINC] | [Nemotron Super v3] | | ||
| 1066 | Added: | ARC-AGI Gym Environment | Text | Undisclosed | [ARC-AGI-2] | [ARC-AGI-2] | | ||
| 1067 | Added: | Synthetic Agentic Search Tool-Use from DeepSeek-V3.2 | Text | Undisclosed | [Mercor Data] | [DeepSeek-V3.2] | | ||
| 1068 | Added: | Synthetic Text-To-SQL | Text | 96,564 | [In-house Text-to-SQL data] | [gpt-oss-120b] | | ||
| 1069 | Added: | Dialog Memory Vendor Data | Text | Undisclosed | [Patronus external vendor agreement] | Undisclosed | | ||
| 1070 | Added: | Synthetic Indirect Prompt Injection from Nemotron Super v3 and Qwen3-Next-80B-A3B-Instruct | Text | Undisclosed | [In-house indirect prompt injection data] | [nvidia/nemotron-3-super-v3, qwen/qwen3-next-80b-a3b-instruct] | | ||
| 1071 | Added: | Synthetic Malicious Code and Agentic Security | Text | Undisclosed | [In-house malicious-code / agentic-security data] | Undisclosed | | ||
| 1072 | Added: | Synthetic Single-Step SWE Patch Selection | Text | Undisclosed | [SWE-Gym Dataset]; [SWE Bench Verified Benchmark] | [ground truth and task checks] | | ||
| 1073 | Added: | Synthetic Natural Language Math Final Answers from Nemotron 5.5 | Text | Undisclosed | [AMC8, AMC10, and AIME problem sets hosted on Art of Problem Solving]; [Pile-StackExchange] | [nemotron 5.5] | | ||
| 1074 | Added: | Synthetic Simple Math Prompts for Token Efficiency | Text | Undisclosed | [In-house simple math prompts] | Undisclosed | | ||
| 1075 | Added: | Synthetic Abstention Data from Nemotron Super v3 (CRAG) | Text | Undisclosed | [CRAG] | [nvidia/nvidia/nemotron-3-super-v3] | | ||
| 1076 | Added: | Synthetic Agentless SWE | Text | 242,536 | [SWE-Rebench-V2]; [SWEbench Training Set]; [R2E-Gym/R2E-Gym-Subset]; [SWE-Gym/SWE-Gym]; [SWE-Rebench] | [openai/gpt-oss-120b] | | ||
| 1077 | Added: | Synthetic Agentless SWE from DeepSeek-R1-0528 | Text | 209,976 | [SWE-Bench-Train]; [SWE-Fixer-Train]; [SWE-reBench]; [SWE-Smith] | [deepseek-ai/DeepSeek-R1-0528] | | ||
| 1078 | Added: | Synthetic Agentic CUDA Traces from GLM-4.7 | Text | 2,276 | [Internal CUDA task data] | [GLM-4.7] | | ||
| 1079 | Added: | Synthetic Math Proofs from DeepSeek-V3.2-Speciale | Text | 820,772 | [Nemotron-Math-Proofs-v1] | [SDG: DeepSeek-V3.2-Speciale]; [Filter: proof validation] | | ||
| 1080 | Added: | Synthetic Multilingual SFT from DeepSeek-V3 | Text | 1,245,284 | [Nano v3 SFT data] | [DeepSeek-V3] | | ||
| 1081 | Added: | Synthetic Agentic Code from gpt-oss-120b | Text | 109,086 | [NVAgenticCLIPrompts-v1]; [NVAgenticSkills-v1]; [NVAgenticCLIMultiTurnPrompts-v1] | [openai/gpt-oss-120b] | | ||
| 1082 | Added: | Synthetic Agentic CLI and Web Skills from gpt-oss-120b | Text | 27,418 | [NVAgenticCLIPrompts-v1]; [NVAgenticSkills-v1]; [NVAgenticCLIMultiTurnPrompts-v1]; [NVAgenticCLIPrompts-Web-v1] | [openai/gpt-oss-120b] | | ||
| 1083 | Added: | Synthetic Agentic Coding from gpt-oss-120b | Text | 160,531 | [NVAgenticCLIPrompts-v1]; [NVAgenticSkills-v1]; [NVAgenticCLIMultiTurnPrompts-v1]; [NVAgenticCLIPrompts-Web-v1] | [openai/gpt-oss-120b] | | ||
| 1084 | Added: | Synthetic OpenCode Agentic Tasks from gpt-oss-120b | Text | 614,773 | [NVAgenticCLIPrompts-v1]; [NVAgenticSkills-v1]; [NVAgenticCLIMultiTurnPrompts-v1]; [NVAgenticCLIPrompts-Web-v1] | [openai/gpt-oss-120b] | | ||
| 1085 | Added: | Synthetic SWE Unverified | Text | Undisclosed | [NVAgenticCLIPrompts-v1]; [NVAgenticSkills-v1]; [NVAgenticCLIMultiTurnPrompts-v1]; [NVAgenticCLIPrompts-Web-v1] | [gpt-oss-120b]; [Qwen/Qwen3-Coder-480B-A35B-Instruct]; [GLM-4.7-Flash] | | ||
| 1086 | Added: | Synthetic ARC-AGI Ultra Data | Text | 192,016 | [ARC-AGI-2]; [arc dataset collection] | [ARC-AGI-2] | | ||
| 1087 | Added: | Synthetic LiveCodeBench TIR from DeepSeek-R1-0528 | Text | 1,283,398 | [Nemotron-X training datasets] | [DeepSeek-R1-0528] | | ||
| 1088 | Added: | Synthetic Verilog and SystemVerilog Code from DeepSeek-R1-0528 and GPT-OSS-120B | Text | 1,233,247 | [Verilog/SystemVerilog seed code] | [SDR: DeepSeek R1 0528 and GPT-OSS-120B]; [Filtering: Claude 4 Sonnet] | | ||
| 1089 | Added: | Synthetic Aider Python Tasks from DeepSeek-R1-0528 | Text | 236,099 | [Exercism (GitHub Python)] | [Deepseek R1 0528] | | ||
| 1090 | Added: | Synthetic Chat Reasoning-Off Data from GLM-5 | Text | 646,738 | [lmarena-ai/repochat-arena-preference-4k user prompts] | [Multi-turn conversations generated by GLM-5 with best-of-4 selection via Qwen3-Nemotron-235B-A22B-GenRM] | | ||
| 1091 | Added: | Synthetic Chat Reasoning-On Data from GLM-5 | Text | 644,286 | [lmarena-ai/repochat-arena-preference-4k user prompts]; [lmarena-ai/arena-expert-5k user prompts]; [lmarena-ai/arena-human-preference-55k user prompts]; [lmarena-ai/arena-human-preference-100k user prompts]; [lmarena-ai/arena-human-preference-140k user prompts] | [Multi-turn conversations generated by GLM-5 with best-of-4 selection via Qwen3-Nemotron-235B-A22B-GenRM] | | ||
| 1092 | Added: | Synthetic Multilingual Safety from Riva-Translate-4B-Instruct-v1.1 | Text | 132,067 | [Safety SFT Data: Ultra] | [nvidia/Riva-Translate-4B-Instruct-v1.1] | | ||
| 1093 | Added: | Synthetic Science Reasoning Effort Medium | Text | 502,722 | [science-reasoning-effort-medium-v0] | Undisclosed | | ||
| 1094 | Added: | Synthetic Telecom Tool-Use Trajectories from gpt-oss-120b | Text | 12,455 | [Existing Tau2 telecom trajectories originally generated with DeepSeek V3.2] | [gpt-oss-120b] | | ||
| 1095 | Added: | Synthetic Terminal Bench Data from OpenReasoningv2 | Text | Undisclosed | [OpenCodeReasoningv2]; [OpenMathReasoning]; [nemo-swe-bench-repos]; [SWE-Rebench]; [SWE-Fixer-110K] | [OpenReasoningv2] | | ||
| 1096 | Added: | Synthetic Tulu Instruction Following from DeepSeek-R1-0528 | Text | 105,361 | [Nemotron-X training datasets] | [DeepSeek-R1-0528] | | ||
| 1097 | Added: | Synthetic Instruction Following from gpt-oss-120b | Text | 151,988 | [IFEval]; [IFEvalG] | [gpt-oss-120b] | | ||
| 1098 | Added: | Synthetic Instruction Following for RL | Text | Undisclosed | [WildChat-1M]; [LMSYS-340B-Eval Dataset]; [LMSYS-Chat-1M Prompts]; [IFEval]; [IFEvalG] | [Qwen/Qwen3-235B-A22B-Thinking-2507]; [gpt-oss-120b]; [Qwen3-235B-A22B-Instruct-2507] | | ||
| 1099 | Added: | Synthetic Identity Data from Qwen3-Next-80B-A3B-Instruct and Qwen3-235B-A22B-Instruct-2507 | Text | 25,992 | [Hand-written prompts] | [Qwen3-Next-80B-A3B-Instruct]; [Qwen3-235B-A22B-Instruct-2507] | | ||
| 1100 | Added: | Synthetic Terminus Ultra Agentic Reasoning Blend | Text | 96,881 | [ARC-AGI-2]; [OpenCodeReasoningv2]; [OpenMathReasoning]; [SWE-Fixer-110K]; [SWE-Rebench]; [SWE-Smith] | [DeepSeek-V3.2]; [Qwen3-235B-A22B-Thinking-2507]; [Ring-1T]; [Kimi-K2.5]; [GLM-4.7-FP8]; [Qwen3-Next-80B-A3B-Thinking]; [gpt-oss-120b]; [Ministral-3-14B-Reasoning-2512]; [LM-4.5-Air-FP8] | | ||
| 1101 | Added: | Synthetic STEM from Qwen3-235B-A22B-Thinking-2507 | Text | 1,174,694 | [IChO-IPhO-RL-v2]; [Physics-Big Dataset]; Scale HLE; [OpenMathReasoning]; [OpenCodeReasoning] | [Qwen3-235B-A22B-Thinking-2507] | | ||
| 1102 | Added: | Synthetic STEM from Qwen3-235B-A22B-Instruct-2507 and gpt-oss-120b | Text | Undisclosed | [arXiv]; [National Institutes of Health ExPorter]; [BioRxiv]; [PMC Article]; [USPTO Backgrounds]; [peS2o]; Global Regulation; [CORE]; [PG-19]; [DOAB CC BY & CC BY-SA subset]; [NDLTD] | [Qwen3-235B-A22B-Instruct-2507]; [gpt-oss-120b] | | ||
| 1103 | Added: | Translation Data from TAUS | Text | 1,618,055 | [TAUS proprietary dataset] | Undisclosed | | ||
| 1104 | Added: | Synthetic Art of Problem Solving and Stack Exchange from gpt-oss-120b, Qwen2.5-32B-Instruct, and Goedel-Prover-V2-32B | Text | 860,469 | [Nemotron-Math-Proofs-v1] | [Goedel-Prover-V2-32B] | | ||
| 1105 | Added: | Synthetic Art of Problem Solving and Stack Exchange from gpt-oss-120b | Text | 1,201,815 | [Upstream released math dataset]; [AoPS]; [StackOverflow / StackExchange] | [gpt-oss-120b] | | ||
| 1106 | Added: | Synthetic Multilingual Science and Code data from DeepSeek-R1, DeepSeek-R1-0528, Qwen2.5-32B-Instruct, and Qwen3-235B-A22B, translated with Qwen2.5-32B-Instruct and Qwen2.5-14B-Instruct | Text | Undisclosed | [Nano-V3 SFT Data (without tool call)] | [Qwen/Qwen2.5-14B-Instruct]; [Qwen/Qwen3-4B-Thinking-2507] | | ||
| 1107 | Added: | Synthetic Multilingual Science and Code data from DeepSeek-R1, DeepSeek-R1-0528, Qwen2.5-32B-Instruct, and Qwen3-235B-A22B, translated with Qwen2.5-32B-Instruct and Qwen2.5-14B-Instruct (Stack Exchange lineage) | Text | Undisclosed | [Stack Exchange]; [SCP-116K]; [LIMO]; [TACO]; Code Contest; Codeforces | [DeepSeek-R1]; [DeepSeek-R1-0528]; [Qwen2.5-32B-Instruct]; [Qwen3-235B-A22B] | | ||
| 1108 | Added: | Synthetic Search Graph Walk | Text | 6,977 | [Wikidata / Wikipedia KnowledgeBase] | [MiniMaxAI/MiniMax-M2] | | ||
| 1109 | Added: | Synthetic Agentic Diverse Domains | Text | 281,537 | [Handwritten prompts (synthetic; no external seed data used)] | [SDG model: deepseek-ai/DeepSeek-V3.2, deepseek-ai/DeepSeek-R1-0528, Qwen/Qwen3-235B-A22B-Thinking-2507, Qwen/Qwen3-32B]; [Filtering model: openai/gpt-oss-120b, Qwen/Qwen3-32B, Qwen/Qwen3-235B-A22B-Instruct-2507] | | ||
| 1110 | Added: | Synthetic Long Context from Qwen3-235B-A22B-Instruct-2507 | Text | Undisclosed | [Long-context SFT seed blend (pre-training blend + nano-v1 post-training data)]; [Long-context SFT data: lc_nothink 256k, MRCR 200k, RULER 256k]; [AALCR seed blend: SEC Filings, CC, Wikipedia, FinePDFs, ArXiv, Pile-NIH ExPorter, BioRxiv, PMC Article, USPTO Backgrounds, peS2o, Global Regulations, CORE, Gutenberg (PG-19), DOAB CC-BY, NDLTD, Amps, StackExchange, MathPile, Numinas] | [Qwen/Qwen3-235B-A22B-Thinking-2507]; [deepseek-ai/DeepSeek-R1]; [Qwen3-30B-A3B] | | ||
| 1111 | Added: | Synthetic Nemotron Math SFT from DeepSeek-V3.2-Speciale | Text | 1,900,553 | [Nemotron-Math-v2 (AOPS and StackExchange-math problems)] | [DeepSeek-V3.2-Speciale] | | ||
| 1112 | Added: | Synthetic Nemotron Math TIR from DeepSeek-V3.2 | Text | 1,789,258 | [Nemotron-Math-v2 (AOPS and StackExchange-math problems)] | [DeepSeek-V3.2] | | ||
| 1113 | Added: | Synthetic NemoCascade OCR Distillation from gpt-oss-120b | Text | 682,864 | [Nemotron-X training datasets] | [gpt-oss-120b] | | ||
| 1114 | Added: | Synthetic CUDA 100k | Text | 93,086 | [KernelBook]; [HuggingFace Transformers]; [FlashInfer] | [gpt-oss-120b]; [DeepSeek-R1-0528] | | ||
| 1115 | Added: | Synthetic Science MCQ and QA Diversity from GPT-OSS and Kimi-K2 | Text | 30,358 | [doubtnut]; [Pile-FreeLaw]; [Llama Nemotron Dataset]; [askfilo]; [EssentialAI/essential-web-v1.0]; [Vedantu]; [auxiliary_train]; [cdquestions.com]; [AMC 8 Problems and Solutions, AMC 10 Problems and Solution, and AIME Problems and Solutions]; [AAPT]; [ICHO-IPH0 Dataset]; [LIMO dataset (Less is More for Reasoning)] | [GPT-OSS]; [Kimi-K2] | | ||
| 1116 | Added: | Synthetic Science HLE with Python from GPT-OSS and Kimi-K2 | Text | 85,184 | [doubtnut]; [Pile-FreeLaw]; [Llama Nemotron Dataset]; [askfilo]; [EssentialAI/essential-web-v1.0]; [Vedantu]; [auxiliary_train]; [cdquestions.com]; [AMC 8 Problems and Solutions, AMC 10 Problems and Solution, and AIME Problems and Solutions]; [AAPT]; [ICHO-IPH0 Dataset]; [LIMO dataset (Less is More for Reasoning)] | [GPT-OSS]; [Kimi-K2] | | ||
| 1117 | Added: | Synthetic Science Search and Python from GPT-OSS and Kimi-K2 | Text | 6,179 | [doubtnut]; [Pile-FreeLaw]; [Llama Nemotron Dataset]; [askfilo]; [EssentialAI/essential-web-v1.0]; [Vedantu]; [auxiliary_train]; [cdquestions.com]; [AMC 8 Problems and Solutions, AMC 10 Problems and Solution, and AIME Problems and Solutions]; [AAPT]; [ICHO-IPH0 Dataset]; [LIMO dataset (Less is More for Reasoning)] | [GPT-OSS]; [Kimi-K2] | | ||
| 1118 | Added: | Synthetic Science Search from GPT-OSS and Kimi-K2 | Text | 32,554 | [doubtnut]; [Pile-FreeLaw]; [Llama Nemotron Dataset]; [askfilo]; [EssentialAI/essential-web-v1.0]; [Vedantu]; [auxiliary_train]; [cdquestions.com]; [AMC 8 Problems and Solutions, AMC 10 Problems and Solution, and AIME Problems and Solutions]; [AAPT]; [ICHO-IPH0 Dataset]; [LIMO dataset (Less is More for Reasoning)] | [GPT-OSS]; [Kimi-K2] | | ||
| 1119 | Added: | Synthetic Finance Reasoning from GPT-OSS-120B and Qwen3-235B-A22B-Instruct-2507 | Text | 326,700 | [SEC filings] | [GPT-OSS-120B, Qwen3-235B-A22B-Instruct-2507] | | ||
| 1120 | Added: | Synthetic Science Diversity MCQ from GPT-OSS and Kimi-K2 | Text | 532,942 | [doubtnut]; [Pile-FreeLaw]; [Llama Nemotron Dataset]; [askfilo]; [EssentialAI/essential-web-v1.0]; [Vedantu]; [auxiliary_train]; [cdquestions.com]; [AMC 8 Problems and Solutions, AMC 10 Problems and Solution, and AIME Problems and Solutions]; [AAPT]; [ICHO-IPH0 Dataset]; [LIMO dataset (Less is More for Reasoning)] | [GPT-OSS]; [Kimi-K2] | | ||
| 1121 | Added: | Synthetic Science Diversity OpenQ from GPT-OSS and Kimi-K2 | Text | 131,045 | [doubtnut]; [Pile-FreeLaw]; [Llama Nemotron Dataset]; [askfilo]; [EssentialAI/essential-web-v1.0]; [Vedantu]; [auxiliary_train]; [cdquestions.com]; [AMC 8 Problems and Solutions, AMC 10 Problems and Solution, and AIME Problems and Solutions]; [AAPT]; [ICHO-IPH0 Dataset]; [LIMO dataset (Less is More for Reasoning)] | [GPT-OSS]; [Kimi-K2] | | ||
| 1122 | Added: | Synthetic Science Reasoning No-Tool from GPT-OSS and Kimi-K2 | Text | 2,085,600 | [doubtnut]; [Pile-FreeLaw]; [Llama Nemotron Dataset]; [askfilo]; [EssentialAI/essential-web-v1.0]; [Vedantu]; [auxiliary_train]; [cdquestions.com]; [AMC 8 Problems and Solutions, AMC 10 Problems and Solution, and AIME Problems and Solutions]; [AAPT]; [ICHO-IPH0 Dataset]; [LIMO dataset (Less is More for Reasoning)] | [GPT-OSS]; [Kimi-K2] | | ||
| 1123 | Added: | Synthetic Text-To-SQL from gpt-oss-120b | Text | Undisclosed | [In-house Text-to-SQL data] | [gpt-oss-120b] | | ||
| 1124 | Added: | Synthetic Tool Call Schema for RL (extended) | Text | 707,967 | [UltraTool]; [ToolEyes]; [AutoTools]; [API-Bank]; [Nemotron-Personas-USA]; [Salesforce xLAM function-calling]; [Glaive function-calling-v2]; [Agent-Ark/Toucan-1.5M] | [DeepSeek-V3.2]; [GLM-4.6]; [gpt-oss-120b]; [Kimi-K2-Instruct] | | ||
| 1125 | Added: | Synthetic Safety from gemma-3-4b-it, Nemotron-Nano-9B-v2, and gpt-oss-120b | Text | 44,091 | [Safety SFT Data] | [google/gemma-3-4b-it]; [Nemotron-Nano-9B-v2]; [gpt-oss-120b] | | ||
| 1126 | Added: | Synthetic Safety from DeepSeek-R1-0528, gpt-oss-120b, DeepSeek-R1-Distill-Qwen-7B, and Mixtral-8x7B-v0.1 | Text | Undisclosed | [Nemotron Content Safety Dataset V2]; [Gretel Synthetic Safety Alignment Dataset]; [RedTeam-2K]; [Malicious Tasks]; [Nemotron-Personas-USA] | [DeepSeek-R1-0528]; [gpt-oss-120b]; [DeepSeek-R1-Distill-Qwen-7B]; [Qwen3-30B-A3B-Thinking-2507]; [Qwen3-235B-A22B-Instruct-2507]; [Mixtral-8x7B-v0.1] | | ||
| 1127 | Added: | Synthetic Tool Calling from Qwen3-235B-A22B-Thinking-2507 and Qwen3-Next-80B-A3B-Thinking | Text | Undisclosed | [ToolBench]; [glaive-function-calling-v2]; [APIGen Function-Calling]; [Nemotron-Personas-USA] | [Qwen3-235B-A22B-Thinking-2507]; [Qwen3-Next-80B-A3B-Thinking] | | ||
| 1128 | Added: | Synthetic Chat from gpt-oss-120b, Mixtral-8x22B-Instruct-v0.1, Qwen3-235B-A22B-Instruct-2507, and Qwen3-235B-A22B-Thinking-2507 | Text | Undisclosed | [C4]; [LMSYS-Chat-1M]; [ShareGPT]; [GSM8K]; [PRM800K]; [FinQA]; [WikiTableQuestions]; [Riddles]; [glaive-function-calling-v2]; [SciBench]; [tigerbot-kaggle-leetcodesolutions-en-2k]; [OpenBookQA]; [Advanced Reasoning Benchmark]; Software Heritage; [Khan Academy Math Keywords]; [WildChat-1M]; [Nemotron-Personas-USA] | [gpt-oss-120b]; [Mixtral-8x22B-Instruct-v0.1]; [Qwen3-235B-A22B-Instruct-2507]; [Qwen3-235B-A22B-Thinking-2507] | | ||
| 1129 | Added: | Synthetic Tool Use Interactive Agent from gpt-oss-120b, DeepSeek-R1-0528, Qwen3-32B, and Qwen3-235B-A22B-Thinking-2507 | Text | Undisclosed | NVIDIA Internal | [gpt-oss-120b]; [DeepSeek-R1-0528]; [Qwen3-32B]; [Qwen3-235B-A22B-Thinking-2507] | | ||
| 1130 | Added: | Synthetic DocFinQA and SWE-smith from Qwen3-Coder-480B-A35B-Instruct and Kimi-K2-Thinking | Text | Undisclosed | [DocFinQA]; [SWE-smith] | [Qwen3-Coder-480B-A35B-Instruct]; [Kimi-K2-Thinking] | | ||
| 1131 | Added: | Synthetic SWE-Gym from Qwen3-Coder-480B-A35B-Instruct | Text | Undisclosed | [SWE-Gym] | [Qwen3-Coder-480B-A35B-Instruct] | | ||
| 1132 | Added: | Synthetic SWE-Gym and R2E-Gym-Subset from Qwen3-Coder-480B-A35B-Instruct | Text | Undisclosed | [SWE-Gym]; [R2E-Gym-Subset] | [Qwen3-Coder-480B-A35B-Instruct] | | ||
| 1133 | Added: | Synthetic SWE-Gym and R2E-Gym-Subset from DeepSeek-R1-0528 | Text | Undisclosed | [SWE-Gym]; [R2E-Gym-Subset] | [DeepSeek-R1-0528] | | ||
| 1134 | Added: | Synthetic HelpSteer, LMSYS-Chat-1M, and Nemotron-Personas-USA from gpt-oss-120b, Qwen3-235B-A22B-Instruct-2507, and Qwen3-235B-A22B-Thinking-2507 | Text | Undisclosed | [HelpSteer2]; [HelpSteer3]; [LMSYS-Chat-1M]; [Nemotron-Personas-USA] | [gpt-oss-120b]; [Qwen3-235B-A22B-Instruct-2507]; [Qwen3-235B-A22B-Thinking-2507] | | ||
| 1135 | Added: | Synthetic Nemotron-Personas-USA from gpt-oss-120b and Qwen3-8B | Text | Undisclosed | [Nemotron-Personas-USA] | [gpt-oss-120b]; [Qwen3-8B] | | ||
| 1136 | Added: | Vendor Terminal Bench-like Tasks (Droid) | Text | Undisclosed | [Droid Harness Pivot vendor data] | Undisclosed | | ||
| 1137 | Added: | Synthetic BabyVisionQA Reasoning — Combined SFT | Text and images | 135,207 records | Procedurally generated BabyVision-style visual-reasoning images | Qwen3.5-397B-A17B-FP8 | | ||
| 1138 | Added: | Synthetic BabyVision Tool-Calling SFT, Relative-Path-Corrected Variant | Text and images | 81,494 records | NVIDIA internal BabyVision tool-calling prompts and media | Qwen3.5-397B-A17B-FP8; Kimi-K2.6 | | ||
| 1139 | Added: | Synthetic Chinese OCR v5, NMH5R | Text and images | 29,108 records | Webster's Unabridged Dictionary; rendered Chinese text mixed with English words | Undisclosed; synthetic text rendering is described | | ||
| 1140 | Added: | Synthetic Chinese OCR v5, Augmented and Cleaned | Text and images | 28,576 records | Webster's Unabridged Dictionary; augmented synthetic Chinese OCR images | Undisclosed; synthetic text rendering is described | | ||
| 1141 | Added: | Synthetic Multimodal Safety, Energon Format | Text and images | 22,560 records | NVIDIA Safety-team text prompts and safe responses | Edify (image generation) | | ||
| 1142 | Added: | Synthetic Multimodal Safety, NMH5R and Safety-Filtered | Text and images | 22,541 records | Multimodal safety records with Edify-generated images | Edify (image generation) | | ||
| 1143 | Added: | Synthetic ASCII OCR v5, NMH5R | Text and images | 14,533 records | Webster's Unabridged Dictionary; synthetic ASCII renderings | Undisclosed; synthetic text rendering is described | | ||
| 1144 | Added: | Synthetic English OCR v5, NMH5R | Text and images | 14,525 records | Webster's Unabridged Dictionary; synthetic English renderings | Undisclosed; synthetic text rendering is described | | ||
| 1145 | Added: | ||
| 1146 | Added: ## Language Distribution in Post-Training | ||
| 1147 | Added: | ||
| 1148 | Added: For our post-training recipe, we focused on the following languages in addition to English: French, German, Italian, Japanese, Spanish, and Chinese. Those languages were represented in the form of multilingual reasoning and translation tasks. | ||
| 1149 | Added: | ||
| 1150 | Added: </details> | ||
| 1151 | Added: | ||
| 1152 | Added: ### Additional Training Data | ||
| 1153 | Added: | ||
| 1154 | Added: | Data | Composition and Purpose | | ||
| 1155 | Added: |:---|:---| | ||
| 1156 | Added: | Indic continued pre-training | 100B tokens: 10B selected Indic tokens and 90B tokens from the preceding blend. | | ||
| 1157 | Added: | Software-engineering mid-training | 67B tokens: whole repositories (20%), issue–pull-request pairs (41%), commit diffs (3%), build and CI logs (1%), agent traces (10%), pre-training replay (20%), and long-context data (5%). Sources are decontaminated against SWE-bench and Terminal-Bench repositories. | | ||
| 1158 | Added: | Long-context pre-training | A 35B-token extension to 1M context, followed by a 9B-token long-context recovery stage. | | ||
| 1159 | Added: | Vision-language data | Image and video data from the Nemotron 3 Nano Omni training corpus, including visual question answering, charts, tables, OCR, multi-page documents, visual grounding, and video understanding. | | ||
| 1160 | Added: | ||
| 1161 | Added: | Post-Training Data | Composition and Purpose | | ||
| 1162 | Added: |:---|:---| | ||
| 1163 | Added: | Additional synthetic vision data | Chart understanding, grounded perception, multimodal reasoning, and visual tool-use trajectories, including data generated with Qwen3.5 and Kimi models. | | ||
| 1164 | Added: | Reasoning trajectories | Mathematics and STEM responses generated with Kimi K3; mathematical proofs generated with DeepSeek V4 Pro; competitive-programming trajectories generated with GLM-5.2. | | ||
| 1165 | Added: | Chat and safety | Refreshed chat responses from Qwen, Kimi, and Gemma models, with additional safety data. | | ||
| 1166 | Added: | Long-context supervised data | 512K-context data, synthetic graph reasoning and transduction tasks, long-horizon search and coding trajectories, and documents containing up to hundreds of pages. | | ||
| 1167 | Added: | Long-document translation | Chunked translations of PG19 and FinePDFs-Edu documents generated with DeepSeek V4 Flash. | | ||
| 1168 | Added: | ||
| 1169 | Added: ## Testing Datasets | ||
| 1170 | Added: | ||
| 1171 | Added: **Data Collection Method:** Hybrid: automated, manually-collected, and synthetic | ||
| 1172 | Added: **Labeling Method:** Hybrid: automated, manually-labeled, and synthetic | ||
| 1173 | Added: **Properties:** Standard benchmarks and task-specific test suites covering reasoning, coding, tool use, instruction following, long context, and visual understanding. | ||
| 1174 | Added: | ||
| 1175 | Added: ## Evaluation Datasets | ||
| 1176 | Added: | ||
| 1177 | Added: **Data Collection Method:** Hybrid: automated, manually-collected, and synthetic | ||
| 1178 | Added: **Labeling Method:** Hybrid: automated, manually-labeled, and synthetic | ||
| 1179 | Added: **Properties:** Standard benchmarks and task-specific test suites covering reasoning, coding, tool use, instruction following, long context, and visual understanding. | ||
| 1180 | Added: | ||
| 1181 | Added: ## Inference | ||
| 1182 | Added: | ||
| 1183 | Added: * **Acceleration Engine:** PyTorch | ||
| 1184 | Added: | ||
| 1185 | Added: * **Test Hardware:** | ||
| 1186 | Added: * NVIDIA Hopper | ||
| 1187 | Added: * H100 | ||
| 1188 | Added: * H200 | ||
| 1189 | Added: * NVIDIA Grace Blackwell | ||
| 1190 | Added: * GB200 | ||
| 1191 | Added: * GB300 | ||
| 1192 | Added: * NVIDIA Blackwell | ||
| 1193 | Added: * B200 | ||
| 1194 | Added: * B300 | ||
| 1195 | Added: * NVIDIA DGX Spark | ||
| 1196 | Added: * NVIDIA RTX PRO 6000 | ||
| 1197 | Added: | ||
| 1198 | Added: | ||
| 1199 | Added: The deployment examples above provide configurations for NVIDIA Hopper and Blackwell systems. Choose the precision, context length, and concurrency appropriate for the application and available memory. | ||
| 1200 | Added: | ||
| 1201 | Added: ## Ethical Considerations | ||
| 1202 | Added: | ||
| 1203 | Added: NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications. When downloaded or used in accordance with our terms of service, developers should work with their internal model team to ensure this model meets requirements for the relevant industry and use case and addresses unforeseen product misuse. | ||
| 1204 | Added: | ||
| 1205 | Added: We advise against circumvention of any provided safety guardrails contained in the Model without a substantially similar guardrail appropriate for your use case. For more details: [Safety](./safety.md) and [Explainability](./explainability.md) subcards. For more detailed information on ethical considerations for this model, please see the Model Card++ [Bias](./bias.md), and [Privacy](./privacy.md) subcards. | ||
| 1206 | Added: | ||
| 1207 | Added: Please report model quality, risk, security vulnerabilities or NVIDIA AI Concerns [here](https://www.nvidia.com/en-us/support/submit-security-vulnerability/).(no newline at end of file) | ||
model-00045-of-00088.safetensors
Added
model-00045-of-00088.safetensors
Large (LFS-tracked) file content changed — 105 MB
model-00046-of-00088.safetensors
Added
model-00046-of-00088.safetensors
Large (LFS-tracked) file content changed — 1.5 GB
model-00047-of-00088.safetensors
Added
model-00047-of-00088.safetensors
Large (LFS-tracked) file content changed — 105 MB
model-00048-of-00088.safetensors
Added
model-00048-of-00088.safetensors
Large (LFS-tracked) file content changed — 34 MB
model-00049-of-00088.safetensors
Added
model-00049-of-00088.safetensors
Large (LFS-tracked) file content changed — 1.5 GB
model-00050-of-00088.safetensors
Added
model-00050-of-00088.safetensors
Large (LFS-tracked) file content changed — 105 MB
model-00051-of-00088.safetensors
Added
model-00051-of-00088.safetensors
Large (LFS-tracked) file content changed — 1.5 GB
model-00052-of-00088.safetensors
Added
model-00052-of-00088.safetensors
Large (LFS-tracked) file content changed — 105 MB
model-00053-of-00088.safetensors
Added
model-00053-of-00088.safetensors
Large (LFS-tracked) file content changed — 1.5 GB
model-00054-of-00088.safetensors
Added
model-00054-of-00088.safetensors
Large (LFS-tracked) file content changed — 105 MB
model-00055-of-00088.safetensors
Added
model-00055-of-00088.safetensors
Large (LFS-tracked) file content changed — 1.5 GB
model-00056-of-00088.safetensors
Added
model-00056-of-00088.safetensors
Large (LFS-tracked) file content changed — 105 MB
model-00057-of-00088.safetensors
Added
model-00057-of-00088.safetensors
Large (LFS-tracked) file content changed — 1.5 GB
model-00058-of-00088.safetensors
Added
model-00058-of-00088.safetensors
Large (LFS-tracked) file content changed — 105 MB
model-00059-of-00088.safetensors
Added
model-00059-of-00088.safetensors
Large (LFS-tracked) file content changed — 34 MB
model-00060-of-00088.safetensors
Added
model-00060-of-00088.safetensors
Large (LFS-tracked) file content changed — 1.5 GB
model-00061-of-00088.safetensors
Added
model-00061-of-00088.safetensors
Large (LFS-tracked) file content changed — 105 MB
model-00062-of-00088.safetensors
Added
model-00062-of-00088.safetensors
Large (LFS-tracked) file content changed — 1.5 GB
model-00064-of-00088.safetensors
Added
model-00064-of-00088.safetensors
Large (LFS-tracked) file content changed — 1.5 GB
model-00065-of-00088.safetensors
Added
model-00065-of-00088.safetensors
Large (LFS-tracked) file content changed — 105 MB
model-00066-of-00088.safetensors
Added
model-00066-of-00088.safetensors
Large (LFS-tracked) file content changed — 1.5 GB
model-00067-of-00088.safetensors
Added
model-00067-of-00088.safetensors
Large (LFS-tracked) file content changed — 105 MB
model-00068-of-00088.safetensors
Added
model-00068-of-00088.safetensors
Large (LFS-tracked) file content changed — 1.5 GB
model-00069-of-00088.safetensors
Added
model-00069-of-00088.safetensors
Large (LFS-tracked) file content changed — 105 MB
model-00070-of-00088.safetensors
Added
model-00070-of-00088.safetensors
Large (LFS-tracked) file content changed — 34 MB
model-00071-of-00088.safetensors
Added
model-00071-of-00088.safetensors
Large (LFS-tracked) file content changed — 1.5 GB
model-00072-of-00088.safetensors
Added
model-00072-of-00088.safetensors
Large (LFS-tracked) file content changed — 105 MB
model-00073-of-00088.safetensors
Added
model-00073-of-00088.safetensors
Large (LFS-tracked) file content changed — 1.5 GB
model-00074-of-00088.safetensors
Added
model-00074-of-00088.safetensors
Large (LFS-tracked) file content changed — 105 MB
model-00075-of-00088.safetensors
Added
model-00075-of-00088.safetensors
Large (LFS-tracked) file content changed — 1.5 GB
model-00076-of-00088.safetensors
Added
model-00076-of-00088.safetensors
Large (LFS-tracked) file content changed — 105 MB
model-00077-of-00088.safetensors
Added
model-00077-of-00088.safetensors
Large (LFS-tracked) file content changed — 1.5 GB
model-00078-of-00088.safetensors
Added
model-00078-of-00088.safetensors
Large (LFS-tracked) file content changed — 105 MB
model-00079-of-00088.safetensors
Added
model-00079-of-00088.safetensors
Large (LFS-tracked) file content changed — 34 MB
model-00083-of-00088.safetensors
Added
model-00083-of-00088.safetensors
Large (LFS-tracked) file content changed — 105 MB
model-00084-of-00088.safetensors
Added
model-00084-of-00088.safetensors
Large (LFS-tracked) file content changed — 1.5 GB
model-00085-of-00088.safetensors
Added
model-00085-of-00088.safetensors
Large (LFS-tracked) file content changed — 105 MB
model-00086-of-00088.safetensors
Added
model-00086-of-00088.safetensors
Large (LFS-tracked) file content changed — 1.5 GB
model-00088-of-00088.safetensors
Added
model-00088-of-00088.safetensors
Large (LFS-tracked) file content changed — 3.7 GB
modeling_nemotron_h_omni.py
Added+484 -0
modeling_nemotron_h_omni.py
| @@ -0,0 +1,484 @@ | |||
| 1 | Added: # 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 | ||
| 2 | Added: # This file was automatically generated from src/transformers/models/nemotron_h_omni/modular_nemotron_h_omni.py. | ||
| 3 | Added: # Do NOT edit this file manually as any edits will be overwritten by the generation of | ||
| 4 | Added: # the file from the modular. If any change should be done, please apply the change to the | ||
| 5 | Added: # modular_nemotron_h_omni.py file directly. One of our CI enforces this. | ||
| 6 | Added: # 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 | ||
| 7 | Added: # Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. | ||
| 8 | Added: # | ||
| 9 | Added: # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 10 | Added: # you may not use this file except in compliance with the License. | ||
| 11 | Added: # You may obtain a copy of the License at | ||
| 12 | Added: # | ||
| 13 | Added: # http://www.apache.org/licenses/LICENSE-2.0 | ||
| 14 | Added: # | ||
| 15 | Added: # Unless required by applicable law or agreed to in writing, software | ||
| 16 | Added: # distributed under the License is distributed on an "AS IS" BASIS, | ||
| 17 | Added: # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 18 | Added: # See the License for the specific language governing permissions and | ||
| 19 | Added: # limitations under the License. | ||
| 20 | Added: | ||
| 21 | Added: import warnings | ||
| 22 | Added: | ||
| 23 | Added: import torch | ||
| 24 | Added: from torch import nn | ||
| 25 | Added: from torch.nn import CrossEntropyLoss | ||
| 26 | Added: from transformers.activations import ACT2FN | ||
| 27 | Added: from transformers.generation import GenerationMixin | ||
| 28 | Added: from transformers.integrations import use_kernel_forward_from_hub | ||
| 29 | Added: from transformers.modeling_outputs import CausalLMOutputWithPast | ||
| 30 | Added: from transformers.modeling_utils import PreTrainedModel | ||
| 31 | Added: from transformers.conversion_mapping import register_checkpoint_conversion_mapping | ||
| 32 | Added: from transformers.core_model_loading import WeightRenaming | ||
| 33 | Added: from transformers.models.auto import CONFIG_MAPPING, FEATURE_EXTRACTOR_MAPPING, AutoModel, AutoModelForCausalLM | ||
| 34 | Added: | ||
| 35 | Added: from .configuration_nemotron_h_omni import NemotronH_Omni_Reasoning_V3_Config | ||
| 36 | Added: | ||
| 37 | Added: # Transformers 5.8 only copies direct sibling imports into its dynamic-module cache. | ||
| 38 | Added: from .configuration_radio import RadioConfig as _RadioConfig # noqa: F401 | ||
| 39 | Added: from .modeling_radio import RadioModel | ||
| 40 | Added: | ||
| 41 | Added: | ||
| 42 | Added: def register_nemotron_h_omni_conversion_mapping(): | ||
| 43 | Added: """ | ||
| 44 | Added: Register the conversion mapping for the Omni composition level (projector and sound prefixes). | ||
| 45 | Added: | ||
| 46 | Added: See `register_radio_conversion_mapping` in `modeling_radio.py` for why this lives in the | ||
| 47 | Added: remote code rather than in the global `conversion_mapping.py`. The vision mapping is registered | ||
| 48 | Added: there and the `nemotron_h` mapping ships with Transformers itself (upstream since v5.3.0); this | ||
| 49 | Added: entry covers the keys owned by the top-level model. | ||
| 50 | Added: """ | ||
| 51 | Added: | ||
| 52 | Added: register_checkpoint_conversion_mapping( | ||
| 53 | Added: "nemotron_h_omni", | ||
| 54 | Added: [ | ||
| 55 | Added: WeightRenaming(r"^mlp1\.0\.", r"vision_projector\.mlp1\.norm\."), | ||
| 56 | Added: WeightRenaming(r"^mlp1\.1\.", r"vision_projector\.mlp1\.linear1\."), | ||
| 57 | Added: WeightRenaming(r"^mlp1\.3\.", r"vision_projector\.mlp1\.linear2\."), | ||
| 58 | Added: WeightRenaming(r"^sound_encoder\.", r"sound_projector\.sound_encoder\."), | ||
| 59 | Added: WeightRenaming(r"^sound_projection\.", r"sound_projector\.sound_projection\."), | ||
| 60 | Added: ], | ||
| 61 | Added: overwrite=True, | ||
| 62 | Added: ) | ||
| 63 | Added: | ||
| 64 | Added: | ||
| 65 | Added: @use_kernel_forward_from_hub("RMSNorm") | ||
| 66 | Added: class NemotronH_Omni_RMSNorm(nn.Module): | ||
| 67 | Added: def __init__(self, hidden_size, eps: float = 1e-6) -> None: | ||
| 68 | Added: """ | ||
| 69 | Added: NemotronHOmniRMSNorm is equivalent to T5LayerNorm | ||
| 70 | Added: """ | ||
| 71 | Added: super().__init__() | ||
| 72 | Added: self.weight = nn.Parameter(torch.ones(hidden_size)) | ||
| 73 | Added: self.variance_epsilon = eps | ||
| 74 | Added: | ||
| 75 | Added: def forward(self, hidden_states) -> torch.Tensor: | ||
| 76 | Added: input_dtype = hidden_states.dtype | ||
| 77 | Added: hidden_states = hidden_states.to(torch.float32) | ||
| 78 | Added: variance = hidden_states.pow(2).mean(-1, keepdim=True) | ||
| 79 | Added: hidden_states = hidden_states * torch.rsqrt(variance + self.variance_epsilon) | ||
| 80 | Added: return (self.weight.to(torch.float32) * hidden_states).to(input_dtype) | ||
| 81 | Added: | ||
| 82 | Added: def extra_repr(self): | ||
| 83 | Added: return f"{tuple(self.weight.shape)}, eps={self.variance_epsilon}" | ||
| 84 | Added: | ||
| 85 | Added: | ||
| 86 | Added: class NemotronH_Omni_Reasoning_V3SoundEncoder(nn.Module): | ||
| 87 | Added: """Thin wrapper exposing the Parakeet encoder's `last_hidden_state` for audio embedding.""" | ||
| 88 | Added: | ||
| 89 | Added: def __init__(self, config): | ||
| 90 | Added: super().__init__() | ||
| 91 | Added: self.config = config | ||
| 92 | Added: self.encoder = AutoModel.from_config(config) | ||
| 93 | Added: | ||
| 94 | Added: def forward(self, input_features: torch.Tensor, attention_mask: torch.Tensor | None = None) -> torch.Tensor: | ||
| 95 | Added: return self.encoder(input_features=input_features, attention_mask=attention_mask).last_hidden_state | ||
| 96 | Added: | ||
| 97 | Added: @property | ||
| 98 | Added: def hidden_size(self) -> int: | ||
| 99 | Added: return self.config.hidden_size | ||
| 100 | Added: | ||
| 101 | Added: | ||
| 102 | Added: class NemotronH_Omni_Reasoning_V3SoundProjector(nn.Module): | ||
| 103 | Added: """Single-forward audio pipeline: feature-extract raw clip(s), encode with Parakeet and project, | ||
| 104 | Added: returning flattened LLM-space embeddings ready to scatter onto `<audio>` positions. | ||
| 105 | Added: """ | ||
| 106 | Added: | ||
| 107 | Added: def __init__(self, config, llm_hidden_size: int): | ||
| 108 | Added: super().__init__() | ||
| 109 | Added: feature_extractor_class = FEATURE_EXTRACTOR_MAPPING[CONFIG_MAPPING["parakeet_encoder"]] | ||
| 110 | Added: self.feature_extractor = feature_extractor_class( | ||
| 111 | Added: sampling_rate=getattr(config, "sampling_rate", 16000), | ||
| 112 | Added: feature_size=config.num_mel_bins, | ||
| 113 | Added: ) | ||
| 114 | Added: self.sound_encoder = NemotronH_Omni_Reasoning_V3SoundEncoder(config) | ||
| 115 | Added: self.sound_projection = NemotronH_Omni_Reasoning_V3MLP( | ||
| 116 | Added: config.hidden_size, | ||
| 117 | Added: config.projection_hidden_size, | ||
| 118 | Added: llm_hidden_size, | ||
| 119 | Added: bias=config.projection_bias, | ||
| 120 | Added: ) | ||
| 121 | Added: | ||
| 122 | Added: def forward(self, sound_clips) -> torch.Tensor: | ||
| 123 | Added: weight = self.sound_encoder.encoder.subsampling.linear.weight | ||
| 124 | Added: device, dtype = weight.device, weight.dtype | ||
| 125 | Added: | ||
| 126 | Added: if isinstance(sound_clips, torch.Tensor) and sound_clips.dim() >= 3: | ||
| 127 | Added: input_features = sound_clips.to(device=device, dtype=dtype) | ||
| 128 | Added: attention_mask = None | ||
| 129 | Added: else: | ||
| 130 | Added: # `.tolist()` keeps a raw waveform tensor within the feature extractor's accepted input | ||
| 131 | Added: # types (`list[float]` / `list[list[float]]`) without pulling in numpy here. | ||
| 132 | Added: raw_speech = sound_clips.tolist() if isinstance(sound_clips, torch.Tensor) else sound_clips | ||
| 133 | Added: audio_inputs = self.feature_extractor( | ||
| 134 | Added: raw_speech, sampling_rate=self.feature_extractor.sampling_rate, return_tensors="pt" | ||
| 135 | Added: ) | ||
| 136 | Added: input_features = audio_inputs.input_features.to(device=device, dtype=dtype) | ||
| 137 | Added: attention_mask = audio_inputs.get("attention_mask", None) | ||
| 138 | Added: if attention_mask is not None: | ||
| 139 | Added: attention_mask = attention_mask.to(device=device) | ||
| 140 | Added: | ||
| 141 | Added: sound_embeds = self.sound_projection(self.sound_encoder(input_features, attention_mask).to(torch.bfloat16)) | ||
| 142 | Added: | ||
| 143 | Added: # Multiple clips are batch-padded; keep only each clip's real (subsampled) length before flattening. | ||
| 144 | Added: if sound_embeds.dim() == 3 and sound_embeds.shape[0] > 1 and attention_mask is not None: | ||
| 145 | Added: lengths = self.sound_encoder.encoder._get_subsampling_output_length(attention_mask.sum(-1) + 1) | ||
| 146 | Added: return torch.cat([sound_embeds[i, : int(n)] for i, n in enumerate(lengths.tolist())], dim=0) | ||
| 147 | Added: return sound_embeds.reshape(-1, sound_embeds.shape[-1]) | ||
| 148 | Added: | ||
| 149 | Added: | ||
| 150 | Added: class NemotronH_Omni_Reasoning_V3MLP(nn.Module): | ||
| 151 | Added: """Projector MLP: RMSNorm -> linear1 -> ReLU² -> linear2 (NemotronHMLP-style). | ||
| 152 | Added: | ||
| 153 | Added: Used both for the vision-to-LLM projector (`mlp1`) and the sound-to-LLM projection. The | ||
| 154 | Added: `linear1`/`linear2` submodule names match the Megatron sound-projection checkpoint structure | ||
| 155 | Added: (`sound_projection.{norm,linear1,linear2}.weight`); pass `bias=True` for the sound projection. | ||
| 156 | Added: """ | ||
| 157 | Added: | ||
| 158 | Added: def __init__( | ||
| 159 | Added: self, in_features: int, hidden_features: int, out_features: int, bias: bool = False, eps: float = 1e-5 | ||
| 160 | Added: ): | ||
| 161 | Added: super().__init__() | ||
| 162 | Added: self.norm = NemotronH_Omni_RMSNorm(in_features, eps=eps) | ||
| 163 | Added: self.linear1 = nn.Linear(in_features, hidden_features, bias=bias) | ||
| 164 | Added: self.linear2 = nn.Linear(hidden_features, out_features, bias=bias) | ||
| 165 | Added: self.act_fn = ACT2FN["relu2"] | ||
| 166 | Added: | ||
| 167 | Added: def forward(self, x): | ||
| 168 | Added: return self.linear2(self.act_fn(self.linear1(self.norm(x)))) | ||
| 169 | Added: | ||
| 170 | Added: | ||
| 171 | Added: class NemotronH_Omni_Reasoning_V3VisionProjector(nn.Module): | ||
| 172 | Added: """Single-forward vision pipeline: run the vision tower (image, or temporally-packed video) through | ||
| 173 | Added: pixel-shuffle downsampling and the projection MLP (`mlp1`) into LLM-space embeddings. The | ||
| 174 | Added: weight-bearing `vision_model` is passed in so its checkpoint keys stay at the top level. | ||
| 175 | Added: """ | ||
| 176 | Added: | ||
| 177 | Added: def __init__(self, config): | ||
| 178 | Added: super().__init__() | ||
| 179 | Added: self.downsample_ratio = config.downsample_ratio | ||
| 180 | Added: self.video_temporal_patch_dim = config.video_temporal_patch_size | ||
| 181 | Added: self.ps_version = config.ps_version | ||
| 182 | Added: self.mlp1 = NemotronH_Omni_Reasoning_V3MLP( | ||
| 183 | Added: config.vit_hidden_size * int(1 / config.downsample_ratio) ** 2, | ||
| 184 | Added: config.projector_hidden_size, | ||
| 185 | Added: config.llm_config.hidden_size, | ||
| 186 | Added: ) | ||
| 187 | Added: # Mirror Megatron training behavior: when the language model has MTP, | ||
| 188 | Added: # Megatron-Core's TransformerBlock places a final LayerNorm with the last | ||
| 189 | Added: # layer of every block built from the (shared) config -- including the | ||
| 190 | Added: # vision tower, whose config inherits `mtp_num_layers` from the language | ||
| 191 | Added: # model. The vision tower output is therefore layer-normalized before the | ||
| 192 | Added: # projector. LayerNorm is applied per token, so normalizing the RADIO | ||
| 193 | Added: # features here is exactly equivalent to Megatron's block-internal | ||
| 194 | Added: # placement before class-token stripping. | ||
| 195 | Added: if (getattr(config.llm_config, "num_nextn_predict_layers", 0) or 0) > 0: | ||
| 196 | Added: self.vision_final_layernorm = nn.LayerNorm( | ||
| 197 | Added: config.vit_hidden_size, eps=config.vision_config.layer_norm_eps | ||
| 198 | Added: ) | ||
| 199 | Added: else: | ||
| 200 | Added: self.vision_final_layernorm = None | ||
| 201 | Added: | ||
| 202 | Added: def pixel_shuffle(self, x, scale_factor=0.5): | ||
| 203 | Added: n, w, h, c = x.size() | ||
| 204 | Added: x = x.view(n, w, int(h * scale_factor), int(c / scale_factor)) | ||
| 205 | Added: x = x.permute(0, 2, 1, 3).contiguous() | ||
| 206 | Added: x = x.view( | ||
| 207 | Added: n, | ||
| 208 | Added: int(h * scale_factor), | ||
| 209 | Added: int(w * scale_factor), | ||
| 210 | Added: int(c / (scale_factor * scale_factor)), | ||
| 211 | Added: ) | ||
| 212 | Added: if self.ps_version == "v1": | ||
| 213 | Added: warnings.warn( | ||
| 214 | Added: "In ps_version 'v1', the height and width have not been swapped back, " | ||
| 215 | Added: "which results in a transposed image." | ||
| 216 | Added: ) | ||
| 217 | Added: else: | ||
| 218 | Added: x = x.permute(0, 2, 1, 3).contiguous() | ||
| 219 | Added: return x | ||
| 220 | Added: | ||
| 221 | Added: def _project(self, vit_embeds, h, w): | ||
| 222 | Added: if self.vision_final_layernorm is not None: | ||
| 223 | Added: vit_embeds = self.vision_final_layernorm(vit_embeds) | ||
| 224 | Added: vit_embeds = vit_embeds.reshape(vit_embeds.shape[0], h, w, -1) | ||
| 225 | Added: vit_embeds = self.pixel_shuffle(vit_embeds, scale_factor=self.downsample_ratio) | ||
| 226 | Added: vit_embeds = vit_embeds.reshape(vit_embeds.shape[0], -1, vit_embeds.shape[-1]) | ||
| 227 | Added: return self.mlp1(vit_embeds) | ||
| 228 | Added: | ||
| 229 | Added: def forward(self, pixel_values, vision_model): | ||
| 230 | Added: if isinstance(pixel_values, (list, tuple)): | ||
| 231 | Added: return torch.cat([self.forward(pv, vision_model) for pv in pixel_values], dim=0) | ||
| 232 | Added: pixel_values = pixel_values.to(dtype=vision_model.config.torch_dtype) | ||
| 233 | Added: vit_embeds = vision_model(pixel_values).features | ||
| 234 | Added: _, _, H, W = pixel_values.shape | ||
| 235 | Added: patch_size = vision_model.patch_size | ||
| 236 | Added: return self._project(vit_embeds, H // patch_size, W // patch_size) | ||
| 237 | Added: | ||
| 238 | Added: def forward_video(self, pixel_values_videos, vision_model): | ||
| 239 | Added: pixel_values_videos = pixel_values_videos.to(dtype=vision_model.config.torch_dtype) | ||
| 240 | Added: T = self.video_temporal_patch_dim | ||
| 241 | Added: N, C, H, W = pixel_values_videos.shape | ||
| 242 | Added: | ||
| 243 | Added: if N % T != 0: | ||
| 244 | Added: pad = pixel_values_videos[-1:].expand(T - (N % T), -1, -1, -1) | ||
| 245 | Added: pixel_values_videos = torch.cat([pixel_values_videos, pad], dim=0) | ||
| 246 | Added: N = pixel_values_videos.shape[0] | ||
| 247 | Added: num_groups = N // T | ||
| 248 | Added: | ||
| 249 | Added: x = pixel_values_videos.reshape(num_groups, T * C, H, W) | ||
| 250 | Added: vit_embeds = vision_model(x, use_video_patch_projection=True).features | ||
| 251 | Added: patch_size = vision_model.patch_size | ||
| 252 | Added: return self._project(vit_embeds, H // patch_size, W // patch_size) | ||
| 253 | Added: | ||
| 254 | Added: | ||
| 255 | Added: def compute_retention_mask( | ||
| 256 | Added: *, | ||
| 257 | Added: video_embeds: torch.FloatTensor, | ||
| 258 | Added: thw: torch.LongTensor, | ||
| 259 | Added: spatial_merge_size: int, | ||
| 260 | Added: q: float, | ||
| 261 | Added: ): | ||
| 262 | Added: """ | ||
| 263 | Added: Computes the retention mask for video embeddings based on the grid dimensions. | ||
| 264 | Added: | ||
| 265 | Added: Args: | ||
| 266 | Added: video_embeds (`torch.FloatTensor` of shape `(T * H * W, hidden_size)`): | ||
| 267 | Added: The video embeddings to compute the retention mask for. | ||
| 268 | Added: thw (`torch.LongTensor` of shape `(3)`): | ||
| 269 | Added: The temporal, height and width of feature shape of each video in LLM. | ||
| 270 | Added: spatial_merge_size (`int`): The spatial merge size of the video embeddings. | ||
| 271 | Added: If embeddings will be downsampled *later*, this should be the downsampling factor. | ||
| 272 | Added: q: (`float`): Pruning rate factor, indicating number of tokens to prune (remove) | ||
| 273 | Added: | ||
| 274 | Added: Returns: | ||
| 275 | Added: `torch.Tensor`: The retention mask for the video embeddings (T * H * W). | ||
| 276 | Added: 1 for tokens to keep, 0 for tokens to prune. | ||
| 277 | Added: """ | ||
| 278 | Added: T, H, W = thw | ||
| 279 | Added: | ||
| 280 | Added: # Use reshape instead of einops to avoid graph breaks | ||
| 281 | Added: video_embeds = video_embeds.reshape(T, H // spatial_merge_size, W // spatial_merge_size, video_embeds.size(-1)) | ||
| 282 | Added: | ||
| 283 | Added: # Core EVS | ||
| 284 | Added: similarity = torch.nn.functional.cosine_similarity(video_embeds[1:, ...], video_embeds[:-1, ...], dim=-1) | ||
| 285 | Added: dissimilarity = 1 - similarity | ||
| 286 | Added: | ||
| 287 | Added: # Always ensure we include all tokens from the first frame | ||
| 288 | Added: dissimilarity = torch.cat([255 * torch.ones_like(video_embeds[:1, :, :, 0]), dissimilarity], dim=0) | ||
| 289 | Added: dissimilarity_flat = dissimilarity.view(-1) | ||
| 290 | Added: | ||
| 291 | Added: min_num_tokens = (H // spatial_merge_size) * (W // spatial_merge_size) # a single frame | ||
| 292 | Added: evs_num_tokens = int(T * min_num_tokens * (1 - q)) | ||
| 293 | Added: num_tokens_to_keep = max(min_num_tokens, evs_num_tokens) | ||
| 294 | Added: | ||
| 295 | Added: order = torch.argsort(dissimilarity_flat, dim=-1, descending=True, stable=True) | ||
| 296 | Added: topk_indices = order[:num_tokens_to_keep] | ||
| 297 | Added: | ||
| 298 | Added: retention_mask = torch.zeros_like(dissimilarity_flat, dtype=torch.bool) | ||
| 299 | Added: retention_mask[topk_indices] = True | ||
| 300 | Added: retention_mask = retention_mask.reshape(dissimilarity.size()) | ||
| 301 | Added: | ||
| 302 | Added: mask = retention_mask.view(-1) # "T H W -> (T H W)" | ||
| 303 | Added: return mask | ||
| 304 | Added: | ||
| 305 | Added: | ||
| 306 | Added: class NemotronH_Omni_Reasoning_V3(PreTrainedModel, GenerationMixin): | ||
| 307 | Added: config_class = NemotronH_Omni_Reasoning_V3_Config | ||
| 308 | Added: main_input_name = "input_ids" | ||
| 309 | Added: _supports_flash_attn_2 = True | ||
| 310 | Added: _supports_flash_attn = True | ||
| 311 | Added: _no_split_modules = ["NemotronHBlock"] | ||
| 312 | Added: # Released checkpoints carry multi-token-prediction weights (no module here builds them) and | ||
| 313 | Added: # input-conditioner statistics (the vision preprocessor is external in this composition). | ||
| 314 | Added: _keys_to_ignore_on_load_unexpected = [r"mtp\.", r"input_conditioner\."] | ||
| 315 | Added: | ||
| 316 | Added: def __init__(self, config: NemotronH_Omni_Reasoning_V3_Config): | ||
| 317 | Added: super().__init__(config) | ||
| 318 | Added: register_nemotron_h_omni_conversion_mapping() | ||
| 319 | Added: | ||
| 320 | Added: image_size = config.force_image_size | ||
| 321 | Added: patch_size = config.patch_size | ||
| 322 | Added: self.patch_size = patch_size | ||
| 323 | Added: self.template = config.template | ||
| 324 | Added: self.num_image_token = int((image_size // patch_size) ** 2 * (config.downsample_ratio**2)) | ||
| 325 | Added: self.downsample_ratio = config.downsample_ratio | ||
| 326 | Added: self.image_tag_type = config.image_tag_type | ||
| 327 | Added: self.img_context_token_id = config.img_context_token_id | ||
| 328 | Added: self.video_context_token_id = config.video_context_token_id | ||
| 329 | Added: | ||
| 330 | Added: self.language_model = AutoModelForCausalLM.from_config(config.llm_config) | ||
| 331 | Added: self.vision_model = RadioModel(config.vision_config) | ||
| 332 | Added: self.vision_model.make_preprocessor_external() | ||
| 333 | Added: | ||
| 334 | Added: self.drop_vision_class_token = True | ||
| 335 | Added: | ||
| 336 | Added: llm_hidden_size = config.llm_config.hidden_size | ||
| 337 | Added: | ||
| 338 | Added: self.video_pruning_rate = config.video_pruning_rate | ||
| 339 | Added: | ||
| 340 | Added: self.vision_projector = NemotronH_Omni_Reasoning_V3VisionProjector(config) | ||
| 341 | Added: | ||
| 342 | Added: self.sound_context_token_id = config.sound_context_token_id | ||
| 343 | Added: if config.sound_config is not None: | ||
| 344 | Added: self.sound_projector = NemotronH_Omni_Reasoning_V3SoundProjector(config.sound_config, llm_hidden_size) | ||
| 345 | Added: else: | ||
| 346 | Added: self.sound_projector = None | ||
| 347 | Added: | ||
| 348 | Added: self.all_tied_weights_keys = {} | ||
| 349 | Added: | ||
| 350 | Added: self.post_init() | ||
| 351 | Added: | ||
| 352 | Added: def get_input_embeddings(self): | ||
| 353 | Added: return self.language_model.get_input_embeddings() | ||
| 354 | Added: | ||
| 355 | Added: def set_input_embeddings(self, value): | ||
| 356 | Added: self.language_model.set_input_embeddings(value) | ||
| 357 | Added: | ||
| 358 | Added: def forward( | ||
| 359 | Added: self, | ||
| 360 | Added: input_ids: torch.LongTensor = None, | ||
| 361 | Added: pixel_values: torch.FloatTensor | None = None, | ||
| 362 | Added: pixel_values_videos: torch.FloatTensor | None = None, | ||
| 363 | Added: sound_clips: torch.FloatTensor | None = None, | ||
| 364 | Added: attention_mask: torch.Tensor | None = None, | ||
| 365 | Added: position_ids: torch.LongTensor | None = None, | ||
| 366 | Added: image_flags: torch.LongTensor | None = None, | ||
| 367 | Added: past_key_values: list[torch.FloatTensor] | None = None, | ||
| 368 | Added: labels: torch.LongTensor | None = None, | ||
| 369 | Added: inputs_embeds=None, | ||
| 370 | Added: use_cache: bool | None = None, | ||
| 371 | Added: output_attentions: bool | None = None, | ||
| 372 | Added: output_hidden_states: bool | None = None, | ||
| 373 | Added: return_dict: bool | None = None, | ||
| 374 | Added: **kwargs, | ||
| 375 | Added: ) -> CausalLMOutputWithPast: | ||
| 376 | Added: if inputs_embeds is None: | ||
| 377 | Added: inputs_embeds = self.get_input_embeddings()(input_ids) | ||
| 378 | Added: | ||
| 379 | Added: # Multimodal merges need `input_ids` to locate the placeholder tokens; skip them on the | ||
| 380 | Added: # cached decode steps and the inputs-embeds-only path where `input_ids` is absent. | ||
| 381 | Added: if pixel_values is not None and input_ids is not None: | ||
| 382 | Added: image_embeds = self.vision_projector(pixel_values, self.vision_model) | ||
| 383 | Added: if image_flags is not None: | ||
| 384 | Added: image_embeds = image_embeds[image_flags.squeeze(-1) == 1] | ||
| 385 | Added: image_embeds = image_embeds.to(inputs_embeds.device, inputs_embeds.dtype) | ||
| 386 | Added: image_mask = (input_ids == self.img_context_token_id).unsqueeze(-1).expand_as(inputs_embeds) | ||
| 387 | Added: inputs_embeds = inputs_embeds.masked_scatter(image_mask.to(inputs_embeds.device), image_embeds) | ||
| 388 | Added: | ||
| 389 | Added: if pixel_values_videos is not None and input_ids is not None: | ||
| 390 | Added: video_embeds = self.vision_projector.forward_video(pixel_values_videos, self.vision_model) | ||
| 391 | Added: video_embeds = video_embeds.to(inputs_embeds.device, inputs_embeds.dtype) | ||
| 392 | Added: video_mask = (input_ids == self.img_context_token_id).unsqueeze(-1).expand_as(inputs_embeds) | ||
| 393 | Added: inputs_embeds = inputs_embeds.masked_scatter(video_mask.to(inputs_embeds.device), video_embeds) | ||
| 394 | Added: | ||
| 395 | Added: if self.video_pruning_rate > 0: | ||
| 396 | Added: h = w = int(video_embeds.shape[1] ** 0.5) | ||
| 397 | Added: evs_mask = compute_retention_mask( | ||
| 398 | Added: video_embeds=video_embeds, | ||
| 399 | Added: thw=(video_embeds.shape[0], h, w), | ||
| 400 | Added: spatial_merge_size=1, | ||
| 401 | Added: q=self.video_pruning_rate, | ||
| 402 | Added: ) | ||
| 403 | Added: retention_mask = torch.ones_like(input_ids, dtype=torch.bool) | ||
| 404 | Added: retention_mask[input_ids == self.img_context_token_id] = evs_mask.view(-1) | ||
| 405 | Added: inputs_embeds = inputs_embeds[retention_mask].unsqueeze(0) | ||
| 406 | Added: if attention_mask is not None: | ||
| 407 | Added: attention_mask = attention_mask[retention_mask].unsqueeze(0) | ||
| 408 | Added: input_ids = input_ids[retention_mask].unsqueeze(0) | ||
| 409 | Added: | ||
| 410 | Added: if sound_clips is not None and self.sound_projector is not None and input_ids is not None: | ||
| 411 | Added: sound_embeds = self.sound_projector(sound_clips) | ||
| 412 | Added: sound_embeds = sound_embeds.to(inputs_embeds.device, inputs_embeds.dtype) | ||
| 413 | Added: sound_mask = (input_ids == self.sound_context_token_id).unsqueeze(-1).expand_as(inputs_embeds) | ||
| 414 | Added: inputs_embeds = inputs_embeds.masked_scatter(sound_mask.to(inputs_embeds.device), sound_embeds) | ||
| 415 | Added: | ||
| 416 | Added: outputs = self.language_model( | ||
| 417 | Added: inputs_embeds=inputs_embeds, | ||
| 418 | Added: attention_mask=attention_mask, | ||
| 419 | Added: position_ids=position_ids, | ||
| 420 | Added: past_key_values=past_key_values, | ||
| 421 | Added: use_cache=use_cache, | ||
| 422 | Added: output_attentions=output_attentions, | ||
| 423 | Added: output_hidden_states=output_hidden_states, | ||
| 424 | Added: return_dict=True, | ||
| 425 | Added: ) | ||
| 426 | Added: logits = outputs.logits | ||
| 427 | Added: | ||
| 428 | Added: loss = None | ||
| 429 | Added: if labels is not None: | ||
| 430 | Added: shift_logits = logits[..., :-1, :].contiguous() | ||
| 431 | Added: shift_labels = labels[..., 1:].contiguous() | ||
| 432 | Added: loss_fct = CrossEntropyLoss() | ||
| 433 | Added: shift_logits = shift_logits.view(-1, self.language_model.config.vocab_size) | ||
| 434 | Added: shift_labels = shift_labels.view(-1) | ||
| 435 | Added: shift_labels = shift_labels.to(shift_logits.device) | ||
| 436 | Added: loss = loss_fct(shift_logits, shift_labels) | ||
| 437 | Added: | ||
| 438 | Added: return CausalLMOutputWithPast( | ||
| 439 | Added: loss=loss, | ||
| 440 | Added: logits=logits, | ||
| 441 | Added: past_key_values=outputs.past_key_values, | ||
| 442 | Added: hidden_states=outputs.hidden_states, | ||
| 443 | Added: attentions=outputs.attentions, | ||
| 444 | Added: ) | ||
| 445 | Added: | ||
| 446 | Added: def prepare_inputs_for_generation( | ||
| 447 | Added: self, | ||
| 448 | Added: input_ids, | ||
| 449 | Added: past_key_values=None, | ||
| 450 | Added: attention_mask=None, | ||
| 451 | Added: inputs_embeds=None, | ||
| 452 | Added: pixel_values=None, | ||
| 453 | Added: pixel_values_videos=None, | ||
| 454 | Added: sound_clips=None, | ||
| 455 | Added: image_flags=None, | ||
| 456 | Added: use_cache=True, | ||
| 457 | Added: is_first_iteration=False, | ||
| 458 | Added: **kwargs, | ||
| 459 | Added: ): | ||
| 460 | Added: model_inputs = super().prepare_inputs_for_generation( | ||
| 461 | Added: input_ids, | ||
| 462 | Added: past_key_values=past_key_values, | ||
| 463 | Added: attention_mask=attention_mask, | ||
| 464 | Added: inputs_embeds=inputs_embeds, | ||
| 465 | Added: pixel_values=pixel_values, | ||
| 466 | Added: pixel_values_videos=pixel_values_videos, | ||
| 467 | Added: sound_clips=sound_clips, | ||
| 468 | Added: image_flags=image_flags, | ||
| 469 | Added: use_cache=use_cache, | ||
| 470 | Added: is_first_iteration=is_first_iteration, | ||
| 471 | Added: **kwargs, | ||
| 472 | Added: ) | ||
| 473 | Added: | ||
| 474 | Added: # The multimodal inputs are only merged on the prefill step; drop them once the cache is warm. | ||
| 475 | Added: if not is_first_iteration and use_cache: | ||
| 476 | Added: model_inputs["pixel_values"] = None | ||
| 477 | Added: model_inputs["pixel_values_videos"] = None | ||
| 478 | Added: model_inputs["sound_clips"] = None | ||
| 479 | Added: model_inputs["image_flags"] = None | ||
| 480 | Added: | ||
| 481 | Added: return model_inputs | ||
| 482 | Added: | ||
| 483 | Added: | ||
| 484 | Added: __all__ = ["NemotronH_Omni_Reasoning_V3"] | ||
modeling_radio.py
Added+512 -0
modeling_radio.py
| @@ -0,0 +1,512 @@ | |||
| 1 | Added: # 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 | ||
| 2 | Added: # This file was automatically generated from src/transformers/models/radio/modular_radio.py. | ||
| 3 | Added: # Do NOT edit this file manually as any edits will be overwritten by the generation of | ||
| 4 | Added: # the file from the modular. If any change should be done, please apply the change to the | ||
| 5 | Added: # modular_radio.py file directly. One of our CI enforces this. | ||
| 6 | Added: # 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 | ||
| 7 | Added: # Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. | ||
| 8 | Added: # | ||
| 9 | Added: # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 10 | Added: # you may not use this file except in compliance with the License. | ||
| 11 | Added: # You may obtain a copy of the License at | ||
| 12 | Added: # | ||
| 13 | Added: # http://www.apache.org/licenses/LICENSE-2.0 | ||
| 14 | Added: # | ||
| 15 | Added: # Unless required by applicable law or agreed to in writing, software | ||
| 16 | Added: # distributed under the License is distributed on an "AS IS" BASIS, | ||
| 17 | Added: # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 18 | Added: # See the License for the specific language governing permissions and | ||
| 19 | Added: # limitations under the License. | ||
| 20 | Added: | ||
| 21 | Added: from collections.abc import Callable | ||
| 22 | Added: from dataclasses import dataclass | ||
| 23 | Added: | ||
| 24 | Added: import torch | ||
| 25 | Added: import torch.nn.functional as F | ||
| 26 | Added: from torch import nn | ||
| 27 | Added: from transformers import initialization as init | ||
| 28 | Added: from transformers.activations import ACT2FN | ||
| 29 | Added: from transformers.modeling_layers import GradientCheckpointingLayer | ||
| 30 | Added: from transformers.modeling_outputs import BaseModelOutput, ModelOutput | ||
| 31 | Added: from transformers.modeling_utils import ALL_ATTENTION_FUNCTIONS, PreTrainedModel | ||
| 32 | Added: from transformers.processing_utils import Unpack | ||
| 33 | Added: from transformers.utils import TransformersKwargs, auto_docstring, can_return_tuple | ||
| 34 | Added: from transformers.utils.generic import merge_with_config_defaults | ||
| 35 | Added: from transformers.utils.output_capturing import capture_outputs | ||
| 36 | Added: | ||
| 37 | Added: from transformers.conversion_mapping import register_checkpoint_conversion_mapping | ||
| 38 | Added: from transformers.core_model_loading import Chunk, WeightConverter, WeightRenaming | ||
| 39 | Added: | ||
| 40 | Added: from .configuration_radio import RadioConfig | ||
| 41 | Added: | ||
| 42 | Added: | ||
| 43 | Added: def register_radio_conversion_mapping(): | ||
| 44 | Added: """ | ||
| 45 | Added: Register the conversion mapping for RADIO vision models. | ||
| 46 | Added: | ||
| 47 | Added: Note: This is done here instead of in the global `conversion_mapping.py` because Transformers | ||
| 48 | Added: 5.8 predates the radio architecture and therefore ships no mapping for it. The language model | ||
| 49 | Added: needs no equivalent: `nemotron_h` has been upstream since v5.3.0, including its conversion | ||
| 50 | Added: mapping. The mapping rewrites released C-RADIO checkpoints (timm-style | ||
| 51 | Added: `radio_model.model.blocks` with fused qkv) into this implementation's module tree. | ||
| 52 | Added: """ | ||
| 53 | Added: | ||
| 54 | Added: register_checkpoint_conversion_mapping( | ||
| 55 | Added: "radio", | ||
| 56 | Added: [ | ||
| 57 | Added: WeightRenaming("radio_model.model.patch_generator.video_embedder", "embeddings.video_patch_projection"), | ||
| 58 | Added: WeightRenaming("radio_model.model.patch_generator.embedder", "embeddings.patch_projection"), | ||
| 59 | Added: WeightRenaming("radio_model.model.patch_generator.pos_embed", "embeddings.position_embedding"), | ||
| 60 | Added: WeightRenaming("radio_model.model.patch_generator.cls_token.token", "embeddings.cls_register_token"), | ||
| 61 | Added: WeightRenaming("radio_model.model.blocks", "encoder.layer"), | ||
| 62 | Added: WeightRenaming("attn.proj", "attention.output.dense"), | ||
| 63 | Added: WeightRenaming("radio_model.input_conditioner", "input_conditioner"), | ||
| 64 | Added: WeightRenaming("radio_model.summary_idxs", "summary_idxs"), | ||
| 65 | Added: WeightConverter( | ||
| 66 | Added: source_patterns="attn.qkv", | ||
| 67 | Added: target_patterns=[ | ||
| 68 | Added: "attention.attention.query", | ||
| 69 | Added: "attention.attention.key", | ||
| 70 | Added: "attention.attention.value", | ||
| 71 | Added: ], | ||
| 72 | Added: operations=[Chunk(dim=0)], | ||
| 73 | Added: ), | ||
| 74 | Added: ], | ||
| 75 | Added: overwrite=True, | ||
| 76 | Added: ) | ||
| 77 | Added: | ||
| 78 | Added: | ||
| 79 | Added: @dataclass | ||
| 80 | Added: class RadioModelOutput(ModelOutput): | ||
| 81 | Added: """Output of [`RadioModel`]. | ||
| 82 | Added: | ||
| 83 | Added: Args: | ||
| 84 | Added: summary (`torch.FloatTensor` of shape `(batch_size, num_summary_idxs * hidden_size)`): | ||
| 85 | Added: Flattened summary embedding, gathered from the cls tokens selected by `config.summary_idxs`. | ||
| 86 | Added: features (`torch.FloatTensor` of shape `(batch_size, num_patches, hidden_size)`): | ||
| 87 | Added: Dense spatial patch features. | ||
| 88 | Added: last_hidden_state (`torch.FloatTensor` of shape `(batch_size, sequence_length, hidden_size)`): | ||
| 89 | Added: Full token sequence (prefix tokens + patches) from the final encoder layer. | ||
| 90 | Added: hidden_states (`tuple[torch.FloatTensor]`, *optional*, returned when `output_hidden_states=True`): | ||
| 91 | Added: Tuple of `(batch_size, sequence_length, hidden_size)` tensors, one for the embedding output plus one for | ||
| 92 | Added: each encoder layer. | ||
| 93 | Added: attentions (`tuple[torch.FloatTensor]`, *optional*, returned when `output_attentions=True`): | ||
| 94 | Added: Tuple of `(batch_size, num_heads, sequence_length, sequence_length)` attention weights, one per layer. | ||
| 95 | Added: """ | ||
| 96 | Added: | ||
| 97 | Added: summary: torch.FloatTensor | None = None | ||
| 98 | Added: features: torch.FloatTensor | None = None | ||
| 99 | Added: last_hidden_state: torch.FloatTensor | None = None | ||
| 100 | Added: hidden_states: tuple[torch.FloatTensor] | None = None | ||
| 101 | Added: attentions: tuple[torch.FloatTensor] | None = None | ||
| 102 | Added: | ||
| 103 | Added: | ||
| 104 | Added: class RadioInputConditioner(nn.Module): | ||
| 105 | Added: """Normalizes pixel values; arithmetic is done in float32 then cast back.""" | ||
| 106 | Added: | ||
| 107 | Added: def __init__(self, config: RadioConfig): | ||
| 108 | Added: super().__init__() | ||
| 109 | Added: self.register_buffer("norm_mean", torch.tensor(config.norm_mean).view(-1, 1, 1), persistent=True) | ||
| 110 | Added: self.register_buffer("norm_std", torch.tensor(config.norm_std).view(-1, 1, 1), persistent=True) | ||
| 111 | Added: | ||
| 112 | Added: def forward(self, pixel_values: torch.Tensor) -> torch.Tensor: | ||
| 113 | Added: normalized = (pixel_values.float() - self.norm_mean.float()) / self.norm_std.float() | ||
| 114 | Added: return normalized.to(pixel_values.dtype) | ||
| 115 | Added: | ||
| 116 | Added: | ||
| 117 | Added: class RadioPatchEmbeddings(nn.Module): | ||
| 118 | Added: """Cropped Position Embedding (CPE) patch generator. | ||
| 119 | Added: | ||
| 120 | Added: Splits the image into patches, projects them, adds a resolution-interpolated | ||
| 121 | Added: absolute position embedding, and prepends learned cls + register tokens. | ||
| 122 | Added: """ | ||
| 123 | Added: | ||
| 124 | Added: def __init__(self, config: RadioConfig): | ||
| 125 | Added: super().__init__() | ||
| 126 | Added: self.patch_size = config.patch_size | ||
| 127 | Added: self.embed_dim = config.hidden_size | ||
| 128 | Added: self.num_cls_tokens = config.num_cls_tokens | ||
| 129 | Added: self.num_registers = config.num_registers | ||
| 130 | Added: | ||
| 131 | Added: self.max_rows = config.max_img_size // config.patch_size | ||
| 132 | Added: self.max_cols = config.max_img_size // config.patch_size | ||
| 133 | Added: num_positions = self.max_rows * self.max_cols | ||
| 134 | Added: | ||
| 135 | Added: self.patch_projection = nn.Linear(config.num_channels * config.patch_size**2, config.hidden_size, bias=False) | ||
| 136 | Added: if config.video_temporal_patch_size is not None: | ||
| 137 | Added: self.video_patch_projection = nn.Linear( | ||
| 138 | Added: config.video_temporal_patch_size * config.num_channels * config.patch_size**2, | ||
| 139 | Added: config.hidden_size, | ||
| 140 | Added: bias=False, | ||
| 141 | Added: ) | ||
| 142 | Added: self.position_embedding = nn.Parameter(torch.zeros(1, num_positions, config.hidden_size)) | ||
| 143 | Added: self.cls_register_token = nn.Parameter( | ||
| 144 | Added: torch.zeros(config.num_cls_tokens + config.num_registers, config.hidden_size) | ||
| 145 | Added: ) | ||
| 146 | Added: | ||
| 147 | Added: def _image_to_patches(self, pixel_values: torch.Tensor) -> torch.Tensor: | ||
| 148 | Added: ps = self.patch_size | ||
| 149 | Added: batch, channels, height, width = pixel_values.shape | ||
| 150 | Added: rows, cols = height // ps, width // ps | ||
| 151 | Added: patches = pixel_values.reshape(batch, channels, rows, ps, cols, ps) | ||
| 152 | Added: patches = patches.permute(0, 2, 4, 1, 3, 5).reshape(batch, rows * cols, channels * ps * ps) | ||
| 153 | Added: return patches | ||
| 154 | Added: | ||
| 155 | Added: def _interpolate_position_embedding(self, input_dims: tuple[int, int], dtype: torch.dtype) -> torch.Tensor: | ||
| 156 | Added: pos = self.position_embedding.reshape(1, self.max_rows, self.max_cols, -1).permute(0, 3, 1, 2) | ||
| 157 | Added: max_dim = max(input_dims) | ||
| 158 | Added: pos = F.interpolate(pos.float(), size=(max_dim, max_dim), mode="bilinear", align_corners=False).to(dtype) | ||
| 159 | Added: if input_dims[0] < pos.shape[-2]: | ||
| 160 | Added: pos = pos[..., : input_dims[0], :] | ||
| 161 | Added: if input_dims[1] < pos.shape[-1]: | ||
| 162 | Added: pos = pos[..., :, : input_dims[1]] | ||
| 163 | Added: if pos.shape[-2:] != tuple(input_dims): | ||
| 164 | Added: pos = F.interpolate(pos.float(), size=tuple(input_dims), mode="bilinear", align_corners=False).to(dtype) | ||
| 165 | Added: return pos.flatten(2).permute(0, 2, 1) | ||
| 166 | Added: | ||
| 167 | Added: def forward(self, pixel_values: torch.Tensor, use_video_patch_projection: bool = False) -> torch.Tensor: | ||
| 168 | Added: projection = self.video_patch_projection if use_video_patch_projection else self.patch_projection | ||
| 169 | Added: patches = projection(self._image_to_patches(pixel_values)) | ||
| 170 | Added: input_dims = (pixel_values.shape[-2] // self.patch_size, pixel_values.shape[-1] // self.patch_size) | ||
| 171 | Added: patches = patches + self._interpolate_position_embedding(input_dims, patches.dtype) | ||
| 172 | Added: prefix = self.cls_register_token.unsqueeze(0).expand(patches.shape[0], -1, -1) | ||
| 173 | Added: return torch.cat([prefix, patches], dim=1) | ||
| 174 | Added: | ||
| 175 | Added: | ||
| 176 | Added: class RadioMLP(nn.Module): | ||
| 177 | Added: def __init__(self, config) -> None: | ||
| 178 | Added: super().__init__() | ||
| 179 | Added: in_features = out_features = config.hidden_size | ||
| 180 | Added: hidden_features = int(config.hidden_size * config.mlp_ratio) | ||
| 181 | Added: self.fc1 = nn.Linear(in_features, hidden_features, bias=True) | ||
| 182 | Added: if isinstance(config.hidden_act, str): | ||
| 183 | Added: self.activation = ACT2FN[config.hidden_act] | ||
| 184 | Added: else: | ||
| 185 | Added: self.activation = config.hidden_act | ||
| 186 | Added: self.fc2 = nn.Linear(hidden_features, out_features, bias=True) | ||
| 187 | Added: | ||
| 188 | Added: def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: | ||
| 189 | Added: hidden_state = self.fc1(hidden_state) | ||
| 190 | Added: hidden_state = self.activation(hidden_state) | ||
| 191 | Added: hidden_state = self.fc2(hidden_state) | ||
| 192 | Added: return hidden_state | ||
| 193 | Added: | ||
| 194 | Added: | ||
| 195 | Added: class RadioLayerScale(nn.Module): | ||
| 196 | Added: def __init__(self, config) -> None: | ||
| 197 | Added: super().__init__() | ||
| 198 | Added: self.lambda1 = nn.Parameter(config.layerscale_value * torch.ones(config.hidden_size)) | ||
| 199 | Added: | ||
| 200 | Added: def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: | ||
| 201 | Added: return hidden_state * self.lambda1 | ||
| 202 | Added: | ||
| 203 | Added: | ||
| 204 | Added: def eager_attention_forward( | ||
| 205 | Added: module: nn.Module, | ||
| 206 | Added: query: torch.Tensor, | ||
| 207 | Added: key: torch.Tensor, | ||
| 208 | Added: value: torch.Tensor, | ||
| 209 | Added: attention_mask: torch.Tensor | None, | ||
| 210 | Added: scaling: float | None = None, | ||
| 211 | Added: dropout: float = 0.0, | ||
| 212 | Added: **kwargs: Unpack[TransformersKwargs], | ||
| 213 | Added: ): | ||
| 214 | Added: if scaling is None: | ||
| 215 | Added: scaling = query.size(-1) ** -0.5 | ||
| 216 | Added: | ||
| 217 | Added: # Take the dot product between "query" and "key" to get the raw attention scores. | ||
| 218 | Added: attn_weights = torch.matmul(query, key.transpose(2, 3)) * scaling | ||
| 219 | Added: | ||
| 220 | Added: if attention_mask is not None: | ||
| 221 | Added: attn_weights = attn_weights + attention_mask | ||
| 222 | Added: | ||
| 223 | Added: attn_weights = nn.functional.softmax(attn_weights, dim=-1) | ||
| 224 | Added: attn_weights = nn.functional.dropout(attn_weights, p=dropout, training=module.training) | ||
| 225 | Added: | ||
| 226 | Added: attn_output = torch.matmul(attn_weights, value) | ||
| 227 | Added: attn_output = attn_output.transpose(1, 2).contiguous() | ||
| 228 | Added: | ||
| 229 | Added: return attn_output, attn_weights | ||
| 230 | Added: | ||
| 231 | Added: | ||
| 232 | Added: # Todo - Refactor as part of vision refactor. Copied from transformers.models.vit.modeling_vit.ViTAttention with ViT->Radio | ||
| 233 | Added: class RadioSelfAttention(nn.Module): | ||
| 234 | Added: def __init__(self, config: RadioConfig): | ||
| 235 | Added: super().__init__() | ||
| 236 | Added: if config.hidden_size % config.num_attention_heads != 0 and not hasattr(config, "embedding_size"): | ||
| 237 | Added: raise ValueError( | ||
| 238 | Added: f"The hidden size {config.hidden_size} is not a multiple of the number of attention " | ||
| 239 | Added: f"heads {config.num_attention_heads}." | ||
| 240 | Added: ) | ||
| 241 | Added: | ||
| 242 | Added: self.config = config | ||
| 243 | Added: self.num_attention_heads = config.num_attention_heads | ||
| 244 | Added: self.attention_head_size = int(config.hidden_size / config.num_attention_heads) | ||
| 245 | Added: self.all_head_size = self.num_attention_heads * self.attention_head_size | ||
| 246 | Added: self.dropout_prob = config.attention_probs_dropout_prob | ||
| 247 | Added: self.scaling = self.attention_head_size**-0.5 | ||
| 248 | Added: self.is_causal = False | ||
| 249 | Added: | ||
| 250 | Added: self.query = nn.Linear(config.hidden_size, self.all_head_size, bias=config.qkv_bias) | ||
| 251 | Added: self.key = nn.Linear(config.hidden_size, self.all_head_size, bias=config.qkv_bias) | ||
| 252 | Added: self.value = nn.Linear(config.hidden_size, self.all_head_size, bias=config.qkv_bias) | ||
| 253 | Added: | ||
| 254 | Added: def forward( | ||
| 255 | Added: self, | ||
| 256 | Added: hidden_states: torch.Tensor, | ||
| 257 | Added: **kwargs: Unpack[TransformersKwargs], | ||
| 258 | Added: ) -> tuple[torch.Tensor, torch.Tensor]: | ||
| 259 | Added: batch_size = hidden_states.shape[0] | ||
| 260 | Added: new_shape = batch_size, -1, self.num_attention_heads, self.attention_head_size | ||
| 261 | Added: | ||
| 262 | Added: key_layer = self.key(hidden_states).view(*new_shape).transpose(1, 2) | ||
| 263 | Added: value_layer = self.value(hidden_states).view(*new_shape).transpose(1, 2) | ||
| 264 | Added: query_layer = self.query(hidden_states).view(*new_shape).transpose(1, 2) | ||
| 265 | Added: | ||
| 266 | Added: attention_interface: Callable = ALL_ATTENTION_FUNCTIONS.get_interface( | ||
| 267 | Added: self.config._attn_implementation, eager_attention_forward | ||
| 268 | Added: ) | ||
| 269 | Added: | ||
| 270 | Added: context_layer, attention_probs = attention_interface( | ||
| 271 | Added: self, | ||
| 272 | Added: query_layer, | ||
| 273 | Added: key_layer, | ||
| 274 | Added: value_layer, | ||
| 275 | Added: None, | ||
| 276 | Added: is_causal=self.is_causal, | ||
| 277 | Added: scaling=self.scaling, | ||
| 278 | Added: dropout=0.0 if not self.training else self.dropout_prob, | ||
| 279 | Added: **kwargs, | ||
| 280 | Added: ) | ||
| 281 | Added: | ||
| 282 | Added: new_context_layer_shape = context_layer.size()[:-2] + (self.all_head_size,) | ||
| 283 | Added: context_layer = context_layer.reshape(new_context_layer_shape) | ||
| 284 | Added: | ||
| 285 | Added: return context_layer, attention_probs | ||
| 286 | Added: | ||
| 287 | Added: | ||
| 288 | Added: # Todo - Refactor as part of vision refactor. Copied from transformers.models.vit.modeling_vit.ViTAttention with ViT->Radio | ||
| 289 | Added: class RadioSelfOutput(nn.Module): | ||
| 290 | Added: """ | ||
| 291 | Added: The residual connection is defined in RadioLayer instead of here (as is the case with other models), due to the | ||
| 292 | Added: layernorm applied before each block. | ||
| 293 | Added: """ | ||
| 294 | Added: | ||
| 295 | Added: def __init__(self, config: RadioConfig): | ||
| 296 | Added: super().__init__() | ||
| 297 | Added: self.dense = nn.Linear(config.hidden_size, config.hidden_size) | ||
| 298 | Added: self.dropout = nn.Dropout(config.hidden_dropout_prob) | ||
| 299 | Added: | ||
| 300 | Added: def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Tensor) -> torch.Tensor: | ||
| 301 | Added: hidden_states = self.dense(hidden_states) | ||
| 302 | Added: hidden_states = self.dropout(hidden_states) | ||
| 303 | Added: return hidden_states | ||
| 304 | Added: | ||
| 305 | Added: | ||
| 306 | Added: # Todo - Refactor as part of vision refactor. Copied from transformers.models.vit.modeling_vit.ViTAttention with ViT->Radio | ||
| 307 | Added: class RadioAttention(nn.Module): | ||
| 308 | Added: def __init__(self, config: RadioConfig): | ||
| 309 | Added: super().__init__() | ||
| 310 | Added: self.attention = RadioSelfAttention(config) | ||
| 311 | Added: self.output = RadioSelfOutput(config) | ||
| 312 | Added: | ||
| 313 | Added: def forward( | ||
| 314 | Added: self, | ||
| 315 | Added: hidden_states: torch.Tensor, | ||
| 316 | Added: **kwargs: Unpack[TransformersKwargs], | ||
| 317 | Added: ) -> torch.Tensor: | ||
| 318 | Added: self_attn_output, _ = self.attention(hidden_states, **kwargs) | ||
| 319 | Added: output = self.output(self_attn_output, hidden_states) | ||
| 320 | Added: return output | ||
| 321 | Added: | ||
| 322 | Added: | ||
| 323 | Added: class RadioSwiGLUFFN(nn.Module): | ||
| 324 | Added: def __init__(self, config) -> None: | ||
| 325 | Added: super().__init__() | ||
| 326 | Added: in_features = out_features = config.hidden_size | ||
| 327 | Added: hidden_features = int(config.hidden_size * config.mlp_ratio) | ||
| 328 | Added: hidden_features = (int(hidden_features * 2 / 3) + 7) // 8 * 8 | ||
| 329 | Added: | ||
| 330 | Added: self.weights_in = nn.Linear(in_features, 2 * hidden_features, bias=True) | ||
| 331 | Added: self.weights_out = nn.Linear(hidden_features, out_features, bias=True) | ||
| 332 | Added: | ||
| 333 | Added: def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: | ||
| 334 | Added: hidden_state = self.weights_in(hidden_state) | ||
| 335 | Added: x1, x2 = hidden_state.chunk(2, dim=-1) | ||
| 336 | Added: hidden = nn.functional.silu(x1) * x2 | ||
| 337 | Added: return self.weights_out(hidden) | ||
| 338 | Added: | ||
| 339 | Added: | ||
| 340 | Added: class RadioDropPath(nn.Module): | ||
| 341 | Added: """Stochastic depth (DropPath) per sample, for residual blocks. | ||
| 342 | Added: | ||
| 343 | Added: Identity when ``drop_prob`` is 0 or outside training. See `Deep Networks with Stochastic Depth | ||
| 344 | Added: <https://arxiv.org/abs/1603.09382>`_. | ||
| 345 | Added: """ | ||
| 346 | Added: | ||
| 347 | Added: def __init__(self, drop_prob: float = 0.0) -> None: | ||
| 348 | Added: super().__init__() | ||
| 349 | Added: self.drop_prob = drop_prob | ||
| 350 | Added: | ||
| 351 | Added: def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: | ||
| 352 | Added: if self.drop_prob == 0.0 or not self.training: | ||
| 353 | Added: return hidden_states | ||
| 354 | Added: keep_prob = 1 - self.drop_prob | ||
| 355 | Added: shape = (hidden_states.shape[0],) + (1,) * (hidden_states.ndim - 1) | ||
| 356 | Added: random_tensor = torch.rand(shape, dtype=hidden_states.dtype, device=hidden_states.device) | ||
| 357 | Added: random_tensor = torch.floor(random_tensor + keep_prob) | ||
| 358 | Added: return hidden_states.div(keep_prob) * random_tensor | ||
| 359 | Added: | ||
| 360 | Added: def extra_repr(self) -> str: | ||
| 361 | Added: return f"p={self.drop_prob}" | ||
| 362 | Added: | ||
| 363 | Added: | ||
| 364 | Added: class RadioLayer(GradientCheckpointingLayer): | ||
| 365 | Added: """This corresponds to the Block class in the original implementation.""" | ||
| 366 | Added: | ||
| 367 | Added: def __init__(self, config: RadioConfig) -> None: | ||
| 368 | Added: super().__init__() | ||
| 369 | Added: | ||
| 370 | Added: self.norm1 = nn.LayerNorm(config.hidden_size, eps=config.layer_norm_eps) | ||
| 371 | Added: self.attention = RadioAttention(config) | ||
| 372 | Added: self.layer_scale1 = RadioLayerScale(config) | ||
| 373 | Added: self.drop_path = RadioDropPath(config.drop_path_rate) if config.drop_path_rate > 0.0 else nn.Identity() | ||
| 374 | Added: | ||
| 375 | Added: self.norm2 = nn.LayerNorm(config.hidden_size, eps=config.layer_norm_eps) | ||
| 376 | Added: | ||
| 377 | Added: if config.use_swiglu_ffn: | ||
| 378 | Added: self.mlp = RadioSwiGLUFFN(config) | ||
| 379 | Added: else: | ||
| 380 | Added: self.mlp = RadioMLP(config) | ||
| 381 | Added: self.layer_scale2 = RadioLayerScale(config) | ||
| 382 | Added: | ||
| 383 | Added: def forward( | ||
| 384 | Added: self, | ||
| 385 | Added: hidden_states: torch.Tensor, | ||
| 386 | Added: ) -> torch.Tensor: | ||
| 387 | Added: hidden_states_norm = self.norm1(hidden_states) | ||
| 388 | Added: self_attention_output = self.attention(hidden_states_norm) | ||
| 389 | Added: self_attention_output = self.layer_scale1(self_attention_output) | ||
| 390 | Added: | ||
| 391 | Added: # first residual connection | ||
| 392 | Added: hidden_states = self.drop_path(self_attention_output) + hidden_states | ||
| 393 | Added: | ||
| 394 | Added: # in Radio, layernorm is also applied after self-attention | ||
| 395 | Added: layer_output = self.norm2(hidden_states) | ||
| 396 | Added: layer_output = self.mlp(layer_output) | ||
| 397 | Added: layer_output = self.layer_scale2(layer_output) | ||
| 398 | Added: | ||
| 399 | Added: # second residual connection | ||
| 400 | Added: layer_output = self.drop_path(layer_output) + hidden_states | ||
| 401 | Added: | ||
| 402 | Added: return layer_output | ||
| 403 | Added: | ||
| 404 | Added: | ||
| 405 | Added: @auto_docstring | ||
| 406 | Added: class RadioPreTrainedModel(PreTrainedModel): | ||
| 407 | Added: config_class = RadioConfig | ||
| 408 | Added: base_model_prefix = "model" | ||
| 409 | Added: main_input_name = "pixel_values" | ||
| 410 | Added: supports_gradient_checkpointing = True | ||
| 411 | Added: _no_split_modules = ["RadioLayer"] | ||
| 412 | Added: _keys_to_ignore_on_load_missing = [r"layer_scale\d+\.lambda1"] | ||
| 413 | Added: _supports_sdpa = True | ||
| 414 | Added: _supports_flash_attn = True | ||
| 415 | Added: _can_record_outputs = { | ||
| 416 | Added: "hidden_states": RadioLayer, | ||
| 417 | Added: "attentions": RadioSelfAttention, | ||
| 418 | Added: } | ||
| 419 | Added: | ||
| 420 | Added: @torch.no_grad() | ||
| 421 | Added: def _init_weights(self, module): | ||
| 422 | Added: # Use `transformers.initialization` (not in-place `.data` ops) so the | ||
| 423 | Added: # framework's `_is_hf_initialized` guard skips already-loaded params. | ||
| 424 | Added: std = self.config.initializer_range | ||
| 425 | Added: if isinstance(module, nn.Linear): | ||
| 426 | Added: init.trunc_normal_(module.weight, mean=0.0, std=std) | ||
| 427 | Added: if module.bias is not None: | ||
| 428 | Added: init.zeros_(module.bias) | ||
| 429 | Added: elif isinstance(module, nn.LayerNorm): | ||
| 430 | Added: init.zeros_(module.bias) | ||
| 431 | Added: init.ones_(module.weight) | ||
| 432 | Added: elif isinstance(module, RadioPatchEmbeddings): | ||
| 433 | Added: init.trunc_normal_(module.position_embedding, mean=0.0, std=std) | ||
| 434 | Added: init.trunc_normal_(module.cls_register_token, mean=0.0, std=std) | ||
| 435 | Added: elif isinstance(module, RadioLayerScale): | ||
| 436 | Added: init.constant_(module.lambda1, self.config.layerscale_value) | ||
| 437 | Added: elif isinstance(module, RadioInputConditioner): | ||
| 438 | Added: init.copy_(module.norm_mean, torch.tensor(self.config.norm_mean).view(-1, 1, 1)) | ||
| 439 | Added: init.copy_(module.norm_std, torch.tensor(self.config.norm_std).view(-1, 1, 1)) | ||
| 440 | Added: elif isinstance(module, RadioModel): | ||
| 441 | Added: init.copy_(module.summary_idxs, torch.tensor(self.config.summary_idxs, dtype=torch.long)) | ||
| 442 | Added: | ||
| 443 | Added: | ||
| 444 | Added: class RadioEncoder(RadioPreTrainedModel): | ||
| 445 | Added: def __init__(self, config: RadioConfig): | ||
| 446 | Added: super().__init__(config) | ||
| 447 | Added: self.layer = nn.ModuleList([RadioLayer(config) for _ in range(config.num_hidden_layers)]) | ||
| 448 | Added: self.post_init() | ||
| 449 | Added: | ||
| 450 | Added: @merge_with_config_defaults | ||
| 451 | Added: @capture_outputs(tie_last_hidden_states=False) | ||
| 452 | Added: def forward(self, hidden_states: torch.Tensor, **kwargs: Unpack[TransformersKwargs]) -> BaseModelOutput: | ||
| 453 | Added: for layer in self.layer: | ||
| 454 | Added: hidden_states = layer(hidden_states) | ||
| 455 | Added: return BaseModelOutput(last_hidden_state=hidden_states) | ||
| 456 | Added: | ||
| 457 | Added: | ||
| 458 | Added: @auto_docstring | ||
| 459 | Added: class RadioModel(RadioPreTrainedModel): | ||
| 460 | Added: def __init__(self, config: RadioConfig): | ||
| 461 | Added: super().__init__(config) | ||
| 462 | Added: register_radio_conversion_mapping() | ||
| 463 | Added: self.config = config | ||
| 464 | Added: self.input_conditioner = RadioInputConditioner(config) | ||
| 465 | Added: self.embeddings = RadioPatchEmbeddings(config) | ||
| 466 | Added: self.encoder = RadioEncoder(config) | ||
| 467 | Added: self.register_buffer("summary_idxs", torch.tensor(config.summary_idxs, dtype=torch.long), persistent=True) | ||
| 468 | Added: self.post_init() | ||
| 469 | Added: | ||
| 470 | Added: @property | ||
| 471 | Added: def patch_size(self) -> int: | ||
| 472 | Added: return self.config.patch_size | ||
| 473 | Added: | ||
| 474 | Added: def make_preprocessor_external(self): | ||
| 475 | Added: """Detach the input conditioner (caller applies normalization itself).""" | ||
| 476 | Added: conditioner = self.input_conditioner | ||
| 477 | Added: self.input_conditioner = nn.Identity() | ||
| 478 | Added: return conditioner | ||
| 479 | Added: | ||
| 480 | Added: @can_return_tuple | ||
| 481 | Added: @auto_docstring | ||
| 482 | Added: def forward( | ||
| 483 | Added: self, | ||
| 484 | Added: pixel_values: torch.Tensor, | ||
| 485 | Added: use_video_patch_projection: bool = False, | ||
| 486 | Added: **kwargs: Unpack[TransformersKwargs], | ||
| 487 | Added: ) -> RadioModelOutput: | ||
| 488 | Added: r""" | ||
| 489 | Added: use_video_patch_projection (`bool`, *optional*, defaults to `False`): | ||
| 490 | Added: Use the `video_patch_projection` for temporally-packed video patches instead of the image | ||
| 491 | Added: `patch_projection`. Requires `config.video_temporal_patch_size` to be set. | ||
| 492 | Added: """ | ||
| 493 | Added: pixel_values = self.input_conditioner(pixel_values) | ||
| 494 | Added: hidden_states = self.embeddings(pixel_values, use_video_patch_projection=use_video_patch_projection) | ||
| 495 | Added: encoder_outputs: BaseModelOutput = self.encoder(hidden_states, **kwargs) | ||
| 496 | Added: last_hidden_state = encoder_outputs.last_hidden_state | ||
| 497 | Added: | ||
| 498 | Added: num_skip = self.config.num_summary_tokens | ||
| 499 | Added: all_summary = last_hidden_state[:, : self.config.num_cls_tokens] | ||
| 500 | Added: summary = all_summary[:, self.summary_idxs].flatten(1) | ||
| 501 | Added: features = last_hidden_state[:, num_skip:] | ||
| 502 | Added: | ||
| 503 | Added: return RadioModelOutput( | ||
| 504 | Added: summary=summary, | ||
| 505 | Added: features=features, | ||
| 506 | Added: last_hidden_state=last_hidden_state, | ||
| 507 | Added: hidden_states=encoder_outputs.hidden_states, | ||
| 508 | Added: attentions=encoder_outputs.attentions, | ||
| 509 | Added: ) | ||
| 510 | Added: | ||
| 511 | Added: | ||
| 512 | Added: __all__ = ["RadioModel", "RadioPreTrainedModel"] | ||
preprocessor_config.json
Added+26 -0
preprocessor_config.json
| @@ -0,0 +1,26 @@ | |||
| 1 | Added: { | ||
| 2 | Added: "_downsample_factor": 2, | ||
| 3 | Added: "auto_map": { | ||
| 4 | Added: "AutoImageProcessor": "image_processing_nemotron_h_omni.NemotronH_Omni_Reasoning_V3ImageProcessor", | ||
| 5 | Added: "AutoProcessor": "processing_nemotron_h_omni.NemotronH_Omni_Reasoning_V3Processor" | ||
| 6 | Added: }, | ||
| 7 | Added: "downsample_ratio": 0.5, | ||
| 8 | Added: "image_processor_type": "NemotronH_Omni_Reasoning_V3ImageProcessor", | ||
| 9 | Added: "max_model_len": 16384, | ||
| 10 | Added: "max_num_patches": 13312, | ||
| 11 | Added: "min_num_patches": 1024, | ||
| 12 | Added: "norm_mean": [ | ||
| 13 | Added: 0.48145466, | ||
| 14 | Added: 0.4578275, | ||
| 15 | Added: 0.40821073 | ||
| 16 | Added: ], | ||
| 17 | Added: "norm_std": [ | ||
| 18 | Added: 0.26862954, | ||
| 19 | Added: 0.26130258, | ||
| 20 | Added: 0.27577711 | ||
| 21 | Added: ], | ||
| 22 | Added: "patch_size": 16, | ||
| 23 | Added: "rescale_factor": 0.00392156862745098, | ||
| 24 | Added: "video_maintain_aspect_ratio": true, | ||
| 25 | Added: "video_target_num_patches": 1024 | ||
| 26 | Added: } | ||
privacy.md
Added+5 -0
privacy.md
| @@ -0,0 +1,5 @@ | |||
| 1 | Added: | Privacy Information | | ||
| 2 | Added: | :--- | | ||
| 3 | Added: | Nemotron 3.5 Super VL was trained on large-scale publicly available data that may contain images, audio-video, and text relating to people. NVIDIA collected and used this data in compliance with applicable data protection and privacy laws. This model was not designed to derive insights or otherwise learn from any personal data contained in the datasets. | | ||
| 4 | Added: | NVIDIA uses a combination of filters, data minimization techniques, and other guardrails to help prevent personal data from being recited by our models. We employ automated tools and data processing techniques during pre-training or training to identify and filter certain categories of personal data. | | ||
| 5 | Added: | Please review NVIDIA's [Privacy Policy](https://www.nvidia.com/en-us/about-nvidia/privacy-policy/) for more information. |(no newline at end of file) | ||
processing_nemotron_h_omni.py
Added+361 -0
processing_nemotron_h_omni.py
| @@ -0,0 +1,361 @@ | |||
| 1 | Added: # Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. | ||
| 2 | Added: # | ||
| 3 | Added: # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 4 | Added: # you may not use this file except in compliance with the License. | ||
| 5 | Added: # You may obtain a copy of the License at | ||
| 6 | Added: # | ||
| 7 | Added: # http://www.apache.org/licenses/LICENSE-2.0 | ||
| 8 | Added: # | ||
| 9 | Added: # Unless required by applicable law or agreed to in writing, software | ||
| 10 | Added: # distributed under the License is distributed on an "AS IS" BASIS, | ||
| 11 | Added: # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 12 | Added: # See the License for the specific language governing permissions and | ||
| 13 | Added: # limitations under the License. | ||
| 14 | Added: """Processor for the NemotronH Omni model (image + video + audio + text).""" | ||
| 15 | Added: | ||
| 16 | Added: import math | ||
| 17 | Added: from typing import Union | ||
| 18 | Added: | ||
| 19 | Added: import numpy as np | ||
| 20 | Added: from transformers.feature_extraction_utils import BatchFeature | ||
| 21 | Added: from transformers.image_utils import ImageInput | ||
| 22 | Added: from transformers.processing_utils import ImagesKwargs, ProcessingKwargs, ProcessorMixin, Unpack, VideosKwargs | ||
| 23 | Added: from transformers.tokenization_utils_base import PreTokenizedInput, TextInput | ||
| 24 | Added: from transformers.utils import is_torch_available | ||
| 25 | Added: from transformers.video_utils import VideoInput | ||
| 26 | Added: | ||
| 27 | Added: | ||
| 28 | Added: if is_torch_available(): | ||
| 29 | Added: import torch | ||
| 30 | Added: | ||
| 31 | Added: | ||
| 32 | Added: # Audio input type - file paths, numpy arrays, or torch tensors (or lists thereof). | ||
| 33 | Added: AudioInput = Union[str, "np.ndarray", "torch.Tensor", list] | ||
| 34 | Added: | ||
| 35 | Added: | ||
| 36 | Added: class NemotronH_Omni_Reasoning_V3ImagesKwargs(ImagesKwargs): | ||
| 37 | Added: min_pixels: int | None | ||
| 38 | Added: max_pixels: int | None | ||
| 39 | Added: patch_size: int | None | ||
| 40 | Added: temporal_patch_size: int | None | ||
| 41 | Added: merge_size: int | None | ||
| 42 | Added: | ||
| 43 | Added: | ||
| 44 | Added: class NemotronH_Omni_Reasoning_V3ProcessorKwargs(ProcessingKwargs, total=False): | ||
| 45 | Added: images_kwargs: NemotronH_Omni_Reasoning_V3ImagesKwargs | ||
| 46 | Added: videos_kwargs: VideosKwargs | ||
| 47 | Added: # `ProcessingKwargs` is a TypedDict, so `_defaults` is not inherited by subclasses and must be | ||
| 48 | Added: # (re)declared. Left empty on purpose — no defaults are overridden here (`padding` already | ||
| 49 | Added: # defaults to `False` in the tokenizer), so nothing needs to live in `processor_config.json`. | ||
| 50 | Added: _defaults = {} | ||
| 51 | Added: | ||
| 52 | Added: | ||
| 53 | Added: class NemotronH_Omni_Reasoning_V3Processor(ProcessorMixin): | ||
| 54 | Added: r""" | ||
| 55 | Added: Constructs a NemotronH Omni processor which wraps an image processor and a tokenizer into a | ||
| 56 | Added: single processor. | ||
| 57 | Added: | ||
| 58 | Added: [`NemotronH_Omni_Reasoning_V3Processor`] offers all the functionalities of the image | ||
| 59 | Added: processor and tokenizer. See [`~NemotronH_Omni_Reasoning_V3Processor.__call__`] and | ||
| 60 | Added: [`~NemotronH_Omni_Reasoning_V3Processor.decode`] for more information. | ||
| 61 | Added: | ||
| 62 | Added: Args: | ||
| 63 | Added: image_processor ([`NemotronH_Omni_Reasoning_V3ImageProcessor`], *optional*): | ||
| 64 | Added: The image processor. | ||
| 65 | Added: tokenizer ([`AutoTokenizer`], *optional*): | ||
| 66 | Added: The tokenizer. | ||
| 67 | Added: chat_template (`str`, *optional*): | ||
| 68 | Added: A Jinja template which will be used to convert lists of messages in a chat into a | ||
| 69 | Added: tokenizable string. | ||
| 70 | Added: audio_sampling_rate (`int`, *optional*, defaults to 16000): | ||
| 71 | Added: Sampling rate for audio processing. | ||
| 72 | Added: audio_subsampling_factor (`int`, *optional*, defaults to 8): | ||
| 73 | Added: Subsampling factor for the audio encoder. | ||
| 74 | Added: audio_hop_length (`int`, *optional*, defaults to 160): | ||
| 75 | Added: Hop length in samples for feature extraction. | ||
| 76 | Added: video_temporal_patch_dim (`int`, *optional*, defaults to 2): | ||
| 77 | Added: Number of frames collapsed into a single temporal patch by the model's video embedder. | ||
| 78 | Added: """ | ||
| 79 | Added: | ||
| 80 | Added: attributes = ["image_processor", "tokenizer"] | ||
| 81 | Added: tokenizer_class = "AutoTokenizer" | ||
| 82 | Added: | ||
| 83 | Added: def __init__( | ||
| 84 | Added: self, | ||
| 85 | Added: image_processor=None, | ||
| 86 | Added: tokenizer=None, | ||
| 87 | Added: chat_template=None, | ||
| 88 | Added: audio_sampling_rate: int = 16000, | ||
| 89 | Added: audio_subsampling_factor: int = 8, | ||
| 90 | Added: audio_hop_length: int = 160, | ||
| 91 | Added: video_temporal_patch_dim: int = 2, | ||
| 92 | Added: **kwargs, | ||
| 93 | Added: ): | ||
| 94 | Added: # Number of frames collapsed into a single temporal patch by the model's video embedder. | ||
| 95 | Added: self.video_temporal_patch_dim = video_temporal_patch_dim | ||
| 96 | Added: self.image_token = "<image>" if not hasattr(tokenizer, "image_token") else tokenizer.image_token | ||
| 97 | Added: self.video_token = "<video>" if not hasattr(tokenizer, "video_token") else tokenizer.video_token | ||
| 98 | Added: self.audio_token = "<so_embedding>" if not hasattr(tokenizer, "audio_token") else tokenizer.audio_token | ||
| 99 | Added: self.audio_start_token = "<so_start>" | ||
| 100 | Added: self.audio_end_token = "<so_end>" | ||
| 101 | Added: self.image_start_token = ( | ||
| 102 | Added: "<img>" if not hasattr(tokenizer, "image_start_token") else tokenizer.image_start_token | ||
| 103 | Added: ) | ||
| 104 | Added: self.image_end_token = "</img>" if not hasattr(tokenizer, "image_end_token") else tokenizer.image_end_token | ||
| 105 | Added: self.image_token_id = ( | ||
| 106 | Added: tokenizer.image_token_id | ||
| 107 | Added: if getattr(tokenizer, "image_token_id", None) | ||
| 108 | Added: else tokenizer.convert_tokens_to_ids(self.image_token) | ||
| 109 | Added: ) | ||
| 110 | Added: self.video_token_id = ( | ||
| 111 | Added: tokenizer.video_token_id | ||
| 112 | Added: if getattr(tokenizer, "video_token_id", None) | ||
| 113 | Added: else tokenizer.convert_tokens_to_ids(self.video_token) | ||
| 114 | Added: ) | ||
| 115 | Added: self.audio_token_id = ( | ||
| 116 | Added: tokenizer.audio_token_id | ||
| 117 | Added: if getattr(tokenizer, "audio_token_id", None) | ||
| 118 | Added: else tokenizer.convert_tokens_to_ids(self.audio_token) | ||
| 119 | Added: ) | ||
| 120 | Added: | ||
| 121 | Added: self.audio_sampling_rate = audio_sampling_rate | ||
| 122 | Added: self.audio_subsampling_factor = audio_subsampling_factor | ||
| 123 | Added: self.audio_hop_length = audio_hop_length | ||
| 124 | Added: | ||
| 125 | Added: super().__init__(image_processor, tokenizer, chat_template=chat_template) | ||
| 126 | Added: | ||
| 127 | Added: def __call__( | ||
| 128 | Added: self, | ||
| 129 | Added: images: ImageInput = None, | ||
| 130 | Added: text: TextInput | PreTokenizedInput | list[TextInput] | list[PreTokenizedInput] = None, | ||
| 131 | Added: videos: VideoInput = None, | ||
| 132 | Added: audio: AudioInput = None, | ||
| 133 | Added: **kwargs: Unpack[NemotronH_Omni_Reasoning_V3ProcessorKwargs], | ||
| 134 | Added: ) -> BatchFeature: | ||
| 135 | Added: """ | ||
| 136 | Added: Prepare multimodal inputs (text, images, videos, audio) for the model. | ||
| 137 | Added: | ||
| 138 | Added: Text `<image>` / `<video>` / `<audio>` tokens are expanded into placeholder sequences sized | ||
| 139 | Added: by the corresponding media, images/videos are run through the image processor, and audio is | ||
| 140 | Added: turned into raw waveforms with an estimated token count. Returns a [`BatchFeature`] with (as | ||
| 141 | Added: applicable) `input_ids`, `attention_mask`, `pixel_values`, `num_patches`, | ||
| 142 | Added: `pixel_values_videos`, and `sound_clips`. | ||
| 143 | Added: """ | ||
| 144 | Added: output_kwargs = self._merge_kwargs( | ||
| 145 | Added: NemotronH_Omni_Reasoning_V3ProcessorKwargs, | ||
| 146 | Added: tokenizer_init_kwargs=self.tokenizer.init_kwargs, | ||
| 147 | Added: **kwargs, | ||
| 148 | Added: ) | ||
| 149 | Added: image_inputs, videos_inputs, audio_inputs = {}, {}, {} | ||
| 150 | Added: | ||
| 151 | Added: if images is not None: | ||
| 152 | Added: image_inputs = self.image_processor(images=images, **output_kwargs["images_kwargs"]) | ||
| 153 | Added: image_num_tokens = image_inputs["num_tokens"] | ||
| 154 | Added: | ||
| 155 | Added: if videos is not None: | ||
| 156 | Added: # One tile per frame, but sized with the video rule (aspect ratio preserved). We flip a | ||
| 157 | Added: # flag on the image processor around the call rather than routing a new kwarg through | ||
| 158 | Added: # the strict `ImagesKwargs` dataclass. | ||
| 159 | Added: self.image_processor._is_video_mode = True | ||
| 160 | Added: try: | ||
| 161 | Added: videos_inputs = self.image_processor(images=videos, **output_kwargs["images_kwargs"]) | ||
| 162 | Added: finally: | ||
| 163 | Added: self.image_processor._is_video_mode = False | ||
| 164 | Added: video_num_patches = [sum(videos_inputs["num_patches"])] | ||
| 165 | Added: videos_inputs["pixel_values_videos"] = videos_inputs["pixel_values"] | ||
| 166 | Added: del videos_inputs["pixel_values"] | ||
| 167 | Added: | ||
| 168 | Added: audio_num_tokens = [] | ||
| 169 | Added: if audio is not None: | ||
| 170 | Added: audio_clips, audio_num_tokens = self._process_audio(audio, output_kwargs.get("audio_kwargs", {})) | ||
| 171 | Added: audio_inputs["sound_clips"] = audio_clips | ||
| 172 | Added: | ||
| 173 | Added: if not isinstance(text, list): | ||
| 174 | Added: text = [text] | ||
| 175 | Added: | ||
| 176 | Added: text = text.copy() # below lines change text in-place | ||
| 177 | Added: if images is not None: | ||
| 178 | Added: index = 0 | ||
| 179 | Added: for i in range(len(text)): | ||
| 180 | Added: while self.image_token in text[i]: | ||
| 181 | Added: n_tokens = image_num_tokens[index] | ||
| 182 | Added: text[i] = text[i].replace( | ||
| 183 | Added: self.image_token, | ||
| 184 | Added: self.image_start_token + "<|placeholder|>" * n_tokens + self.image_end_token, | ||
| 185 | Added: 1, | ||
| 186 | Added: ) | ||
| 187 | Added: index += 1 | ||
| 188 | Added: text[i] = text[i].replace("<|placeholder|>", self.image_token) | ||
| 189 | Added: | ||
| 190 | Added: if videos is not None: | ||
| 191 | Added: assert len(text) == 1, "Video is not supported for batch size > 1" | ||
| 192 | Added: video_metadata = output_kwargs.get("videos_kwargs", {}).get("video_metadata", None) | ||
| 193 | Added: i = 0 | ||
| 194 | Added: index = 0 | ||
| 195 | Added: if self.video_token in text[i]: | ||
| 196 | Added: # One `<img>...</img>` chunk per temporal patch (tubelet), labeled with the per-frame | ||
| 197 | Added: # timestamps joined by " and " ("Frame" for the first frame in the tubelet, "frame" | ||
| 198 | Added: # for the rest). | ||
| 199 | Added: tokens_per_tubelet = videos_inputs["num_tokens"][0] | ||
| 200 | Added: each_group = self.image_start_token + "<|placeholder|>" * tokens_per_tubelet + self.image_end_token | ||
| 201 | Added: T = self.video_temporal_patch_dim | ||
| 202 | Added: n_frames = video_num_patches[index] | ||
| 203 | Added: n_groups = (n_frames + T - 1) // T | ||
| 204 | Added: | ||
| 205 | Added: source_fps = video_metadata.fps if (video_metadata is not None and video_metadata.fps) else None | ||
| 206 | Added: frames_indices = video_metadata.frames_indices if video_metadata is not None else None | ||
| 207 | Added: if source_fps is not None: | ||
| 208 | Added: frame_duration_ms = int(1000.0 / source_fps) | ||
| 209 | Added: | ||
| 210 | Added: frame_labels = [] | ||
| 211 | Added: for g in range(n_groups): | ||
| 212 | Added: parts = [] | ||
| 213 | Added: for j in range(T): | ||
| 214 | Added: fi = g * T + j | ||
| 215 | Added: if fi >= n_frames: | ||
| 216 | Added: break # last group may be short | ||
| 217 | Added: prefix = "Frame" if j == 0 else "frame" | ||
| 218 | Added: if source_fps is not None and frames_indices is not None and fi < len(frames_indices): | ||
| 219 | Added: ts = int(frames_indices[fi]) * frame_duration_ms / 1000.0 | ||
| 220 | Added: parts.append(f"{prefix} {fi + 1} sampled at {ts:.2f} seconds") | ||
| 221 | Added: elif source_fps is not None: | ||
| 222 | Added: ts = fi / source_fps | ||
| 223 | Added: parts.append(f"{prefix} {fi + 1} sampled at {ts:.2f} seconds") | ||
| 224 | Added: else: | ||
| 225 | Added: parts.append(f"{prefix} {fi + 1}") | ||
| 226 | Added: frame_labels.append(" and ".join(parts) + ": ") | ||
| 227 | Added: | ||
| 228 | Added: video_prompt = "" | ||
| 229 | Added: for g, label in enumerate(frame_labels): | ||
| 230 | Added: if g > 0: | ||
| 231 | Added: video_prompt += "\n" | ||
| 232 | Added: video_prompt += label + each_group | ||
| 233 | Added: | ||
| 234 | Added: text[i] = text[i].replace(self.video_token, video_prompt, 1) | ||
| 235 | Added: # The tokenizer has no real `<video>` token, so we reuse `<image>` as the placeholder. | ||
| 236 | Added: # The model distinguishes image vs. video by which `pixel_values_*` arg was passed. | ||
| 237 | Added: text[i] = text[i].replace("<|placeholder|>", self.image_token) | ||
| 238 | Added: | ||
| 239 | Added: if audio is not None: | ||
| 240 | Added: index = 0 | ||
| 241 | Added: for i in range(len(text)): | ||
| 242 | Added: while self.audio_token in text[i]: | ||
| 243 | Added: num_tokens = audio_num_tokens[index] if index < len(audio_num_tokens) else 1 | ||
| 244 | Added: text[i] = text[i].replace( | ||
| 245 | Added: self.audio_token, | ||
| 246 | Added: self.audio_start_token + "<|audio_placeholder|>" * num_tokens + self.audio_end_token, | ||
| 247 | Added: 1, | ||
| 248 | Added: ) | ||
| 249 | Added: index += 1 | ||
| 250 | Added: text[i] = text[i].replace("<|audio_placeholder|>", self.audio_token) | ||
| 251 | Added: | ||
| 252 | Added: return_tensors = output_kwargs["text_kwargs"].pop("return_tensors", None) | ||
| 253 | Added: text_inputs = self.tokenizer(text, **output_kwargs["text_kwargs"]) | ||
| 254 | Added: | ||
| 255 | Added: output_data = {**text_inputs, **image_inputs, **videos_inputs} | ||
| 256 | Added: result = BatchFeature(data=output_data, tensor_type=return_tensors) | ||
| 257 | Added: | ||
| 258 | Added: # Audio clips stay as raw waveforms (list of numpy arrays), not tensors. | ||
| 259 | Added: if audio_inputs: | ||
| 260 | Added: result["sound_clips"] = audio_inputs["sound_clips"] | ||
| 261 | Added: | ||
| 262 | Added: return result | ||
| 263 | Added: | ||
| 264 | Added: def _process_audio(self, audio: AudioInput, audio_kwargs: dict) -> tuple: | ||
| 265 | Added: """Load/normalize audio to waveforms and estimate the number of audio embedding tokens.""" | ||
| 266 | Added: sampling_rate = audio_kwargs.get("sampling_rate", self.audio_sampling_rate) | ||
| 267 | Added: | ||
| 268 | Added: if not isinstance(audio, list): | ||
| 269 | Added: audio = [audio] | ||
| 270 | Added: | ||
| 271 | Added: audio_clips = [] | ||
| 272 | Added: num_tokens = [] | ||
| 273 | Added: for audio_item in audio: | ||
| 274 | Added: if isinstance(audio_item, str): | ||
| 275 | Added: waveform = self._load_audio(audio_item, sampling_rate) | ||
| 276 | Added: elif is_torch_available() and isinstance(audio_item, torch.Tensor): | ||
| 277 | Added: waveform = audio_item.numpy() if audio_item.dim() == 1 else audio_item.squeeze().numpy() | ||
| 278 | Added: elif isinstance(audio_item, np.ndarray): | ||
| 279 | Added: waveform = audio_item.squeeze() if audio_item.ndim > 1 else audio_item | ||
| 280 | Added: else: | ||
| 281 | Added: raise ValueError(f"Unsupported audio type: {type(audio_item)}") | ||
| 282 | Added: | ||
| 283 | Added: audio_clips.append(waveform) | ||
| 284 | Added: n_tokens = self._estimate_audio_num_embeddings(len(waveform)) | ||
| 285 | Added: num_tokens.append(max(1, n_tokens)) | ||
| 286 | Added: | ||
| 287 | Added: return audio_clips, num_tokens | ||
| 288 | Added: | ||
| 289 | Added: def _estimate_audio_num_embeddings(self, audio_length_samples: int) -> int: | ||
| 290 | Added: """Predict the number of `<so_embedding>` tokens the sound encoder emits for a raw clip. | ||
| 291 | Added: | ||
| 292 | Added: Mirrors `ParakeetFeatureExtractor` (center-padded STFT -> ``1 + L // hop`` mel frames) | ||
| 293 | Added: followed by the encoder's conv-subsampling (``log2(subsampling_factor)`` stride-2 stages). | ||
| 294 | Added: """ | ||
| 295 | Added: n_frames = 1 + audio_length_samples // self.audio_hop_length | ||
| 296 | Added: kernel_size = getattr(self, "audio_subsampling_conv_kernel_size", 3) | ||
| 297 | Added: stride = getattr(self, "audio_subsampling_conv_stride", 2) | ||
| 298 | Added: num_layers = int(math.log2(self.audio_subsampling_factor)) | ||
| 299 | Added: all_paddings = (kernel_size - 1) // 2 * 2 | ||
| 300 | Added: add_pad = all_paddings - kernel_size | ||
| 301 | Added: length = n_frames | ||
| 302 | Added: for _ in range(num_layers): | ||
| 303 | Added: length = (length + add_pad) // stride + 1 | ||
| 304 | Added: return length | ||
| 305 | Added: | ||
| 306 | Added: def _load_audio(self, audio_path: str, target_sr: int) -> np.ndarray: | ||
| 307 | Added: """Load (and resample) audio from a file path, using librosa or soundfile if available.""" | ||
| 308 | Added: try: | ||
| 309 | Added: import librosa | ||
| 310 | Added: | ||
| 311 | Added: waveform, _ = librosa.load(audio_path, sr=target_sr, mono=True) | ||
| 312 | Added: return waveform | ||
| 313 | Added: except ImportError: | ||
| 314 | Added: pass | ||
| 315 | Added: | ||
| 316 | Added: try: | ||
| 317 | Added: import soundfile as sf | ||
| 318 | Added: | ||
| 319 | Added: waveform, sr = sf.read(audio_path) | ||
| 320 | Added: if waveform.ndim > 1: | ||
| 321 | Added: waveform = waveform.mean(axis=1) | ||
| 322 | Added: if sr != target_sr: | ||
| 323 | Added: import scipy.signal | ||
| 324 | Added: | ||
| 325 | Added: num_samples = int(len(waveform) * target_sr / sr) | ||
| 326 | Added: waveform = scipy.signal.resample(waveform, num_samples) | ||
| 327 | Added: return waveform.astype(np.float32) | ||
| 328 | Added: except ImportError: | ||
| 329 | Added: pass | ||
| 330 | Added: | ||
| 331 | Added: raise ImportError( | ||
| 332 | Added: "Audio loading requires either librosa or soundfile. Install with: pip install librosa soundfile" | ||
| 333 | Added: ) | ||
| 334 | Added: | ||
| 335 | Added: def batch_decode(self, *args, **kwargs): | ||
| 336 | Added: """Forward to the tokenizer's [`~PreTrainedTokenizer.batch_decode`].""" | ||
| 337 | Added: return self.tokenizer.batch_decode(*args, **kwargs) | ||
| 338 | Added: | ||
| 339 | Added: def decode(self, *args, **kwargs): | ||
| 340 | Added: """Forward to the tokenizer's [`~PreTrainedTokenizer.decode`].""" | ||
| 341 | Added: return self.tokenizer.decode(*args, **kwargs) | ||
| 342 | Added: | ||
| 343 | Added: def post_process_image_text_to_text( | ||
| 344 | Added: self, generated_outputs, skip_special_tokens=True, clean_up_tokenization_spaces=False, **kwargs | ||
| 345 | Added: ): | ||
| 346 | Added: """Decode the model's generated token ids into text.""" | ||
| 347 | Added: return self.tokenizer.batch_decode( | ||
| 348 | Added: generated_outputs, | ||
| 349 | Added: skip_special_tokens=skip_special_tokens, | ||
| 350 | Added: clean_up_tokenization_spaces=clean_up_tokenization_spaces, | ||
| 351 | Added: **kwargs, | ||
| 352 | Added: ) | ||
| 353 | Added: | ||
| 354 | Added: @property | ||
| 355 | Added: def model_input_names(self): | ||
| 356 | Added: tokenizer_input_names = self.tokenizer.model_input_names | ||
| 357 | Added: image_processor_input_names = self.image_processor.model_input_names | ||
| 358 | Added: return list(dict.fromkeys(tokenizer_input_names + image_processor_input_names)) | ||
| 359 | Added: | ||
| 360 | Added: | ||
| 361 | Added: __all__ = ["NemotronH_Omni_Reasoning_V3Processor"] | ||
processor_config.json
Added+36 -0
processor_config.json
| @@ -0,0 +1,36 @@ | |||
| 1 | Added: { | ||
| 2 | Added: "audio_hop_length": 160, | ||
| 3 | Added: "audio_sampling_rate": 16000, | ||
| 4 | Added: "audio_subsampling_factor": 8, | ||
| 5 | Added: "auto_map": { | ||
| 6 | Added: "AutoProcessor": "processing_nemotron_h_omni.NemotronH_Omni_Reasoning_V3Processor" | ||
| 7 | Added: }, | ||
| 8 | Added: "image_processor": { | ||
| 9 | Added: "_downsample_factor": 2, | ||
| 10 | Added: "auto_map": { | ||
| 11 | Added: "AutoImageProcessor": "image_processing_nemotron_h_omni.NemotronH_Omni_Reasoning_V3ImageProcessor", | ||
| 12 | Added: "AutoProcessor": "processing_nemotron_h_omni.NemotronH_Omni_Reasoning_V3Processor" | ||
| 13 | Added: }, | ||
| 14 | Added: "downsample_ratio": 0.5, | ||
| 15 | Added: "image_processor_type": "NemotronH_Omni_Reasoning_V3ImageProcessor", | ||
| 16 | Added: "max_model_len": 16384, | ||
| 17 | Added: "max_num_patches": 13312, | ||
| 18 | Added: "min_num_patches": 1024, | ||
| 19 | Added: "norm_mean": [ | ||
| 20 | Added: 0.48145466, | ||
| 21 | Added: 0.4578275, | ||
| 22 | Added: 0.40821073 | ||
| 23 | Added: ], | ||
| 24 | Added: "norm_std": [ | ||
| 25 | Added: 0.26862954, | ||
| 26 | Added: 0.26130258, | ||
| 27 | Added: 0.27577711 | ||
| 28 | Added: ], | ||
| 29 | Added: "patch_size": 16, | ||
| 30 | Added: "rescale_factor": 0.00392156862745098, | ||
| 31 | Added: "video_maintain_aspect_ratio": true, | ||
| 32 | Added: "video_target_num_patches": 1024 | ||
| 33 | Added: }, | ||
| 34 | Added: "processor_class": "NemotronH_Omni_Reasoning_V3Processor", | ||
| 35 | Added: "video_temporal_patch_dim": 2 | ||
| 36 | Added: } | ||
safety.md
Added+9 -0
safety.md
| @@ -0,0 +1,9 @@ | |||
| 1 | Added: | Field | Response | | ||
| 2 | Added: | :---- | :---- | | ||
| 3 | Added: | Model Application Field(s): | Chat, Instruction Following, Chatbot Development, Code Generation, Reasoning, Customer Service | | ||
| 4 | Added: | Describe the life critical impact (if present). | Not Applicable | | ||
| 5 | Added: | Description of methods implemented in data acquisition or processing, if any, to address other types of potentially harmful data in the training, testing, and validation data: | We used a guard model for content safety to exclude potentially harmful data from training. | | ||
| 6 | Added: | Description of any methods implemented in data acquisition or processing, if any, to address illegal or harmful content in the training data, including, but not limited to, child sexual abuse material (CSAM) and non-consensual intimate imagery (NCII) | We used a Gemma-3 4B-based guard model trained on [Nemotron Content Safety Dataset v2](https://huggingface.co/datasets/nvidia/Aegis-AI-Content-Safety-Dataset-2.0) for content safety to exclude potentially illegal or harmful content from the training. | | ||
| 7 | Added: | Use Case Restrictions: | Use of this model is governed by the [OpenMDW License Agreement, version 1.1](https://raw.githubusercontent.com/OpenMDW/OpenMDW/refs/heads/main/1.1/LICENSE.OpenMDW-1.1) (OpenMDW-1.1).| | ||
| 8 | Added: | Model and dataset restrictions: | The Principle of least privilege (PoLP) is applied limiting access for dataset generation and model development. Restrictions enforce dataset access during training, and dataset license constraints adhered to. | | ||
| 9 | Added: | This AI model was developed based on our policies to ensure responsible data handling and risk mitigation. The datasets used for training have been scanned for harmful content and illegal content, consistent with our policies including scanning for Child Sexual Abuse Material (CSAM). Ongoing review and monitoring mechanisms are in place based on our policies and to maintain data integrity. | True. We use [Nemotron Content Safety Dataset V2](https://huggingface.co/datasets/nvidia/Aegis-AI-Content-Safety-Dataset-2.0) and an internal safety dataset specialized for minority sexuality for content safety evaluation to ensure the safety of this model. |(no newline at end of file) | ||
tokenizer.json
Added
tokenizer.json
Large (LFS-tracked) file content changed — 16 MB
tokenizer_config.json
Added+23 -0
tokenizer_config.json
| @@ -0,0 +1,23 @@ | |||
| 1 | Added: { | ||
| 2 | Added: "add_prefix_space": false, | ||
| 3 | Added: "auto_map": { | ||
| 4 | Added: "AutoProcessor": "processing_nemotron_h_omni.NemotronH_Omni_Reasoning_V3Processor" | ||
| 5 | Added: }, | ||
| 6 | Added: "backend": "tokenizers", | ||
| 7 | Added: "bos_token": "<s>", | ||
| 8 | Added: "clean_up_tokenization_spaces": false, | ||
| 9 | Added: "eos_token": "<|im_end|>", | ||
| 10 | Added: "fix_mistral_regex": true, | ||
| 11 | Added: "is_local": false, | ||
| 12 | Added: "local_files_only": false, | ||
| 13 | Added: "model_input_names": [ | ||
| 14 | Added: "input_ids", | ||
| 15 | Added: "attention_mask" | ||
| 16 | Added: ], | ||
| 17 | Added: "model_max_length": 1048576, | ||
| 18 | Added: "pad_token": "<|im_end|>", | ||
| 19 | Added: "padding_side": "left", | ||
| 20 | Added: "processor_class": "NemotronH_Omni_Reasoning_V3Processor", | ||
| 21 | Added: "tokenizer_class": "TokenizersBackend", | ||
| 22 | Added: "unk_token": "<unk>" | ||
| 23 | Added: } | ||
ultra_v3_reasoning_parser.py
Added+53 -0
ultra_v3_reasoning_parser.py
| @@ -0,0 +1,53 @@ | |||
| 1 | Added: from vllm.reasoning.abs_reasoning_parsers import ReasoningParserManager | ||
| 2 | Added: from vllm.reasoning.deepseek_r1_reasoning_parser import DeepSeekR1ReasoningParser | ||
| 3 | Added: | ||
| 4 | Added: | ||
| 5 | Added: @ReasoningParserManager.register_module("ultra_v3") | ||
| 6 | Added: class UltraV3ReasoningParser(DeepSeekR1ReasoningParser): | ||
| 7 | Added: def extract_reasoning(self, model_output, request): | ||
| 8 | Added: chat_template_kwargs = getattr(request, "chat_template_kwargs", None) or {} | ||
| 9 | Added: | ||
| 10 | Added: if chat_template_kwargs.get("enable_thinking") is False: | ||
| 11 | Added: """ | ||
| 12 | Added: The chat template ends the prompt with `<think></think>`, so the model | ||
| 13 | Added: never emits `</think>` and there is no reasoning channel at all. The | ||
| 14 | Added: `deepseek_r1` parser this inherits from assumes reasoning always comes | ||
| 15 | Added: first, so it would return the whole answer as reasoning content with an | ||
| 16 | Added: empty content field. Everything generated is content here, including any | ||
| 17 | Added: stray `</think>` the model echoes. | ||
| 18 | Added: """ | ||
| 19 | Added: return None, model_output or None | ||
| 20 | Added: | ||
| 21 | Added: reasoning_content, final_content = super().extract_reasoning( | ||
| 22 | Added: model_output, request | ||
| 23 | Added: ) | ||
| 24 | Added: | ||
| 25 | Added: if ( | ||
| 26 | Added: reasoning_content | ||
| 27 | Added: and reasoning_content.startswith("\n") | ||
| 28 | Added: and self.start_token in model_output | ||
| 29 | Added: ): | ||
| 30 | Added: """ | ||
| 31 | Added: The chat template owns the newline in `<think>\n` and re-adds it when it | ||
| 32 | Added: replays the turn, so `reasoning_content` must not carry it or the next | ||
| 33 | Added: prompt drifts by a token. Live vLLM output never contains the start token | ||
| 34 | Added: (the template prefilled it), so this only fires when the parser is handed | ||
| 35 | Added: a full assistant span: offline replay, the chat-template verifier, or | ||
| 36 | Added: re-parsing training data. | ||
| 37 | Added: """ | ||
| 38 | Added: reasoning_content = reasoning_content[1:] | ||
| 39 | Added: | ||
| 40 | Added: if ( | ||
| 41 | Added: final_content is None | ||
| 42 | Added: and chat_template_kwargs.get("force_nonempty_content") is True | ||
| 43 | Added: ): | ||
| 44 | Added: """ | ||
| 45 | Added: There are rare cases where the model will output only reasoning without an | ||
| 46 | Added: end-think token `</think>` (e.g. reasoning exceeds max length), which | ||
| 47 | Added: results in empty content returned. End users may want to unilaterally | ||
| 48 | Added: avoid such cases and always have a content response even if the model does | ||
| 49 | Added: not finish its reasoning. | ||
| 50 | Added: """ | ||
| 51 | Added: reasoning_content, final_content = None, reasoning_content | ||
| 52 | Added: | ||
| 53 | Added: return reasoning_content, final_content | ||