HMT: Hierarchical Memory Transformer for Efficient Long Context Language Processing

要約

トランスベースの大手言語モデル(LLM)は、言語処理アプリケーションで広く使用されています。
ただし、デバイスのメモリの制約により、それらのほとんどがコンテキストウィンドウを制限します。
以前の作品の再発モデルは、過去のトークンを記憶して無制限のコンテキストを有効にし、有効性を維持することができますが、「フラット」メモリアーキテクチャがあります。
このようなアーキテクチャには、情報の選択とフィルタリングに制限があります。
人間は学習と自己調整が得意なので、脳の記憶階層を模倣することはモデルの暗記に有益であると信じています。
したがって、人間の記憶行動を模倣することによりモデルの長いコンテスト処理能力を促進する新しいフレームワークである階層メモリトランス(HMT)を提案します。
メモリを介したセグメントレベルの再発を活用して、初期の入力セグメントからトークンを保存し、シーケンスに沿ってメモリの埋め込みを渡し、履歴から関連情報を思い出すことにより、メモリ階層を整理します。
一般的な言語モデリング、質問を回避するタスク、および要約タスクを評価すると、HMTが既存のモデルの長いコンテストの処理能力を一貫して改善することを示します。
さらに、HMTは、$ 2 \ sim 57 \ timesパラメーターと$ 2.5 \ sim 116 \ times $ $ dess inferenceメモリで、$ 2 \ sim 57 \ times $ 2.5 \ sim $ \ sim $ emessのメモリモデルを大幅に上回る、$ 2 \ sim 57 \ timesで同等または優れた生成品質を達成します。
githubのコード:https://github.com/oswaldhe/hmt-pytorch。

要約(オリジナル)

Transformer-based large language models (LLM) have been widely used in language processing applications. However, due to the memory constraints of the devices, most of them restrict the context window. Even though recurrent models in previous works can memorize past tokens to enable unlimited context and maintain effectiveness, they have “flat” memory architectures. Such architectures have limitations in selecting and filtering information. Since humans are good at learning and self-adjustment, we believe that imitating brain memory hierarchy is beneficial for model memorization. Thus, we propose the Hierarchical Memory Transformer (HMT), a novel framework that facilitates a model’s long-context processing ability by imitating human memorization behavior. Leveraging memory-augmented segment-level recurrence, we organize the memory hierarchy by preserving tokens from early input segments, passing memory embeddings along the sequence, and recalling relevant information from history. Evaluating general language modeling, question-answering tasks, and the summarization task, we show that HMT consistently improves the long-context processing ability of existing models. Furthermore, HMT achieves a comparable or superior generation quality to long-context LLMs with $2 \sim 57\times$ fewer parameters and $2.5 \sim 116\times$ less inference memory, significantly outperforming previous memory-augmented models. Code on Github: https://github.com/OswaldHe/HMT-pytorch.

arxiv情報

著者 Zifan He,Yingqi Cao,Zongyue Qin,Neha Prakriya,Yizhou Sun,Jason Cong
発行日 2025-02-06 17:35:02+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CL, cs.LG パーマリンク