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
f7f4b674
Unverified
Commit
f7f4b674
authored
Nov 30, 2023
by
andreyanufr
Committed by
GitHub
Nov 30, 2023
Browse files
Avoid creating model_cache for OVModelForCausalLM
parent
b73850b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
lm_eval/models/gpt2.py
lm_eval/models/gpt2.py
+3
-0
No files found.
lm_eval/models/gpt2.py
View file @
f7f4b674
...
...
@@ -214,12 +214,15 @@ class OPTIMUMLM(BaseLM):
# TODO: update this to be less of a hack once subfolder is fixed in HF
revision
=
revision
+
(
"/"
+
subfolder
if
subfolder
is
not
None
else
""
)
ov_config
=
{
"PERFORMANCE_HINT"
:
"LATENCY"
,
"NUM_STREAMS"
:
"1"
,
"CACHE_DIR"
:
""
}
self
.
gpt2
=
OVModelForCausalLM
.
from_pretrained
(
pretrained
,
load_in_8bit
=
load_in_8bit
,
revision
=
revision
,
trust_remote_code
=
trust_remote_code
,
use_cache
=
True
,
ov_config
=
ov_config
)
try
:
...
...
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