support for loading a model by git revision
Browse files
src/axolotl/utils/models.py
CHANGED
@@ -154,6 +154,8 @@ def load_model(
|
|
154 |
)
|
155 |
|
156 |
model_kwargs = {}
|
|
|
|
|
157 |
if cfg.adapter == "qlora" and cfg.load_in_4bit:
|
158 |
model_kwargs["quantization_config"] = BitsAndBytesConfig(
|
159 |
load_in_4bit=True,
|
|
|
154 |
)
|
155 |
|
156 |
model_kwargs = {}
|
157 |
+
if cfg.model_revision:
|
158 |
+
model_kwargs["revision"] = cfg.model_revision
|
159 |
if cfg.adapter == "qlora" and cfg.load_in_4bit:
|
160 |
model_kwargs["quantization_config"] = BitsAndBytesConfig(
|
161 |
load_in_4bit=True,
|