Merge pull request #272 from OpenAccess-AI-Collective/model-revision
support for loading a model by git revision
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user