[RAG] Add missing doc and attention_mask to rag (#7382)

* add docs

* add missing docs and attention_mask in fine-tune
This commit is contained in:
Patrick von Platen
2020-09-25 11:23:55 +02:00
committed by GitHub
parent 7cdd9da5bf
commit 2dd652d757
2 changed files with 17 additions and 0 deletions

View File

@@ -265,6 +265,7 @@ class GenerativeQAModule(BaseTransformer):
start_time = time.time()
generated_ids = self.model.generate(
batch["input_ids"],
attention_mask=batch["attention_mask"],
do_deduplication=False, # rag specific parameter
use_cache=True,
min_length=1,