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
0ac38750
Unverified
Commit
0ac38750
authored
Sep 26, 2023
by
Hugo Laurençon
Committed by
GitHub
Sep 26, 2023
Browse files
Fix DeepSpeed issue with Idefics (#26393)
Fix deepspeed issue with Idefics
parent
6ce6a5ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/models/idefics/modeling_idefics.py
src/transformers/models/idefics/modeling_idefics.py
+1
-1
No files found.
src/transformers/models/idefics/modeling_idefics.py
View file @
0ac38750
...
@@ -428,7 +428,7 @@ class IdeficsDecoupledLinear(nn.Linear):
...
@@ -428,7 +428,7 @@ class IdeficsDecoupledLinear(nn.Linear):
output
=
F
.
linear
(
input
,
self
.
weight
,
self
.
bias
)
output
=
F
.
linear
(
input
,
self
.
weight
,
self
.
bias
)
if
self
.
out_additional_features
>
0
:
if
self
.
out_additional_features
>
0
:
additional_features
=
F
.
linear
(
input
,
self
.
additional_fc
.
weight
,
self
.
additional_fc
.
bias
)
additional_features
=
self
.
additional_fc
(
input
)
output
=
torch
.
cat
((
output
,
additional_features
),
-
1
)
output
=
torch
.
cat
((
output
,
additional_features
),
-
1
)
return
output
return
output
...
...
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