Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RAFT: Adapting Language Model to Domain Specific RAG, Tianjun Zhang+, N/A, arXiv'24 #1269

Open
AkihikoWatanabe opened this issue Apr 7, 2024 · 1 comment

Comments

@AkihikoWatanabe
Copy link
Owner

AkihikoWatanabe commented Apr 7, 2024

URL

Affiliations

  • Tianjun Zhang, N/A
  • Shishir G. Patil, N/A
  • Naman Jain, N/A
  • Sheng Shen, N/A
  • Matei Zaharia, N/A
  • Ion Stoica, N/A
  • Joseph E. Gonzalez, N/A

Abstract

  • Pretraining Large Language Models (LLMs) on large corpora of textual data isnow a standard paradigm. When using these LLMs for many downstreamapplications, it is common to additionally bake in new knowledge (e.g.,time-critical news, or private domain knowledge) into the pretrained modeleither through RAG-based-prompting, or fine-tuning. However, the optimalmethodology for the model to gain such new knowledge remains an open question.In this paper, we present Retrieval Augmented FineTuning (RAFT), a trainingrecipe that improves the model's ability to answer questions in a "open-book"in-domain settings. In RAFT, given a question, and a set of retrieveddocuments, we train the model to ignore those documents that don't help inanswering the question, which we call, distractor documents. RAFT accomplishesthis by citing verbatim the right sequence from the relevant document thatwould help answer the question. This coupled with RAFT's chain-of-thought-styleresponse helps improve the model's ability to reason. In domain-specific RAG,RAFT consistently improves the model's performance across PubMed, HotpotQA, andGorilla datasets, presenting a post-training recipe to improve pre-trained LLMsto in-domain RAG. RAFT's code and demo are open-sourced atgithub.com/ShishirPatil/gorilla.

Translation (by gpt-3.5-turbo)

  • 大規模なテキストデータのコーパスで大規模言語モデル(LLMs)を事前学習することは、現在標準的なパラダイムとなっています。
    これらのLLMsをさまざまな下流アプリケーションに使用する際、事前学習済みモデルに新しい知識(例:時間的に重要なニュースやプライベートドメインの知識)を追加することが一般的です。
    これは、RAGベースのプロンプティングやファインチューニングを介して行われます。
    ただし、モデルがそのような新しい知識を獲得するための最適な方法は未解決の問題です。
    本論文では、"open-book"のドメイン設定で質問に答える能力を向上させるトレーニングレシピであるRetrieval Augmented FineTuning(RAFT)を提案します。
    RAFTでは、質問と取得された文書のセットが与えられた場合、モデルを、質問に回答するのに役立たない文書(distractor documentsと呼ぶ)を無視するようにトレーニングします。
    RAFTは、質問に答えるのに役立つ関連文書から正しいシーケンスをそのまま引用することでこれを達成します。
    これに加えて、RAFTのchain-of-thoughtスタイルの応答が、モデルの推論能力を向上させるのに役立ちます。
    ドメイン固有のRAGでは、RAFTはPubMed、HotpotQA、Gorillaデータセット全体でモデルのパフォーマンスを一貫して向上させ、事前学習済みLLMsをドメイン固有のRAGに向けて改善するためのポストトレーニングレシピを提供します。
    RAFTのコードとデモはgithub.com/ShishirPatil/gorillaでオープンソースとして公開されています。

Summary (by gpt-3.5-turbo)

  • 大規模なテキストデータのLLMsを事前学習し、新しい知識を追加するためのRetrieval Augmented FineTuning(RAFT)を提案。
    RAFTは、質問に回答するのに役立つ関連文書から正しいシーケンスを引用し、chain-of-thoughtスタイルの応答を通じて推論能力を向上させる。
    RAFTはPubMed、HotpotQA、Gorillaデータセットでモデルのパフォーマンスを向上させ、事前学習済みLLMsをドメイン固有のRAGに向けて改善する。
@AkihikoWatanabe AkihikoWatanabe changed the title RAFT: Adapting Language Model to Domain Specific RAG, Tianjun Zhang+, N/A, arXiv'24 Apr 7, 2024
@AkihikoWatanabe
Copy link
Owner Author

Question, instruction, coxtext, cot style answerの4つを用いてSFTをする模様
画像は下記ツイートより引用
image
https://x.com/cwolferesearch/status/1770912695765660139?s=46&t=Y6UuIHB0Lv0IpmFAjlc2-Q

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant