How Nvidia's New Nemotron Model Works
Nemotron is a transformer-based large language model that processes input text into token embeddings and decodes next tokens sequentially using its trained weights. A primary objective of Nemotron is maximizing text generation efficiency, which is essential for AI agents that execute frequent, repeated model calls for tool use and instruction following. The Nemotron Lightning model features 30 billion parameters and is engineered to optimize this iterative execution workload. Transformer-based language models allocate computational resources primarily between attention mechanisms and feed-forward networks. Attention enables information exchange between tokens using queries, keys, and values calculated across multiple attention heads, while feed-forward layers refine those representations. During autoregressive generation, models generate tokens iteratively, relying on KV caching to avoid recomputing keys and values. While processing the initial prompt incurs a quadratic computational cost relative to sequence length, subsequent generation using a KV cache scales linearly with context length. Nvidia's Nemotron 3 model reduces computational costs by combining Mamba layers and a mixture of experts (MoE) architecture. Mamba layers rely on a compact, fixed-size numerical state updated with each incoming token, eliminating the need for an expanding key-value cache despite potential trade-offs in precise retrieval over long histories. In addition, the MoE framework dynamically routes each token to a subset of expert feed-forward networks, keeping active computation low while preserving overall model capacity.
Read the original ↗Contents
How Nemotron Generates Text
Nemotron is a transformer-based large language model that processes input text into token embeddings and decodes next tokens sequentially using its trained weights. A primary objective of Nemotron is maximizing text generation efficiency, which is essential for AI agents that execute frequent, repeated model calls for tool use and instruction following. The Nemotron Lightning model features 30 billion parameters and is engineered to optimize this iterative execution workload.
- Nemotron functions as a standard transformer-based large language model converting tokens into embeddings and iteratively decoding next tokens.
- Text generation efficiency is critical for AI agents because they repeatedly read instructions, call tools, and parse tool outputs.
- A coding agent may require dozens of model invocations to resolve a single problem, making generation latency and efficiency vital.
- Nemotron Lightning contains 30 billion parameters and is designed to optimize repetitive execution workflows for agentic tasks.
How Does a Transformer Model Spend Resources
Transformer-based language models allocate computational resources primarily between attention mechanisms and feed-forward networks. Attention enables information exchange between tokens using queries, keys, and values calculated across multiple attention heads, while feed-forward layers refine those representations. During autoregressive generation, models generate tokens iteratively, relying on KV caching to avoid recomputing keys and values. While processing the initial prompt incurs a quadratic computational cost relative to sequence length, subsequent generation using a KV cache scales linearly with context length.
- Transformer models allocate resources between attention mechanisms and feed-forward computations.
- Attention allows tokens to share contextual information using query, key, and value representations processed across parallel attention heads.
- Feed-forward networks apply matrix operations and nonlinear transformations to refine token representations after attention gathers context.
- Autoregressive generation generates tokens one at a time, using previous outputs as subsequent inputs.
- The KV cache preserves previously computed keys and values to avoid redundant calculations, trading memory for compute efficiency.
- Initial prompt processing involves quadratic computational growth relative to prompt length, whereas generating with a KV cache scales linearly with history length.
How Nvidia’s Nemotron Reduces Costs
Nvidia's Nemotron 3 model reduces computational costs by combining Mamba layers and a mixture of experts (MoE) architecture. Mamba layers rely on a compact, fixed-size numerical state updated with each incoming token, eliminating the need for an expanding key-value cache despite potential trade-offs in precise retrieval over long histories. In addition, the MoE framework dynamically routes each token to a subset of expert feed-forward networks, keeping active computation low while preserving overall model capacity.
- Nvidia's Nemotron 3 model lowers computational costs by utilizing Mamba layers and a mixture of experts architecture.
- A Mamba layer maintains a bounded numerical state rather than storing an expanding key-value cache for previous tokens.
- During generation, the state size and per-token update cost of a Mamba layer remain constant.
- Compressing long token histories into a bounded numerical representation can hinder exact information retrieval.
- A mixture of experts architecture uses a router to selectively activate only a subset of feed-forward expert networks per token.
How Nemotron Uses Mamba and MoE
Nemotron integrates Mamba and attention mechanisms into a single architecture to achieve both efficient sequence processing and direct contextual access. Interleaving these layers allows the model to process sequences using compact states while retaining attention layers and key-value caches for distant token connections. The architecture also leverages Mixture of Experts (MoE), as seen in Nvidia's Lightning configuration featuring 128 routed experts per layer with 6 selected per token. This design enables a 30-billion-parameter model to execute with only roughly 3 billion active parameters per token, complemented by grouped-query attention to minimize memory overhead.
- Nemotron interleaves Mamba and attention layers to balance compact state sequence processing with direct long-range connections.
- Nvidia's Lightning configuration uses 128 routed experts per MoE layer and activates 6 experts per token.
- Sparse MoE activation enables a model with roughly 30 billion total parameters to compute only roughly 3 billion parameters per token.
- Although per-token compute is reduced via sparse activation, total parameter count still dictates the hosting memory requirements.
- The Lightning configuration implements grouped-query attention using 32 query heads and 2 key-value heads to optimize memory storage.
How Nvidia Trains Their Models
Nvidia's model training pipeline progresses through three key stages: pretraining, supervised fine-tuning (SFT), and reinforcement learning. During pretraining, the model shifts from broad datasets of crawled and synthetic material toward high-quality data to establish foundational representations. SFT then directs behavior by training specifically on assistant tokens within conversational context, while reinforcement learning via Group Relative Policy Optimization (GRPO) refines the model by scoring and comparing multiple generated responses across tasks like code execution and math evaluation.
- Nvidia's training pipeline follows a three-stage sequence: pretraining, supervised fine-tuning (SFT), and reinforcement learning.
- Pretraining progresses from a broad data mixture to high-quality material covering code, math, science, and general knowledge.
- Lightning's base model uses both crawled and synthetic material during pretraining.
- In Nvidia's SFT process, loss is calculated strictly on assistant tokens while user and system messages serve as context.
- Reinforcement learning is conducted via Group Relative Policy Optimization (GRPO), which scores multiple generated responses and updates the model based on relative performance.
- The training evaluation environment tests mathematical answers, executes code against test suites, checks instruction following, and validates output schemas.
How Nvidia Uses Multi-Token Prediction
Standard autoregressive token generation is bottlenecked by its sequential nature, as each token depends on previously generated outputs. Multi-token prediction (MTP) overcomes this limitation by training an auxiliary mechanism to predict multiple upcoming tokens simultaneously. During inference, these predictions enable speculative decoding, where candidate tokens from a drafting mechanism are verified in parallel by the main model. Nvidia incorporates this approach into its offerings by shipping models with both integrated MTP features and dedicated draft models.
- Standard autoregressive generation requires sequential passes because each token depends on the preceding sequence.
- Multi-token prediction (MTP) trains an auxiliary mechanism to forecast tokens further ahead.
- MTP predictions facilitate speculative decoding at inference time via candidate drafting and verification.
- Accepting drafted tokens allows generation to advance multiple positions while requiring fewer passes through the main model.
- Nvidia models ship with integrated MTP capabilities and separate draft models.
How Nvidia Uses Low-Precision Numbers to Reduce Storage
Nvidia optimizes model storage and memory transfer by replacing standard 16-bit BF16 representations with low-precision formats. To mitigate approximation errors, the company uses NVFP4, which combines four-bit floating-point values with both FP8 block scaling and tensor-level scaling. Additionally, Nvidia leverages quantization-aware distillation (QAD) to train a quantized student model against a fixed BF16 teacher model. These techniques reduced a model checkpoint size from roughly 66 GB to around 22 GB.
- Lowering weight bit precision reduces storage requirements and memory transfer overhead but introduces approximation error.
- The NVFP4 format utilizes four-bit floating-point values paired with an FP8 scale per group of 16 values and an additional tensor-level scale.
- Quantization-aware distillation (QAD) trains a quantized student model under simulated quantization using a fixed BF16 teacher model.
- Switching to NVFP4 checkpoints decreased the model size from approximately 66 GB in BF16 to approximately 22 GB.
Conclusion
Nvidia has scaled its Nemotron 3 family with the Super and Ultra models, featuring approximately 120 billion and 550 billion total parameters respectively. Both models utilize a hybrid Mamba-attention architecture integrated with LatentMoE, which projects token representations into a compact space to reduce memory traffic and communication costs during expert routing. Additionally, the Ultra model incorporates multi-teacher on-policy distillation, enabling the student model to receive targeted guidance on its own generated attempts from domain-specialized teachers.
- Nemotron 3 Super contains approximately 120 billion total parameters and 12 billion active parameters.
- Nemotron 3 Ultra scales up to 550 billion total parameters and 55 billion active parameters.
- Both Super and Ultra models combine a hybrid Mamba-attention design with LatentMoE.
- LatentMoE projects wide token representations into a smaller space before routed expert computation, saving memory traffic and communication overhead.
- The Ultra model uses multi-teacher on-policy distillation, allowing domain-specialized teachers to guide the student model on scenarios it directly encounters.