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
17503b00
Unverified
Commit
17503b00
authored
Apr 12, 2023
by
jprivera44
Committed by
GitHub
Apr 12, 2023
Browse files
Added parallel device usage for GPT-J (#22713)
parent
b76e6ebd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
src/transformers/models/gptj/modeling_gptj.py
src/transformers/models/gptj/modeling_gptj.py
+1
-0
No files found.
src/transformers/models/gptj/modeling_gptj.py
100755 → 100644
View file @
17503b00
...
...
@@ -1012,6 +1012,7 @@ class GPTJForSequenceClassification(GPTJPreTrainedModel):
loss
=
None
if
labels
is
not
None
:
labels
=
labels
.
to
(
pooled_logits
.
device
)
if
self
.
config
.
problem_type
is
None
:
if
self
.
num_labels
==
1
:
self
.
config
.
problem_type
=
"regression"
...
...
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