論文の概要: LongCodeZip: Compress Long Context for Code Language Models
- arxiv url: http://arxiv.org/abs/2510.00446v1
- Date: Wed, 01 Oct 2025 02:54:57 GMT
- ステータス: 翻訳完了
- システム内更新日: 2025-10-03 16:59:20.34193
- Title: LongCodeZip: Compress Long Context for Code Language Models
- Title(参考訳): LongCodeZip: コード言語モデルのロングコンテキスト圧縮
- Authors: Yuling Shi, Yichun Qian, Hongyu Zhang, Beijun Shen, Xiaodong Gu,
- Abstract要約: LongCodeZipは、LLM(Large Language Models)用に設計された新しいプラグアンドプレイコード圧縮フレームワークである。
重要な情報を保持しながらコンテキストサイズを効果的に削減することで、LongCodeZipはLLMを現実世界の大規模コードシナリオに拡張することができる。
- 参考スコア(独自算出の注目度): 16.940525379087326
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Code generation under long contexts is becoming increasingly critical as Large Language Models (LLMs) are required to reason over extensive information in the codebase. While recent advances enable code LLMs to process long inputs, high API costs and generation latency remain substantial bottlenecks. Existing context pruning techniques, such as LLMLingua, achieve promising results for general text but overlook code-specific structures and dependencies, leading to suboptimal performance in programming tasks. In this paper, we propose LongCodeZip, a novel plug-and-play code compression framework designed specifically for code LLMs. LongCodeZip employs a dual-stage strategy: (1) coarse-grained compression, which identifies and ranks function-level chunks using conditional perplexity with respect to the instruction, retaining only the most relevant functions; and (2) fine-grained compression, which segments retained functions into blocks based on perplexity and selects an optimal subset under an adaptive token budget to maximize relevance. Evaluations across multiple tasks, including code completion, summarization, and question answering, show that LongCodeZip consistently outperforms baseline methods, achieving up to a 5.6x compression ratio without degrading task performance. By effectively reducing context size while preserving essential information, LongCodeZip enables LLMs to better scale to real-world, large-scale code scenarios, advancing the efficiency and capability of code intelligence applications.
- Abstract(参考訳): 長いコンテキスト下でのコード生成は、コードベースの広範な情報を引き継ぐためにLLM(Large Language Models)が要求されるにつれて、ますます重要になっている。
最近の進歩により、LLMは長いインプットを処理できるが、高いAPIコストと生成遅延は重大なボトルネックのままである。
LLMLinguaのような既存のコンテキストプルーニング技術は、一般的なテキストに対して有望な結果をもたらすが、コード固有の構造や依存関係を見落とし、プログラミングタスクにおける準最適パフォーマンスをもたらす。
本稿では,LongCodeZipを提案する。LongCodeZipは,LLMに特化して設計された,新しいプラグアンドプレイコード圧縮フレームワークである。
LongCodeZipは、(1)命令に関して条件付きパープレキティを用いて関数レベルのチャンクを識別・ランク付けし、最も関連性の高い関数のみを保持する粗粒圧縮、(2)パープレキティに基づいて関数をブロックに分割し、適応トークン予算の下で最適なサブセットを選択して関連性を最大化する微粒圧縮という2段階の戦略を採用している。
コード補完、要約、質問応答を含む複数のタスクに対する評価は、LongCodeZipがタスクパフォーマンスを劣化させることなく5.6倍の圧縮率で、ベースラインメソッドを一貫して上回っていることを示している。
重要な情報を保持しながらコンテキストサイズを効果的に削減することにより、LongCodeZipはLLMを現実の大規模コードシナリオにスケールし、コードインテリジェンスアプリケーションの効率と能力を向上させる。
関連論文リスト
- Is Compression Really Linear with Code Intelligence? [60.123628177110206]
textitFormat Annealingは、事前訓練されたモデルの本質的な能力を同等に評価するために設計された、軽量で透明なトレーニング手法である。
我々の経験的結果は、測定されたコードインテリジェンスとビット・パー・キャラクタ(BPC)の基本的な対数関係を明らかにする。
私たちの研究は、コードインテリジェンスの開発における圧縮の役割をより微妙に理解し、コードドメインにおける堅牢な評価フレームワークに貢献します。
論文 参考訳(メタデータ) (2025-05-16T16:59:14Z) - LongSpec: Long-Context Lossless Speculative Decoding with Efficient Drafting and Verification [42.54363549922909]
LongSpecは、長いコンテキストに対する効率的な推論の課題に対処するフレームワークである。
LongSpecは、強力なFlash Attentionベースライン上で最大3.26倍のスピードアップを達成する。
コードはhttps://github.com/sail-sg/LongSpecで公開されている。
論文 参考訳(メタデータ) (2025-02-24T18:53:31Z) - Hierarchical Context Pruning: Optimizing Real-World Code Completion with Repository-Level Pretrained Code LLMs [24.00351065427465]
本稿では,階層型コンテキストプルーニング(HCP)という戦略を提案し,高い情報量を持つコンプリートプロンプトを構築する。
HCPは関数レベルでコードリポジトリをモデル化し、コードファイル間のトポロジ的な依存関係を維持しながら、大量の無関係なコードコンテンツを削除する。
論文 参考訳(メタデータ) (2024-06-26T12:26:16Z) - Hierarchical Context Merging: Better Long Context Understanding for Pre-trained LLMs [61.40047491337793]
本稿では,大規模言語モデルの制約を克服する新しいトレーニングフリースキームである階層型cOntext MERging(HOMER)を提案する。
HomeRは、長いインプットを管理可能なチャンクに分割する、分別/対数アルゴリズムを使用する。
トークン削減技術がマージ毎に先行し、メモリ使用効率が保証される。
論文 参考訳(メタデータ) (2024-04-16T06:34:08Z) - SparseCoder: Identifier-Aware Sparse Transformer for File-Level Code
Summarization [51.67317895094664]
本稿では,大規模なソースコードプロジェクトの理解と維持を支援するファイルレベルのコード要約について検討する。
長いコードシーケンスを効果的に処理するための識別子対応スパース変換器であるSparseCoderを提案する。
論文 参考訳(メタデータ) (2024-01-26T09:23:27Z)
関連論文リストは本サイト内にある論文のタイトル・アブストラクトから自動的に作成しています。
指定された論文の情報です。
本サイトの運営者は本サイト(すべての情報・翻訳含む)の品質を保証せず、本サイト(すべての情報・翻訳含む)を使用して発生したあらゆる結果について一切の責任を負いません。