Unverified Commit 31516c77 authored by Patrick von Platen's avatar Patrick von Platen Committed by GitHub
Browse files

Update README.md

parent 4c14669a
## RAG ## RAG
This is the RAG-Sequence Model of the the paper [Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks](https://arxiv.org/pdf/2005.11401.pdf) This is the RAG-Sequence Model of the the paper [Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks](https://arxiv.org/pdf/2005.11401.pdf)
by Aleksandra Piktus et al. by Patrick Lewis, Ethan Perez, Aleksandara Piktus et al.
## Usage: ## Usage:
...@@ -18,7 +18,7 @@ outputs = model(input_ids=input_dict["input_ids"], labels=input_dict["labels"]) ...@@ -18,7 +18,7 @@ outputs = model(input_ids=input_dict["input_ids"], labels=input_dict["labels"])
# outputs.loss should give 76.2978 # outputs.loss should give 76.2978
generated = model.generate(input_ids=input_dict["input_ids"], num_beams=4) generated = model.generate(input_ids=input_dict["input_ids"])
generated_string = tokenizer.batch_decode(generated, skip_special_tokens=True) generated_string = tokenizer.batch_decode(generated, skip_special_tokens=True)
# generated_string should give 270,000,000 -> not quite correct the answer, but it also only uses a dummy index # generated_string should give 270,000,000 -> not quite correct the answer, but it also only uses a dummy index
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment