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
8286b1d9
Unverified
Commit
8286b1d9
authored
Dec 22, 2023
by
Anjor Kanekar
Committed by
GitHub
Dec 22, 2023
Browse files
Fixes
https://github.com/EleutherAI/lm-evaluation-harness/issues/437
(#1180)
parent
5503b274
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
lm_eval/models/huggingface.py
lm_eval/models/huggingface.py
+1
-3
No files found.
lm_eval/models/huggingface.py
View file @
8286b1d9
...
@@ -142,9 +142,7 @@ class HFLM(LM):
...
@@ -142,9 +142,7 @@ class HFLM(LM):
+
[
f
"cuda:
{
i
}
"
for
i
in
range
(
torch
.
cuda
.
device_count
())]
+
[
f
"cuda:
{
i
}
"
for
i
in
range
(
torch
.
cuda
.
device_count
())]
+
[
"mps"
,
"mps:0"
]
+
[
"mps"
,
"mps:0"
]
)
)
if
device
:
if
device
and
device
in
device_list
:
if
device
not
in
device_list
:
device
=
int
(
device
)
self
.
_device
=
torch
.
device
(
device
)
self
.
_device
=
torch
.
device
(
device
)
eval_logger
.
info
(
f
"Using device '
{
device
}
'"
)
eval_logger
.
info
(
f
"Using device '
{
device
}
'"
)
if
device
in
(
"mps"
,
"mps:0"
)
and
version
.
parse
(
if
device
in
(
"mps"
,
"mps:0"
)
and
version
.
parse
(
...
...
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