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
8e72f267
Unverified
Commit
8e72f267
authored
Mar 26, 2024
by
WoosungMyung
Committed by
GitHub
Mar 25, 2024
Browse files
peft Version Assertion (#1635)
* peft Version Assertion * fix the linter issue
parent
a97fde23
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
lm_eval/models/huggingface.py
lm_eval/models/huggingface.py
+2
-1
No files found.
lm_eval/models/huggingface.py
View file @
8e72f267
...
...
@@ -565,7 +565,8 @@ class HFLM(TemplateLM):
if
peft
:
if
model_kwargs
.
get
(
"load_in_4bit"
,
None
):
assert
PEFT_VERSION
>=
"0.4.0"
,
"load_in_4bit requires peft >= 0.4.0"
if
version
.
parse
(
PEFT_VERSION
)
<
version
.
parse
(
"0.4.0"
):
raise
AssertionError
(
"load_in_4bit requires peft >= 0.4.0"
)
self
.
_model
=
PeftModel
.
from_pretrained
(
self
.
_model
,
peft
,
revision
=
revision
)
...
...
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