TL;DR
NVIDIA researchers have introduced TwoTower, a novel architecture that decouples context representation and token denoising into two separate networks for diffusion language models. By applying this method to a 30B hybrid Mamba-Transformer MoE model, they successfully retained 98.7% of the original autoregressive model's quality while achieving a 2.42× speedup in wall-clock generation throughput.
What Problem Does This Paper Address?
Autoregressive (AR) language models are the gold standard for text generation, but their one-token-at-a-time decoding process creates a massive throughput bottleneck during inference. Discrete diffusion language models offer a promising alternative by generating tokens in parallel and refining them iteratively.
However, existing diffusion models typically force a single network to handle two very different jobs simultaneously: representing the clean, already-committed context tokens, and denoising the corrupted, masked tokens. This "entanglement" pulls the model's weights in opposite directions, limiting its capacity to excel at either task. The authors address this by fully decoupling these roles at scale.
Methods
The TwoTower architecture splits a pretrained language model into two distinct, complementary components:
- AR Context Tower: A frozen copy of the pretrained AR model that causally processes clean tokens, maintaining a reusable KV cache and Mamba states.
- Diffusion Denoiser Tower: A trainable copy of the network optimized via a mask-diffusion objective to refine noisy blocks of tokens.
Key Innovations:
- Layer-Aligned Cross-Attention: Instead of just broadcasting the final hidden state, each layer of the denoiser tower cross-attends directly to the corresponding layer of the context tower, providing multi-scale access to the backbone's representations.
- Bidirectional Block Attention: Within a noisy block under refinement, tokens attend bidirectionally to each other, while remaining strictly causal with respect to past clean blocks.
- Time Conditioning: The denoiser is modulated by the diffusion timestep using adaptive layer normalization (
adaLN-single), giving the network explicit awareness of the current noise level. - Confidence Unmasking Sampler: An adaptive sampling method where tokens predicted with high confidence are committed early, allowing the model to dynamically adjust how many tokens it refines per step.
Datasets
- Training: The denoiser was trained on a 2.1T token subset of the Nemotron-3-Nano pretraining blend. The training followed a two-stage curriculum: an initial broad-coverage phase followed by a high-quality, STEM-focused refinement phase.
- Evaluation: The model was evaluated on standard base-model benchmarks spanning General Knowledge (MMLU), Code (HumanEval), Math (GSM8K, MATH-500), Commonsense, and Multilingual tasks.
Key Insights and Ideas
- Freezing the Context is Essential: The authors discovered that tying the weights of the two towers under a joint AR+diffusion loss significantly degrades performance. Keeping the context tower frozen preserves the rich representations learned during massive AR pretraining.
- Front-Loaded Token Commitment: The confidence-unmasking algorithm commits a large number of tokens during the very first diffusion step, after which the count drops quickly. This front-loading explains why block-wise diffusion can beat one-token-at-a-time AR decoding despite requiring multiple refinement steps.
- Left-to-Right Bias Persistence: Even with bidirectional block attention, the model exhibits a strong left-to-right token commitment pattern within blocks. This is an inductive bias inherited from the unidirectional Mamba-2 layers, which make up 23 out of the backbone's 52 layers.
Key Results
- Quality Retention: Nemotron-Labs-TwoTower preserves 98.7% of the aggregate benchmark quality compared to the pure AR baseline, with commonsense and multilingual performance actually showing slight improvements.
- Throughput Boost: At its optimal operating point (confidence threshold $\gamma=0.8$, block size $S=16$), the model delivers a 2.42× higher wall-clock generation throughput.
- Block Size Impact: Reducing the training block size significantly improves quality. While larger blocks expose more parallelism, smaller blocks stay closer to the original AR conditioning. The authors chose $S=16$ as the ideal sweet spot between quality and speed.
Limitations and Future Work
- Memory Footprint: Keeping two copies of the 30B model weights resident in memory increases the fixed model-weight memory footprint during inference. However, the sequence-length-dependent cache memory scales identically to the AR baseline because only a single prefix cache is maintained.
- Unidirectional Mamba Constraints: The authors tested a bidirectional Mamba-2 variant, but it roughly doubled the denoiser's state-space model (SSM) FLOPs while providing only marginal quality gains. As a result, the final design keeps Mamba causal.
- Future Extensions: The current work focuses on base models. The authors plan to release post-trained (instruction-tuned and aligned) Nemotron-Labs-TwoTower models in future updates.
Summary updated