ChatPaper.aiChatPaper

Ruler: 大規模言語モデルの生成長を制御するためのモデルに依存しない手法

Ruler: A Model-Agnostic Method to Control Generated Length for Large Language Models

September 27, 2024
著者: Jiaming Li, Lei Zhang, Yunshui Li, Ziqiang Liu, yuelin bai, Run Luo, Longze Chen, Min Yang
cs.AI

要旨

大規模言語モデルの命令に従う能力により、人間は自然な方法でAIエージェントとやり取りすることができます。ただし、特定の長さの応答を生成する必要がある場合、大規模言語モデルは、数値制約を正確に認識することの困難さから、しばしばユーザーのニーズを満たすのに苦労します。生成された応答の長さを制御する大規模言語モデルの能力を探るために、私たちはターゲット長生成タスク(TLG)を提案し、モデルが指定された応答長に適合する性能を評価するための2つのメトリクス、Precise Match(PM)とFlexible Match(FM)を設計します。さらに、Meta Length Tokens(MLTs)を用いた新しいモデルに依存しないアプローチであるRulerを紹介します。Rulerは、指示に基づいた長さ制約に従って指定された長さの応答を生成する能力をLLMに装備します。さらに、Rulerは、長さ制約が明示的に提供されていない場合でも適切なMLTを自動生成することができ、優れた汎用性と汎用性を示します。包括的な実験は、異なるLLMにおけるRulerの効果を示し、ターゲット長生成タスクにおいて、例えば、PMで平均27.97の利益、FMで平均29.57の利益を得ることができます。さらに、Rulerの効力と汎用性をさらに裏付けるために包括的な削除実験を実施します。私たちのコードとデータは、https://github.com/Geaming2002/Ruler で入手可能です。
English
The instruction-following ability of large language models enables humans to interact with AI agents in a natural way. However, when required to generate responses of a specific length, large language models often struggle to meet users' needs due to their inherent difficulty in accurately perceiving numerical constraints. To explore the ability of large language models to control the length of generated responses, we propose the Target Length Generation Task (TLG) and design two metrics, Precise Match (PM) and Flexible Match (FM) to evaluate the model's performance in adhering to specified response lengths. Furthermore, we introduce a novel, model-agnostic approach called Ruler, which employs Meta Length Tokens (MLTs) to enhance the instruction-following ability of large language models under length-constrained instructions. Specifically, Ruler equips LLMs with the ability to generate responses of a specified length based on length constraints within the instructions. Moreover, Ruler can automatically generate appropriate MLT when length constraints are not explicitly provided, demonstrating excellent versatility and generalization. Comprehensive experiments show the effectiveness of Ruler across different LLMs on Target Length Generation Task, e.g., at All Level 27.97 average gain on PM, 29.57 average gain on FM. In addition, we conduct extensive ablation experiments to further substantiate the efficacy and generalization of Ruler. Our code and data is available at https://github.com/Geaming2002/Ruler.

Summary

AI-Generated Summary

PDF302November 13, 2024