基于人工海马网络(AHN),将无损记忆转化为固定大小压缩表示,融合两种记忆类型优势,实现长上下文场景下的高效文本生成与预测。【此简介由AI生成】
以下内容由 AI 翻译,如有问题请 点此提交 issue 反馈
license: other license_name: qwen-research language:
- en pipeline_tag: text-generation base_model: Qwen/Qwen2.5-3B tags:
- chat library_name: transformers
AHN: 用于高效长上下文建模的人工海马体网络
简介
人工海马体网络(AHN)将无损记忆转换为固定大小的压缩表示,以实现高效的长上下文建模。无损记忆(例如注意力机制的键值(KV)缓存)存储精确的输入信息,但会随序列长度增长,导致长序列处理效率低下。相比之下,压缩记忆(例如循环神经网络(RNN)的隐藏状态)保持恒定大小,并为每个输入标记提供固定的计算成本,但其代价是信息损失。为了兼顾两种记忆类型的优势,AHN持续将滑动注意力窗口外的无损记忆转换为压缩形式。AHN可通过任何类RNN架构实现。然后,模型整合两种记忆类型以在长上下文中进行预测。
本仓库包含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}
}