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
43407f36
Commit
43407f36
authored
Jul 16, 2023
by
baberabb
Browse files
set fp32 if device=mps
parent
ce214979
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
lm_eval/api/model.py
lm_eval/api/model.py
+1
-1
No files found.
lm_eval/api/model.py
View file @
43407f36
...
@@ -114,7 +114,7 @@ class LM(abc.ABC):
...
@@ -114,7 +114,7 @@ class LM(abc.ABC):
additional_config
=
{}
if
additional_config
is
None
else
additional_config
additional_config
=
{}
if
additional_config
is
None
else
additional_config
args
=
utils
.
simple_parse_args_string
(
arg_string
)
args
=
utils
.
simple_parse_args_string
(
arg_string
)
args2
=
{
k
:
v
for
k
,
v
in
additional_config
.
items
()
if
v
is
not
None
}
args2
=
{
k
:
v
for
k
,
v
in
additional_config
.
items
()
if
v
is
not
None
}
if
"device"
in
args
and
args
[
"device"
]
==
"mps"
:
if
args2
.
get
(
"device"
)
==
"mps"
or
args
.
get
(
"device"
)
==
"mps"
:
args
[
"dtype"
]
=
"float32"
args
[
"dtype"
]
=
"float32"
return
cls
(
**
args
,
**
args2
)
return
cls
(
**
args
,
**
args2
)
...
...
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