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
5e620a92
Unverified
Commit
5e620a92
authored
Dec 11, 2023
by
Yoach Lacombe
Committed by
GitHub
Dec 11, 2023
Browse files
Fix `SeamlessM4Tv2ModelIntegrationTest` (#27911)
change dtype of some integration tests
parent
e96c1de1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
tests/models/seamless_m4t_v2/test_modeling_seamless_m4t_v2.py
...s/models/seamless_m4t_v2/test_modeling_seamless_m4t_v2.py
+3
-2
No files found.
tests/models/seamless_m4t_v2/test_modeling_seamless_m4t_v2.py
View file @
5e620a92
...
@@ -1014,8 +1014,9 @@ class SeamlessM4Tv2ModelIntegrationTest(unittest.TestCase):
...
@@ -1014,8 +1014,9 @@ class SeamlessM4Tv2ModelIntegrationTest(unittest.TestCase):
)
)
def
factory_test_task
(
self
,
class1
,
class2
,
inputs
,
class1_kwargs
,
class2_kwargs
):
def
factory_test_task
(
self
,
class1
,
class2
,
inputs
,
class1_kwargs
,
class2_kwargs
):
model1
=
class1
.
from_pretrained
(
self
.
repo_id
).
to
(
torch_device
)
# half-precision loading to limit GPU usage
model2
=
class2
.
from_pretrained
(
self
.
repo_id
).
to
(
torch_device
)
model1
=
class1
.
from_pretrained
(
self
.
repo_id
,
torch_dtype
=
torch
.
float16
).
to
(
torch_device
)
model2
=
class2
.
from_pretrained
(
self
.
repo_id
,
torch_dtype
=
torch
.
float16
).
to
(
torch_device
)
set_seed
(
0
)
set_seed
(
0
)
output_1
=
model1
.
generate
(
**
inputs
,
**
class1_kwargs
)
output_1
=
model1
.
generate
(
**
inputs
,
**
class1_kwargs
)
...
...
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