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
gaoqiong
lm-evaluation-harness
Commits
3cfd23a1
Commit
3cfd23a1
authored
May 10, 2023
by
Benjamin Fattori
Browse files
drop comments about pytorch DP
parent
4d3ea67a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
lm_eval/models/gpt2.py
lm_eval/models/gpt2.py
+2
-4
No files found.
lm_eval/models/gpt2.py
View file @
3cfd23a1
...
...
@@ -86,7 +86,7 @@ class HFLM(LM):
self
.
accelerator
=
accelerator
if
self
.
accelerator
.
is_local_main_process
:
print
(
f
"Using
{
gpus
}
devices data parallelism"
)
print
(
f
"Using
{
gpus
}
devices
with
data parallelism"
)
self
.
_rank
=
self
.
accelerator
.
local_process_index
self
.
_world_size
=
self
.
accelerator
.
num_processes
...
...
@@ -111,12 +111,10 @@ class HFLM(LM):
@
property
def
batch_size
(
self
):
# TODO: fix multi-gpu
return
self
.
batch_size_per_gpu
# * gpus
return
self
.
batch_size_per_gpu
@
property
def
device
(
self
):
# TODO: fix multi-gpu
return
self
.
_device
@
property
...
...
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