Unverified Commit 4658896e authored by Sam Shleifer's avatar Sam Shleifer Committed by GitHub
Browse files

[Marian] Fix typo in docstring (#4284)

parent bf64b8cf
...@@ -37,7 +37,7 @@ class MarianMTModel(BartForConditionalGeneration): ...@@ -37,7 +37,7 @@ class MarianMTModel(BartForConditionalGeneration):
tok = MarianTokenizer.from_pretrained(mname) tok = MarianTokenizer.from_pretrained(mname)
batch = tok.prepare_translation_batch(src_texts=[sample_text]) # don't need tgt_text for inference batch = tok.prepare_translation_batch(src_texts=[sample_text]) # don't need tgt_text for inference
gen = model.generate(**batch) # for forward pass: model(**batch) gen = model.generate(**batch) # for forward pass: model(**batch)
words: List[str] = tok.decode_batch(gen, skip_special_tokens=True) # returns "Where is the the bus stop ?" words: List[str] = tok.batch_decode(gen, skip_special_tokens=True) # returns "Where is the the bus stop ?"
""" """
......
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