Reproduce “Long Context Compression with Activation Beacon” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Peitian Zhang, Zheng Liu, Shitao Xiao, Ninglu Shao, Qiwei Ye, Zhicheng Dou

Activation Beacon is a plug-in module for transformer-based LLMs that efficiently compresses long contexts by distilling activations into special 'beacon tokens'. This method achieves substantial reductions in KV cache memory and computational costs while maintaining performance on long-context tasks and generalizing to lengths far beyond its training data.

Key insights

  • Directly compressing activation states into 'beacon tokens' provides superior information retention compared to summarizing contexts into soft tokens.
  • A progressive, fine-grained compression workflow, where beacon tokens are interleaved within context chunks, is crucial for preserving detailed information across very long sequences.
  • Training with chunk-wise random compression ratios enables the model to effectively generalize and operate flexibly across various compression granularities during inference.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.