Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
934222e3
Unverified
Commit
934222e3
authored
Jul 09, 2021
by
Patrick von Platen
Committed by
GitHub
Jul 09, 2021
Browse files
[FLax] Fix marian docs 2 (#12615)
* fix_torch_device_generate_test * remove @ * up
parent
165606e5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
docs/source/model_doc/marian.rst
docs/source/model_doc/marian.rst
+1
-1
src/transformers/models/marian/modeling_flax_marian.py
src/transformers/models/marian/modeling_flax_marian.py
+1
-1
No files found.
docs/source/model_doc/marian.rst
View file @
934222e3
...
@@ -55,7 +55,7 @@ Tips
...
@@ -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
_id
s, early_stopping=True, max_length=64, num_beams=2).sequences
Naming
Naming
...
...
src/transformers/models/marian/modeling_flax_marian.py
View file @
934222e3
...
@@ -1466,7 +1466,7 @@ FLAX_MARIAN_MT_DOCSTRING = """
...
@@ -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
_id
s, 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.`
...
...
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