Fine-Tuning and Prompt Optimization: Two Great Steps that Work Better Together

要約

自然言語処理 (NLP) システムは、複数の個別言語モデル (LM) とプロンプト戦略を含む多段階パイプラインの形式をとることが増えています。
ここでは、そのようなシステムをどのように微調整してパフォーマンスを向上させるかという問題に取り組みます。
私たちはこれを、基礎となる LM 重みとプロンプト戦略を一緒に最適化する問題として捉え、パイプラインの中間段階にゴールド ラベルがないという、挑戦的ではあるが非常に現実的なシナリオを検討します。
この課題に対処するために、すべてのパイプライン ステージのトレーニング ラベルをブートストラップし、これらを使用してパイプラインのプロンプトを最適化し、その重みを交互に微調整する近似最適化戦略を評価します。
マルチホップ QA、数学的推論、および特徴ベースの分類を用いた実験では、プロンプトと重みを一緒に最適化する単純なアプローチが、重みのみを直接最適化するよりも、プロンプトのみを平均して最大 5% 上回るパフォーマンスを発揮することがわかりました。
LM とタスク全体にわたって。
DSPy の新しいオプティマイザーを http://dspy.ai でリリースする予定です。

要約(オリジナル)

Natural Language Processing (NLP) systems are increasingly taking the form of multi-stage pipelines involving multiple distinct language models (LMs) and prompting strategies. Here we address the question of how to fine-tune such systems to improve their performance. We cast this as a problem of optimizing the underlying LM weights and the prompting strategies together, and consider a challenging but highly realistic scenario in which we have no gold labels for any intermediate stages in the pipeline. To address this challenge, we evaluate approximate optimization strategies in which we bootstrap training labels for all pipeline stages and use these to optimize the pipeline’s prompts and fine-tune its weights alternatingly. In experiments with multi-hop QA, mathematical reasoning, and feature-based classification, we find that simple approaches for optimizing the prompts and weights together outperform directly optimizing weights alone and prompts alone by up to 65% and 5%, respectively, on average across LMs and tasks. We will release our new optimizers in DSPy at http://dspy.ai

arxiv情報

著者 Dilara Soylu,Christopher Potts,Omar Khattab
発行日 2024-07-15 17:30:31+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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