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
b9104896
Unverified
Commit
b9104896
authored
Jan 04, 2023
by
Joao Gante
Committed by
GitHub
Jan 04, 2023
Browse files
Generate: Fix CI related to #20727 (#21003)
parent
263fd3c4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
tests/generation/test_utils.py
tests/generation/test_utils.py
+4
-4
No files found.
tests/generation/test_utils.py
View file @
b9104896
...
...
@@ -3035,7 +3035,7 @@ class GenerationIntegrationTests(unittest.TestCase):
tokenizer
=
GPT2Tokenizer
.
from_pretrained
(
"hf-internal-testing/tiny-random-gpt2"
)
text
=
"""Hello, my dog is cute and"""
tokens
=
tokenizer
(
text
,
return_tensors
=
"pt"
)
tokens
=
tokenizer
(
text
,
return_tensors
=
"pt"
)
.
to
(
torch_device
)
model
=
GPT2LMHeadModel
.
from_pretrained
(
"hf-internal-testing/tiny-random-gpt2"
).
to
(
torch_device
)
...
...
@@ -3060,7 +3060,7 @@ class GenerationIntegrationTests(unittest.TestCase):
tokenizer
=
GPT2Tokenizer
.
from_pretrained
(
"hf-internal-testing/tiny-random-gpt2"
)
text
=
"""Hello, my dog is cute and"""
tokens
=
tokenizer
(
text
,
return_tensors
=
"pt"
)
tokens
=
tokenizer
(
text
,
return_tensors
=
"pt"
)
.
to
(
torch_device
)
model
=
GPT2LMHeadModel
.
from_pretrained
(
"hf-internal-testing/tiny-random-gpt2"
).
to
(
torch_device
)
...
...
@@ -3086,7 +3086,7 @@ class GenerationIntegrationTests(unittest.TestCase):
tokenizer
=
GPT2Tokenizer
.
from_pretrained
(
"hf-internal-testing/tiny-random-gpt2"
)
text
=
"""Hello, my dog is cute and"""
tokens
=
tokenizer
(
text
,
return_tensors
=
"pt"
)
tokens
=
tokenizer
(
text
,
return_tensors
=
"pt"
)
.
to
(
torch_device
)
model
=
GPT2LMHeadModel
.
from_pretrained
(
"hf-internal-testing/tiny-random-gpt2"
).
to
(
torch_device
)
...
...
@@ -3109,7 +3109,7 @@ class GenerationIntegrationTests(unittest.TestCase):
tokenizer
=
GPT2Tokenizer
.
from_pretrained
(
"hf-internal-testing/tiny-random-gpt2"
)
text
=
"""Hello, my dog is cute and"""
tokens
=
tokenizer
(
text
,
return_tensors
=
"pt"
)
tokens
=
tokenizer
(
text
,
return_tensors
=
"pt"
)
.
to
(
torch_device
)
model
=
GPT2LMHeadModel
.
from_pretrained
(
"hf-internal-testing/tiny-random-gpt2"
).
to
(
torch_device
)
...
...
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