Unverified Commit 8e72f267 authored by WoosungMyung's avatar WoosungMyung Committed by GitHub
Browse files

peft Version Assertion (#1635)

* peft Version Assertion

* fix the linter issue
parent a97fde23
......@@ -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
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment