Remove labels from the RagModel example (#7560)

This commit is contained in:
Sylvain Gugger 2020-10-04 17:39:23 -04:00 committed by GitHub
parent 99cb924bfb
commit 95f792afb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -537,7 +537,7 @@ class RagModel(RagPreTrainedModel):
>>> input_dict = tokenizer.prepare_seq2seq_batch("How many people live in Paris?", "In Paris, there are 10 million people.", return_tensors="pt")
>>> input_ids = input_dict["input_ids"]
>>> outputs = model(input_ids=input_ids, labels=input_dict["labels"])
>>> outputs = model(input_ids=input_ids)
"""
use_cache = use_cache if use_cache is not None else self.config.use_cache