Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
8aa01d2a
Unverified
Commit
8aa01d2a
authored
Aug 05, 2021
by
Sasha Luccioni
Committed by
GitHub
Aug 05, 2021
Browse files
Create perplexity.rst (#13004)
Updating the import for load_dataset
parent
83e5a106
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
docs/source/perplexity.rst
docs/source/perplexity.rst
+1
-1
No files found.
docs/source/perplexity.rst
View file @
8aa01d2a
...
@@ -96,7 +96,7 @@ dataset in memory.
...
@@ -96,7 +96,7 @@ dataset in memory.
.. code-block:: python
.. code-block:: python
from
nlp
import load_dataset
from
datasets
import load_dataset
test = load_dataset('
wikitext
', '
wikitext
-
2
-
raw
-
v1
', split='
test
')
test = load_dataset('
wikitext
', '
wikitext
-
2
-
raw
-
v1
', split='
test
')
encodings = tokenizer('
\
n
\
n
'.join(test['
text
']), return_tensors='
pt
')
encodings = tokenizer('
\
n
\
n
'.join(test['
text
']), return_tensors='
pt
')
...
...
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