LightThinker: Thinking Step-by-Step Compression

要約

大規模な言語モデル(LLM)は、複雑な推論タスクで顕著なパフォーマンスを示していますが、その効率は、長いトークンの生成に関連する実質的なメモリと計算コストによって妨げられています。
この論文では、LLMSが推論中にLLMSが中間思考を動的に圧縮できるようにする新しい方法であるLightThinkerを提案します。
人間の認知プロセスに触発されて、Light -Thinkerは冗長思想ステップをコンパクトな表現に圧縮し、元の推論チェーンを破棄し、それによりコンテキストウィンドウに保存されているトークンの数を大幅に減らします。
これは、データ構築を介して圧縮を実行する時期と方法でモデルをトレーニングし、隠された状態を凝縮した要点トークンにマッピングし、特殊な注意マスクを作成することで実現されます。
さらに、依存関係(DEP)メトリックを導入して、生成中の履歴トークンへの依存を測定することにより、圧縮の程度を定量化します。
4つのデータセットと2つのモデルでの広範な実験では、競争の精度を維持しながら、ライトチャンカーがピークメモリの使用と推論時間を短縮することが示されています。
私たちの仕事は、パフォーマンスを犠牲にすることなく、複雑な推論タスクでLLMの効率を改善するための新しい方向性を提供します。
コードはhttps://github.com/zjunlp/lightthinkerでリリースされます。

要約(オリジナル)

Large language models (LLMs) have shown remarkable performance in complex reasoning tasks, but their efficiency is hindered by the substantial memory and computational costs associated with generating lengthy tokens. In this paper, we propose LightThinker, a novel method that enables LLMs to dynamically compress intermediate thoughts during reasoning. Inspired by human cognitive processes, LightThinker compresses verbose thought steps into compact representations and discards the original reasoning chains, thereby significantly reducing the number of tokens stored in the context window. This is achieved by training the model on when and how to perform compression through data construction, mapping hidden states to condensed gist tokens, and creating specialized attention masks. Additionally, we introduce the Dependency (Dep) metric to quantify the degree of compression by measuring the reliance on historical tokens during generation. Extensive experiments on four datasets and two models show that LightThinker reduces peak memory usage and inference time, while maintaining competitive accuracy. Our work provides a new direction for improving the efficiency of LLMs in complex reasoning tasks without sacrificing performance. Code will be released at https://github.com/zjunlp/LightThinker.

arxiv情報

著者 Jintian Zhang,Yuqi Zhu,Mengshu Sun,Yujie Luo,Shuofei Qiao,Lun Du,Da Zheng,Huajun Chen,Ningyu Zhang
発行日 2025-02-21 16:57:22+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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