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
57c3b1a2
Unverified
Commit
57c3b1a2
authored
Dec 15, 2023
by
Baber Abbasi
Committed by
GitHub
Dec 15, 2023
Browse files
place device onto `mps` (#1133)
parent
04707a2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
lm_eval/models/huggingface.py
lm_eval/models/huggingface.py
+1
-1
No files found.
lm_eval/models/huggingface.py
View file @
57c3b1a2
...
...
@@ -207,7 +207,7 @@ class HFLM(LM):
self
.
model
.
eval
()
self
.
model
.
tie_weights
()
if
gpus
>=
1
and
isinstance
(
pretrained
,
str
):
if
(
gpus
>=
1
or
self
.
device
.
type
==
"mps"
)
and
isinstance
(
pretrained
,
str
):
if
not
(
parallelize
or
autogptq
or
(
"device_map"
in
kwargs
)):
# place model onto device requested manually,
# if not using HF Accelerate or device_map
...
...
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