Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
31516c77
"tests/test_modeling_tf_pytorch.py" did not exist on "158e82e061c02fc2f1613adb7ac1d1cb6adae71c"
Unverified
Commit
31516c77
authored
Sep 18, 2020
by
Patrick von Platen
Committed by
GitHub
Sep 18, 2020
Browse files
Update README.md
parent
4c14669a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
model_cards/facebook/rag-sequence-nq/README.md
model_cards/facebook/rag-sequence-nq/README.md
+2
-2
No files found.
model_cards/facebook/rag-sequence-nq/README.md
View file @
31516c77
## 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
)
by Aleksandra Piktus et al.
by
Patrick Lewis, Ethan Perez,
Aleksand
a
ra Piktus et al.
## Usage:
...
...
@@ -18,7 +18,7 @@ outputs = model(input_ids=input_dict["input_ids"], labels=input_dict["labels"])
# 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 should give 270,000,000 -> not quite correct the answer, but it also only uses a dummy index
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment