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
244a53e0
"vscode:/vscode.git/clone" did not exist on "4fc708f98c9c8d5cb48e8a2639e3f7a21c65802f"
Unverified
Commit
244a53e0
authored
Oct 23, 2023
by
Younes Belkada
Committed by
GitHub
Oct 23, 2023
Browse files
[`NLLB-MoE`] Fix NLLB MoE 4bit inference (#27012)
fix NLLB MoE 4bit
parent
cb45f71c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/models/nllb_moe/modeling_nllb_moe.py
src/transformers/models/nllb_moe/modeling_nllb_moe.py
+1
-1
No files found.
src/transformers/models/nllb_moe/modeling_nllb_moe.py
View file @
244a53e0
...
...
@@ -417,7 +417,7 @@ class NllbMoeDenseActDense(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