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
add0895d
Unverified
Commit
add0895d
authored
Jul 28, 2023
by
Younes Belkada
Committed by
GitHub
Jul 28, 2023
Browse files
[`Mpt`] Fix mpt slow test (#25170)
fix mpt slow test
parent
d53b8ad7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
tests/models/mpt/test_modeling_mpt.py
tests/models/mpt/test_modeling_mpt.py
+4
-2
No files found.
tests/models/mpt/test_modeling_mpt.py
View file @
add0895d
...
@@ -432,7 +432,7 @@ class MptIntegrationTests(unittest.TestCase):
...
@@ -432,7 +432,7 @@ class MptIntegrationTests(unittest.TestCase):
)
)
input_text
=
"Hello"
input_text
=
"Hello"
expected_output
=
"Hello
my name is [name] and I am a [type] at [company]. I have a [number]
"
expected_output
=
""
"Hello
, I
\'
m a new user of the forum. I have a question about the "Solaris""
"
inputs
=
tokenizer
(
input_text
,
return_tensors
=
"pt"
)
inputs
=
tokenizer
(
input_text
,
return_tensors
=
"pt"
)
outputs
=
model
.
generate
(
**
inputs
,
max_new_tokens
=
20
)
outputs
=
model
.
generate
(
**
inputs
,
max_new_tokens
=
20
)
...
@@ -450,7 +450,9 @@ class MptIntegrationTests(unittest.TestCase):
...
@@ -450,7 +450,9 @@ class MptIntegrationTests(unittest.TestCase):
)
)
input_text
=
"Hello"
input_text
=
"Hello"
expected_output
=
"Hello my name is Kaitlyn and I am a senior at the University of Wisconsin-Stout. I am major"
expected_output
=
(
"Hello and welcome to the first day of the new release countdown for the month of May!
\n
Today"
)
inputs
=
tokenizer
(
input_text
,
return_tensors
=
"pt"
)
inputs
=
tokenizer
(
input_text
,
return_tensors
=
"pt"
)
outputs
=
model
.
generate
(
**
inputs
,
max_new_tokens
=
20
)
outputs
=
model
.
generate
(
**
inputs
,
max_new_tokens
=
20
)
...
...
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