# Distilling Sequential Computation in Transformer Language Models

*Zixuan Lan, Jessica Yang, Yanhong Li, Karen Livescu, Jiawei Zhou*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/150342) · [OpenReview](https://openreview.net/forum?id=iqGrRkvjJU) · [Open on the map](../papers.html#p150342)

Category: [Efficient LLM Inference & Training](../pcat/14.md) › [Attention Optimization and Retrieval](../pgroup/693.md) · Type: new method · Keywords: sequence compression, transformer inference, surrogate embedding, KV cache optimization, parameter-efficient inference

Areas: [LLM Reasoning](../areas/reasoning.md) › Efficient Reasoning › Efficient Transformers; [Long Context](../areas/longcontext.md) › Long-context mechanisms › Context compression; [Model Architectures & Sequence Modeling](../areas/architectures.md) › Language Model Architectures › Transformer Memory and Reasoning

## Summary
The paper introduces a method for distilling sequential computation that compresses token spans into surrogate embeddings via a lightweight merge module, reducing effective sequence length by up to 40% with minimal accuracy loss.

## Explained to a 5-year-old
Computers that read text look at each word one at a time. This can be slow when there are many words. Some words always appear together, like "in the". These groups are easy to predict. We can make a tiny shortcut that turns a group of words into a single special word. This makes the computer do less work and finish faster.

## Explained to a 5-year-old, longer
Computers that read text look at each word one at a time. This can be slow when there are many words. Some words always appear together, like "in the". These groups are easy to predict. We can make a tiny shortcut that turns a group of words into a single special word. This shortcut is called a merge module, but we can just think of it as a helper. The helper looks at the original words and makes a new word that means the same thing. When the computer reads, it can use this new word instead of the whole group. This makes the computer do less work and finish faster. It also uses less memory, so it can run on smaller machines. The idea works for many kinds of tasks, like answering questions or telling stories. It helps the computer understand long texts without getting tired. Overall, it makes reading long texts easier and quicker.

## For a technical reader
The paper presents a technique to compress long token sequences in transformer models during inference by replacing predictable spans with a single surrogate embedding. A lightweight merge module computes this embedding on the fly from the original token embeddings, preserving the functional role of the span. The method integrates with the existing KV cache, substituting multi-token entries with their compressed surrogates via a rollback mechanism. As a result, the effective sequence length can be reduced by up to 40% while maintaining accuracy on language modeling and downstream tasks. No model retraining or architectural changes are required, making it a drop-in optimization for deployed models.

## Problem
Transformer language models process tokens sequentially, causing computational cost to grow with context length. Many token spans are predictable and could be compressed, but existing models lack efficient ways to represent these spans compactly during inference.

## Method
The approach replaces spans of input tokens with collapsed representations generated by a lightweight merge module that produces a single surrogate embedding from static token embeddings, and uses a rollback mechanism to substitute multi-token KV cache entries with these surrogates during inference.

## Results
The approach reduces effective sequence length by up to 40% while maintaining near-original accuracy on language-modeling and downstream tasks.

## Contributions
It provides a way to compress sequential token computation at inference time using surrogate embeddings, enabling longer contexts with lower computational cost without model updates.

## Practical relevance
It enables more efficient inference on large language models, reducing computational costs and making longer contexts feasible on limited hardware.

## Research questions this paper is counted under

- [How can we reduce the quadratic attention cost and memory usage of large language models for long contexts while preserving performance?](../q/4.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/150342)
