[FLax] Fix marian docs 2 (#12615)
* fix_torch_device_generate_test * remove @ * up
This commit is contained in:
committed by
GitHub
parent
165606e5b4
commit
934222e3c5
@@ -55,7 +55,7 @@ Tips
|
|||||||
>>> input_ids = tokenizer(text, max_length=64, return_tensors='jax').input_ids
|
>>> input_ids = tokenizer(text, max_length=64, return_tensors='jax').input_ids
|
||||||
|
|
||||||
>>> # Marian has to make use of early_stopping=True
|
>>> # Marian has to make use of early_stopping=True
|
||||||
>>> sequences = model.generate(inputs, early_stopping=True, max_length=64, num_beams=2).sequences
|
>>> sequences = model.generate(input_ids, early_stopping=True, max_length=64, num_beams=2).sequences
|
||||||
|
|
||||||
|
|
||||||
Naming
|
Naming
|
||||||
|
|||||||
@@ -1466,7 +1466,7 @@ FLAX_MARIAN_MT_DOCSTRING = """
|
|||||||
>>> input_ids = tokenizer(text, max_length=64, return_tensors='jax').input_ids
|
>>> input_ids = tokenizer(text, max_length=64, return_tensors='jax').input_ids
|
||||||
|
|
||||||
>>> # Marian has to make use of early_stopping=True
|
>>> # Marian has to make use of early_stopping=True
|
||||||
>>> sequences = model.generate(inputs, early_stopping=True, max_length=64, num_beams=2).sequences
|
>>> sequences = model.generate(input_ids, early_stopping=True, max_length=64, num_beams=2).sequences
|
||||||
|
|
||||||
>>> outputs = tokenizer.batch_decode(sequences, skip_special_tokens=True)
|
>>> outputs = tokenizer.batch_decode(sequences, skip_special_tokens=True)
|
||||||
>>> # should give `Meine Freunde sind cool, aber sie essen zu viele Kohlenhydrate.`
|
>>> # should give `Meine Freunde sind cool, aber sie essen zu viele Kohlenhydrate.`
|
||||||
|
|||||||
Reference in New Issue
Block a user