HyperAIHyperAI

Command Palette

Search for a command to run...

5 months ago

REPLUG: Retrieval-Augmented Black-Box Language Models

Weijia Shi; Sewon Min; Michihiro Yasunaga; Minjoon Seo; Rich James; Mike Lewis; Luke Zettlemoyer; Wen-tau Yih

REPLUG: Retrieval-Augmented Black-Box Language Models

Abstract

We introduce REPLUG, a retrieval-augmented language modeling framework that treats the language model (LM) as a black box and augments it with a tuneable retrieval model. Unlike prior retrieval-augmented LMs that train language models with special cross attention mechanisms to encode the retrieved text, REPLUG simply prepends retrieved documents to the input for the frozen black-box LM. This simple design can be easily applied to any existing retrieval and language models. Furthermore, we show that the LM can be used to supervise the retrieval model, which can then find documents that help the LM make better predictions. Our experiments demonstrate that REPLUG with the tuned retriever significantly improves the performance of GPT-3 (175B) on language modeling by 6.3%, as well as the performance of Codex on five-shot MMLU by 5.1%.

Code Repositories

intellabs/fastrag
pytorch
Mentioned in GitHub
liano3/RAG-fairness
pytorch
Mentioned in GitHub
ruc-nlpir/flashrag
pytorch
Mentioned in GitHub

Benchmarks

BenchmarkMethodologyMetrics
question-answering-on-natural-questionscode-davinci-002 175B + REPLUG (few-shot)
EM: 44.7
question-answering-on-natural-questionscode-davinci-002 175B + REPLUG LSR (few-shot)
EM: 45.5
question-answering-on-triviaqacode-davinci-002 175B + REPLUG (Few-Shot)
EM: 76.8
question-answering-on-triviaqacode-davinci-002 175B + REPLUG LSR (Few-Shot)
EM: 77.3

Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing
Get Started

Hyper Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp
REPLUG: Retrieval-Augmented Black-Box Language Models | Papers | HyperAI