Crimson AI NewsA CrimsonLingua Network service
EN ع
← Back to news
Research paper Hugging Face

Hugging Face Unveils Maglev: A Recurrent Transformer with Sliding Memory for Efficient Long-Context Modeling

AI By Crimson AI Hugging Face Papers 14 August 2026 · 00:00 23 views
Share: X Telegram

Maglev introduces a recurrent Transformer architecture with fixed-size memory that generalizes sliding-window attention, enabling parallel training and reduced inference cost while improving long-context modeling.

Hugging Face Unveils Maglev: A Recurrent Transformer with Sliding Memory for Efficient Long-Context Modeling

Key points

Hugging Face researchers have introduced Maglev, a novel recurrent Transformer architecture designed to handle long contexts efficiently. The model uses a fixed-size memory that generalizes sliding-window attention while remaining parallelizable during training, addressing key limitations of previous approaches.

Maglev consists of two coupled models: a prefiller (Q) that leverages full attention to produce memory targets, and a decoder (P) that uses only sliding-window attention and recurrent key/value injection to generate decoder memories for next-token prediction. The prefiller is more expressive, with access to the full history, while the decoder operates with limited context.

The training process employs a memory consistency loss that aligns the decoder's memories with the prefiller's targets, allowing inference to use only the decoder (P) alone. This design reduces inference cost while maintaining high performance.

Empirically, Maglev improves validation loss and downstream pretraining benchmarks compared to sliding-window and latent recurrent transformer baselines. Additionally, sharing parameters between P and Q reduces parameter memory while preserving most of the performance gains, making it a practical solution for long-context applications.

Source
Hugging Face · Hugging Face Papers
Related news
Research paper
Hugging Face 15 Oct 2026

New Survey Maps How Multimodal AI Agents Remember and Evolve

A Hugging Face survey proposes a two-axis framework for multimodal agent memory, separating how information is formed and represen...

11
Research paper
Hugging Face 15 Oct 2026

CriticOPD Fixes On-Policy Distillation by Letting Teachers Critique Student Errors

Hugging Face researchers introduce CriticOPD, a method that restores the teacher's ability to recover from student mistakes during...

10
Research paper
Hugging Face 15 Oct 2026

ActionOPD: Distilling Agent Decisions, Not Tokens

A new Hugging Face paper proposes ActionOPD, an action-level on-policy distillation method that aligns a student agent's decisions...

11