要約
Huaweiクラウドユーザーは、アプリケーション固有のニーズに合わせて大規模な言語モデル(LLMS)を微調整およびカスタマイズするための効率的でスケーラブルな方法としてLORA(低ランク適応)を活用します。
ただし、複雑な推論または深い文脈的理解を必要とするタスクは、貪欲な検索やビーム検索などの典型的なデコード方法を使用する場合、ベースモデルからのバイアスまたは干渉によって妨げられることがよくあります。
これらのバイアスは、ロラ固有の適応を活用する代わりに、基本モデルからの一般的またはタスクに依存しない応答につながる可能性があります。
このホワイトペーパーでは、ロラに適応したモデルでのタスク固有の知識の使用を最大化するように設計された新しいデコードフレームワークであるContrastive Lora Decoding(Cold)を紹介し、その結果、下流のパフォーマンスが向上します。
Coldは、LORAに適応したエキスパートモデルと対応するベースモデルの確率分布との分岐に基づいて、候補トークンをスコアリングすることにより、コントラストデコードを使用します。
このアプローチは、LORAの学習表現とより適切に整合するトークンを優先し、特殊なタスクのパフォーマンスを向上させます。
効果的ですが、各デコードステップには両方のモデルで複数のトークン候補を評価する必要があるため、コールドの素朴な実装は計算的に高価です。
これに対処するために、HuaweiのAscend NPUの最適化されたカーネルを開発しました。
コールドは、貪欲なデコードと比較してエンドツーエンドのレイテンシを28%削減しながら、タスクの精度が5.54%増加します。
この作業は、リソース制約の環境で微調整されたLLMの実用的で効率的なデコード戦略を提供し、クラウドとオンプレミスの両方の設定で応用データサイエンスに幅広い意味を持っています。
要約(オリジナル)
Huawei Cloud users leverage LoRA (Low-Rank Adaptation) as an efficient and scalable method to fine-tune and customize large language models (LLMs) for application-specific needs. However, tasks that require complex reasoning or deep contextual understanding are often hindered by biases or interference from the base model when using typical decoding methods like greedy or beam search. These biases can lead to generic or task-agnostic responses from the base model instead of leveraging the LoRA-specific adaptations. In this paper, we introduce Contrastive LoRA Decoding (CoLD), a novel decoding framework designed to maximize the use of task-specific knowledge in LoRA-adapted models, resulting in better downstream performance. CoLD uses contrastive decoding by scoring candidate tokens based on the divergence between the probability distributions of a LoRA-adapted expert model and the corresponding base model. This approach prioritizes tokens that better align with the LoRA’s learned representations, enhancing performance for specialized tasks. While effective, a naive implementation of CoLD is computationally expensive because each decoding step requires evaluating multiple token candidates across both models. To address this, we developed an optimized kernel for Huawei’s Ascend NPU. CoLD achieves up to a 5.54% increase in task accuracy while reducing end-to-end latency by 28% compared to greedy decoding. This work provides practical and efficient decoding strategies for fine-tuned LLMs in resource-constrained environments and has broad implications for applied data science in both cloud and on-premises settings.
arxiv情報
著者 | Morgan Lindsay Heisler,Linzi Xing,Ge Shi,Hanieh Sadri,Gursimran Singh,Weiwei Zhang,Tao Ye,Ying Xiong,Yong Zhang,Zhenan Fan |
発行日 | 2025-05-20 17:11:18+00:00 |
arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google