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
59345cc8
Unverified
Commit
59345cc8
authored
Jun 22, 2020
by
flozi00
Committed by
GitHub
Jun 22, 2020
Browse files
Typo (#5147)
parent
bc3a0c06
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
model_cards/google/reformer-crime-and-punishment/README.md
model_cards/google/reformer-crime-and-punishment/README.md
+2
-2
No files found.
model_cards/google/reformer-crime-and-punishment/README.md
View file @
59345cc8
...
@@ -10,8 +10,8 @@ The ReformerLM model was trained in flax using colab notebook proposed by author
...
@@ -10,8 +10,8 @@ The ReformerLM model was trained in flax using colab notebook proposed by author
The model is a language model that operates on small sub-word units. Text can be generated as follows:
The model is a language model that operates on small sub-word units. Text can be generated as follows:
```
python
```
python
model
=
ReformerModelWithLMHead
.
from_pretrained
(
"
patrickvonplaten
/reformer-crime-and-punish"
)
model
=
ReformerModelWithLMHead
.
from_pretrained
(
"
google
/reformer-crime-and-punish
ment
"
)
tok
=
ReformerTokenizer
.
from_pretrained
(
"
patrickvonplaten
/reformer-crime-and-punish"
)
tok
=
ReformerTokenizer
.
from_pretrained
(
"
google
/reformer-crime-and-punish
ment
"
)
tok
.
decode
(
model
.
generate
(
tok
.
encode
(
"A few months later"
,
return_tensors
=
"pt"
),
do_sample
=
True
,
temperature
=
0.7
,
max_length
=
100
)[
0
])
tok
.
decode
(
model
.
generate
(
tok
.
encode
(
"A few months later"
,
return_tensors
=
"pt"
),
do_sample
=
True
,
temperature
=
0.7
,
max_length
=
100
)[
0
])
# gives:'A few months later on was more than anything in the flat.
# gives:'A few months later on was more than anything in the flat.
...
...
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