融合无损与压缩记忆优势,通过AHN将滑动窗口外无损记忆转化为固定大小压缩表示,实现高效长上下文处理,支持多种RNN类架构集成。【此简介由AI生成】
以下内容由 AI 翻译,如有问题请 点此提交 issue 反馈
license: apache-2.0 language:
- en pipeline_tag: text-generation base_model: Qwen/Qwen2.5-7B tags:
- chat library_name: transformers
AHN:用于高效长上下文建模的人工海马体网络
简介
人工海马体网络(AHN)将无损记忆转换为固定大小的压缩表示,以实现高效的长上下文建模。无损记忆(例如注意力机制的键值(KV)缓存)存储精确的输入信息,但会随序列长度增长,导致长序列处理效率低下。相比之下,压缩记忆(例如循环神经网络的隐藏状态)保持恒定大小,每个输入标记的计算成本固定,但会损失部分信息。为了兼顾两种记忆类型的优势,AHN持续将滑动注意力窗口外的无损记忆转换为压缩形式。AHN可通过任何类循环神经网络架构实现。然后,模型整合两种记忆类型以完成长上下文的预测任务。
本仓库包含AHN的模型权重。有关安装、使用说明和更多文档,请访问我们的GitHub仓库。
方法
模型库
| 基础模型 | AHN 模块 | 参数数量 | 检查点(仅含 AHN) |
|---|---|---|---|
| Qwen2.5-3B-Instruct | Mamba2 | 11.9M | 🤗model |
| Qwen2.5-3B-Instruct | DeltaNet | 11.8M | 🤗model |
| Qwen2.5-3B-Instruct | GatedDeltaNet | 13.0M | 🤗model |
| Qwen2.5-7B-Instruct | Mamba2 | 18.6M | 🤗model |
| Qwen2.5-7B-Instruct | DeltaNet | 18.5M | 🤗model |
| Qwen2.5-7B-Instruct | GatedDeltaNet | 21.3M | 🤗model |
| Qwen2.5-14B-Instruct | Mamba2 | 51.4M | 🤗model |
| Qwen2.5-14B-Instruct | DeltaNet | 51.1M | 🤗model |
| Qwen2.5-14B-Instruct | GatedDeltaNet | 61.0M | 🤗model |
评估
LV-Eval 和 InfiniteBench 结果
LongBench 结果
联系方式
- 方允豪:yunhao.fang@bytedance.com
- 俞伟豪(通讯作者):weihao.yu@bytedance.com
引用
BibTeX:
@article{fang2025artificial,
title={Artificial hippocampus networks for efficient long-context modeling},
author={Fang, Yunhao and Yu, Weihao and Zhong, Shu and Ye, Qinghao and Xiong, Xuehan and Wei, Lai},
journal={arXiv preprint arXiv:2510.07318},
year={2025}
}