Differential Transformer V2 introduces a redesigned attention mechanism that doubles query heads while maintaining key-value heads, eliminating the need for custom kernels and achieving faster decoding speeds. The architecture removes per-head RMSNorm to improve training stability, introduces token-level and head-level lambda projections to overcome softmax constraints, and eliminates attention sinks. Production-scale experiments on trillion-token datasets show 0.02-0.03 lower language modeling loss, reduced gradient spikes under large learning rates, and decreased activation outliers compared to standard Transformers, while saving approximately 25% of attention module parameters.

9m read timeFrom huggingface.co
Post cover image
Table of contents
AbstractCodeMotivationExperimental ObservationsDiscussions

Sort: