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
a8d9a449
Commit
a8d9a449
authored
May 06, 2023
by
Benjamin Fattori
Browse files
assert + help message if script called incorrectly with multigpu
parent
159c1a93
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
lm_eval/models/gpt2.py
lm_eval/models/gpt2.py
+2
-1
No files found.
lm_eval/models/gpt2.py
View file @
a8d9a449
...
@@ -78,7 +78,8 @@ class HFLM(LM):
...
@@ -78,7 +78,8 @@ class HFLM(LM):
print
(
f
"Using
{
gpus
}
GPUs with Data Parallelism"
)
print
(
f
"Using
{
gpus
}
GPUs with Data Parallelism"
)
self
.
_rank
=
self
.
accelerator
.
local_process_index
self
.
_rank
=
self
.
accelerator
.
local_process_index
self
.
_world_size
=
gpus
self
.
_world_size
=
self
.
accelerator
.
num_processes
assert
gpus
==
self
.
accelerator
.
num_processes
,
"Number of GPUs does not match the world size. If evaluating with data parallelism, please call script with accelerate launch *script name*"
@
property
@
property
def
eot_token_id
(
self
):
def
eot_token_id
(
self
):
...
...
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