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
f9f27b0f
Unverified
Commit
f9f27b0f
authored
Oct 23, 2023
by
Arthur
Committed by
GitHub
Oct 23, 2023
Browse files
[`SeamlessM4T`] fix copies with NLLB MoE int8 (#27018)
fix copies on newly merged model
parent
244a53e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/models/seamless_m4t/modeling_seamless_m4t.py
...transformers/models/seamless_m4t/modeling_seamless_m4t.py
+1
-1
No files found.
src/transformers/models/seamless_m4t/modeling_seamless_m4t.py
View file @
f9f27b0f
...
...
@@ -1300,7 +1300,7 @@ class SeamlessM4TFeedForwardNetwork(nn.Module):
if
(
isinstance
(
self
.
fc2
.
weight
,
torch
.
Tensor
)
and
hidden_states
.
dtype
!=
self
.
fc2
.
weight
.
dtype
and
self
.
fc2
.
weight
.
dtype
!=
torch
.
int8
and
(
self
.
fc2
.
weight
.
dtype
!=
torch
.
int8
and
self
.
fc2
.
weight
.
dtype
!=
torch
.
uint8
)
):
hidden_states
=
hidden_states
.
to
(
self
.
fc2
.
weight
.
dtype
)
hidden_states
=
self
.
fc2
(
hidden_states
)
...
...
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