Skip to main content

Hybrid LLM architectures: Nemotron 3 and 3.5

Combining recurrent state, attention, experts, and numerical precision

A capable model must also move and store data efficiently. Nemotron 3 illustrates one response: combining Mamba-2 layers, selected attention layers, and Mixture-of-Experts (MoE), alongside generation and numerical-precision optimizations. This case study explains trade-offs; it is not a universal recipe. Beware of the shorthand “Transformer-based model” sometimes used in secondary summaries: Nemotron 3/3.5 is a hybrid Mamba–Attention–MoE architecture, not a conventional Transformer stack in which every block uses global attention.

Explain the complementarity of recurrent state and attention; distinguish total and active parameters; relate GQA, MTP, and quantization to their cost drivers; and separate general principles from version-specific characteristics.

The general principles behind this case

The mechanisms in this case illustrate general trade-offs: quadratic but parallelizable attention, recurrent state with linear work, a KV cache that grows with context, and sparse MoE computation with total weights still needing to be hosted. For a model-independent analysis — equations, training, prefill, decode, and hardware parallelism — see the guide to LLM complexity and parallelism.

Why combine architectures?

During autoregressive generation, a Transformer with global attention maintains a key-value (KV) cache that grows with context length. Each new token also attends over a longer history.

It is useful to distinguish the two inference phases. Prefill processes the full prompt: with dense global attention, interactions between positions grow quadratically with prompt length \(T\). During decode, the KV cache avoids recomputing keys and values already produced, but each new token still attends over the history: attention work per token therefore grows with context length, and the KV cache grows as well. For a prompt of length \(T\) followed by \(L\) generated tokens, decode attention work is approximately proportional to \(LT + L^2\), with architecture and dimensions held fixed.

A state-space layer such as Mamba-2 instead maintains a bounded recurrent state, updated at each token. Schematically:

\[ s_t = f_\theta(s_{t-1}, x_t), \qquad y_t = g_\theta(s_t, x_t). \]

There is no need to store a key-value pair for every past position. Sequence processing can be linear in sequence length, with bounded state during generation. The trade-off is that the state summarizes history: by itself, it does not provide the same direct access to a particular past position as explicit attention.

The mechanisms are complementary: - Mamba-2: efficient sequential processing and compact state; - attention: flexible access to previous representations, with a cache that depends on context length.

A hybrid architecture alternates them: Mamba processes much of the stream, while selected attention layers preserve explicit retrieval paths. Their proportion and placement require empirical evaluation.

MoE: total capacity and active computation

A Mixture-of-Experts layer contains multiple expert networks; a router selects a subset for each token. If \(N\) is the total number of experts and \(K < N\) the number activated for one token, the model can have substantial capacity while performing only part of the expert computation per token.

This is the distinction between total parameters and active parameters. Unselected parameters are not free: they generally still need to be stored or made accessible on accelerators. Active parameters mainly describe computation used per token; total parameters still affect model memory and weight transfers.

WarningSparsity is not compression

A 30-billion-parameter MoE with roughly 3 billion active parameters per token is not a dense 3-billion-parameter model. The other experts still exist and must be hosted or made accessible.

LatentMoE: routing in a more compact space

A conventional MoE routes a representation of dimension \(d\) to several experts. Even when only a few experts are active, moving representations and reading expert weights can become expensive. LatentMoE, used in Nemotron 3 Super and Ultra, adds a down-projection \(W_\downarrow : \mathbb{R}^{d} \rightarrow \mathbb{R}^{\ell}\), with \(\ell < d\). The router and experts operate in this reduced latent space; their outputs are aggregated and projected back to dimension \(d\).

At a comparable budget, reducing the dimension of routed representations decreases expert-weight reads and all-to-all communication volume by a factor related to \(d/\ell\). NVIDIA reinvests this headroom to increase the total number of experts \(N\) and the number of active experts \(K\), approximately as \(N' = N\,d/\ell\) and \(K' = K\,d/\ell\). Non-routed parameters and other operations remain in the original dimension \(d\). The goal is to improve accuracy per byte without proportionally increasing compute and communication cost. This is not simply “more experts”: it is a co-design of representation, routing, and hardware costs. The latent dimension cannot, however, be reduced arbitrarily without losing capacity.

GQA reduces the KV cache

Grouped-Query Attention (GQA) shares keys and values across several query heads. It retains multiple Q heads while using fewer distinct K/V heads.

For one layer, an approximate cache-memory requirement is:

\[ M_{KV} \approx 2 B T n_{KV} d_h b, \]

where \(B\) is batch size, \(T\) is context length, \(n_{KV}\) is the number of K/V heads, \(d_h\) is their dimension, and \(b\) is bytes per element. The factor 2 accounts for keys and values; sum across attention layers.

Reducing \(n_{KV}\) reduces cache memory by approximately the same ratio. Thus, 32 query heads sharing 2 KV heads give a 16:1 ratio in head counts, but not necessarily a 16× latency gain: kernels, hardware, batch size, and memory transfers also matter.

Do not conflate Nemotron variants

The figures and recipes below belong to distinct versions of the family. They should not be merged into one generic architecture.

Variant Total / active parameters Distinctive details
Nemotron 3.5 Lightning 30B / 3B 128 routed experts, top-6; NVFP4 quantization with PTQ followed by QAD in the published recipe
Nemotron 3 Super 120.6B / 12.7B 512 experts, top-22; two shared-weight MTP layers; NVFP4 pretraining
Nemotron 3 Ultra 550B / 55B more than ten specialized teachers; MOPD post-training; MTP and LatentMoE

Lightning is particularly interesting for local inference and memory constraints; Super and Ultra illustrate scaling and agentic post-training recipes. Active parameter counts do not replace total parameter counts when estimating the memory needed to host the model.

Reading Nemotron 3’s choices together

NVIDIA’s white paper describes an architecture made predominantly of Mamba-2 and MoE layers, with a small number of self-attention layers.

Technique Cost targeted Principle Trade-off
Mamba-2 Context-dependent cache Compact recurrent state Less direct precise retrieval
Attention Access to history Explicit weighting of positions Context-dependent KV cache
MoE Feed-forward computation Activate selected experts Total weights, routing, and communication
GQA KV memory Share K/V across Q heads Reduces but does not remove the cache
MTP / speculative decoding Sequential passes Propose multiple tokens, then verify Gain depends on acceptance rate
Quantization Storage and memory traffic Fewer bits per number Numerical error and layer sensitivity

Post-training: from SFT to reinforcement learning

The ByteByteGo overview describes a training progression for the Nemotron Lightning recipe: pretraining, supervised fine-tuning (SFT), then reinforcement learning. It also describes a data-mixture curriculum during pretraining: begin with broad coverage, then increase the sampling weight of selected higher-quality material. This is a change in the sampling distribution over training examples, not a change in the next-token prediction objective. The article does not provide enough detail to reconstruct the exact schedule or proportions, so those should not be inferred. In SFT, conversation context can include user and system messages while the training loss is applied to the assistant responses. The model is therefore trained to produce the desired continuation for a given conversation, rather than to reproduce every input token (ByteByteGo’s overview).

For its reinforcement-learning stage, the article reports Group Relative Policy Optimization (GRPO): the policy samples several responses to a prompt, task-specific evaluators assign rewards, and the responses are compared within the group to form a relative learning signal. The described environments check mathematical answers, run code against tests, assess instruction compliance, and validate output schemas. These are programmatically checkable signals, so this recipe is closer to reinforcement learning with verifiable rewards (RLVR) than to preference-only RLHF—unless a separate human-preference signal is explicitly documented. GRPO is an optimization algorithm; it does not, by itself, tell us where the reward came from.

This distinction matters: - RLHF (classic recipe): human comparisons train a reward model, then a policy is optimized against that learned reward, often with PPO. - GRPO with verifiable rewards: a group of sampled responses is scored by task verifiers; relative rewards guide the policy update. It need not involve human preference labels or a learned reward model.

Do not infer that every Nemotron variant uses the same stages or reward sources. The ByteByteGo article is a secondary account; model-specific recipes should be checked against the corresponding NVIDIA technical report and model release. The GRPO method is introduced in DeepSeekMath (Shao et al., 2024).

MTP and speculative decoding

Multi-Token Prediction (MTP) adds auxiliary objectives that train a model to predict multiple future tokens. At inference, these predictions can serve as proposals in speculative decoding: a lightweight mechanism proposes a continuation, then the main model verifies it. Several tokens may be accepted in one verification pass, reducing the number of sequential passes.

MTP is a training objective; speculative decoding is an inference strategy that uses verified proposals. It does not remove generation’s causal dependency. In the Nemotron 3 Super report, two shared-weight MTP layers are used: parameter sharing allows the mechanism to be applied recursively across prediction horizons and aims to reduce the mismatch between training states derived from ground-truth sequences and states generated during speculative decoding. This is specific to that configuration.

MOPD: distilling from multiple specialists on the student’s own outputs

Nemotron 3 Ultra also illustrates an evolution in post-training: Multi-Teacher On-Policy Distillation (MOPD). The student generates its own trajectories (on-policy); domain-specialized teachers then evaluate those trajectories and provide dense, token-level supervision. The student therefore learns from contexts and responses it actually generates, rather than only from prepared responses generated by another policy (off-policy).

Conceptually, for each prefix \(s_t\) generated by the student, the objective brings its distribution closer to that of the domain-specialized teacher: \(\mathrm{D}_{KL}(\pi_\theta(\cdot\mid s_t)\,\|\,\pi_{T_i}(\cdot\mid s_t))\). This is a reverse-KL divergence evaluated on prefixes induced by the student’s own generations; domain weights control the relative contribution of each teacher. The reported implementation uses a dense token-level signal rather than a single scalar reward at the end of a trajectory.

This approach complements rather than replaces SFT and reinforcement learning with verifiable rewards (RLVR). It is specific to the Nemotron 3 Ultra recipe: it should not be presented as a universal training stage or a feature of every Nemotron variant.

Quantization and numerical precision

A lower-precision representation reduces weight storage and can reduce memory traffic, but introduces approximation. Layers do not all tolerate the same error. For Nemotron 3 Super, NVFP4 uses 4-bit E2M1 floating-point values, 16-value micro-blocks with E4M3 scaling factors, and a second-level FP32 global scale. The recipe is mixed precision: selected attention projections, MTP layers, embeddings, and parts of the network remain in BF16; the Mamba output projection uses MXFP8, while most linear layers use NVFP4. Saying “trained in FP4” therefore does not mean every tensor is represented with 4 bits.

NVIDIA’s white paper describes NVFP4 training for some Nemotron 3 variants and notes precision safeguards for sensitive projections. It would be incorrect to claim that all Nemotron models uniformly use NVFP4 or that quantization automatically preserves performance. The format, scaling, recipe, and metrics must be explicit.

QAD: recovering accuracy lost to quantization

The published Nemotron 3.5 Lightning recipe adds Quantization-Aware Distillation (QAD) after post-training quantization (PTQ). PTQ first produces a quantized student from the BF16 checkpoint. The BF16 teacher remains frozen; the student runs forward passes with simulated quantization and learns to bring its logits closer to the teacher’s, using a KL-divergence loss.

QAD should not be confused with MOPD: - QAD: the teacher is the original BF16 model; the goal is to compensate for errors introduced by quantization. - MOPD: multiple specialized teachers guide a student on its own trajectories; the goal is to improve the model’s capabilities and behavior.

For the Lightning 3.5 checkpoint documented by NVIDIA, the reduction from 66 GB in BF16 to 22 GB in NVFP4 illustrates the storage gain; the report gives a median 99.24% recovery of BF16 accuracy under its evaluation protocol. These figures are specific to that checkpoint and protocol, not a general guarantee of FP4 quantization.

A broader trend: from full to hybrid attention

A November 2026 survey snapshot by Sebastian Raschka reports that, in the open-model sample he reviewed for the second half of 2026, roughly half of the models retained some dense global-attention layers in a hybrid stack and roughly half used no dense global-attention layers. This is a sample-specific observation, not a census of all released models or a controlled performance comparison. See Raschka’s source review and its limitations and the original LinkedIn post.

The distinction is not simply “attention versus no attention.” Under the author’s chart taxonomy, no full attention means zero dense global-attention layers; it does not mean that the model has no sequence-mixing mechanism or cannot use its context.

Two efficiency mechanisms must be kept separate:

  1. Local or sparse attention changes which positions are consulted. Sliding-window and chunked attention restrict the accessible positions; sparse selection can retain access to selected distant positions. These methods target attention computation and/or the size of the attended key-value set. Their exact cost depends on the pattern and implementation.
  2. Recurrent sequence layers change how history is carried forward. Mamba-2 and Gated DeltaNet-style mechanisms maintain a state updated as tokens arrive, rather than storing an explicit key/value pair for every past position. This bounds the recurrent state, but compressing history is not a lossless substitute for arbitrary lookup.

A hybrid stack can combine these approaches, and some designs retain occasional global-attention layers as explicit retrieval paths. The layer schedule is an architectural hypothesis to evaluate, not a guarantee that one design dominates another.

What a fair comparison should measure

Compare architectures on matched workloads and hardware; do not infer serving gains from the layer label alone.

Dimension Measurement or test Why it matters
Prompt processing Prefill latency and throughput versus context length Exposes prompt-side compute and parallelism
Generation Decode latency, inter-token latency and concurrent throughput Captures per-token history costs and serving behavior
Memory Peak KV-cache and recurrent-state memory at matched batch/context Separates growing cache from bounded state
Long-range recall Exact retrieval of facts placed at different context positions Tests whether useful history remains accessible
Revision handling Retrieve a fact after a later message corrects it Tests whether compressed summaries preserve updates
Agent traces Retrieve information across long tool-call/action histories Tests a realistic long-context workload

Keep latency, throughput, memory and retrieval accuracy as separate axes. A fixed-size state may lower memory while making exact recall harder; sparse attention may retain distant access but still incur pattern-dependent computation. These are complementary trade-offs, not interchangeable complexity claims.

Critically reading the numbers

Parameter, expert, and head counts, as well as context length, describe a particular version; they do not define the entire Nemotron family. Vendor throughput results depend on hardware, prefill and decode lengths, batch size, and protocol.

A sound comparison controls hardware, precision, concurrency, throughput, time to first token, inter-token latency, and quality on identical tasks. Inference efficiency is a systems problem: FLOPs, bandwidth, memory capacity, communication, and sequential-pass count interact.

Nemotron 3 does not make the Transformer obsolete. It shows that a system can combine mechanisms with different computational and representational properties. The right choice depends on context length, precise-retrieval needs, concurrency, hardware, and latency-versus-throughput goals.

Connect this case to Transformer architectures, the Transformer block, autoregressive generation, and scaling laws.

Language: Français · English

Practice

The questions and exercises for this lesson are collected on its dedicated practice page.

Supplementary resources Experiment, explore further, and practise the ideas from this lesson.