support for loading a model by git revision

This commit is contained in:
Wing Lian
2023-07-13 22:58:25 -04:00
parent 687d889928
commit 69a235061b

View File

@@ -154,6 +154,8 @@ def load_model(
)
model_kwargs = {}
if cfg.model_revision:
model_kwargs["revision"] = cfg.model_revision
if cfg.adapter == "qlora" and cfg.load_in_4bit:
model_kwargs["quantization_config"] = BitsAndBytesConfig(
load_in_4bit=True,