make sure the model config loader respects the model_revision too (#1160) [skip-ci]
Browse files
src/axolotl/utils/models.py
CHANGED
|
@@ -76,10 +76,15 @@ def load_model_config(cfg):
|
|
| 76 |
if not model_config_name and cfg.tokenizer_config:
|
| 77 |
model_config_name = cfg.tokenizer_config
|
| 78 |
trust_remote_code = cfg.trust_remote_code is True
|
|
|
|
|
|
|
|
|
|
| 79 |
|
| 80 |
try:
|
| 81 |
model_config = AutoConfig.from_pretrained(
|
| 82 |
-
model_config_name,
|
|
|
|
|
|
|
| 83 |
)
|
| 84 |
except ValueError as err:
|
| 85 |
if "mamba" in model_config_name:
|
|
|
|
| 76 |
if not model_config_name and cfg.tokenizer_config:
|
| 77 |
model_config_name = cfg.tokenizer_config
|
| 78 |
trust_remote_code = cfg.trust_remote_code is True
|
| 79 |
+
config_kwargs = {}
|
| 80 |
+
if cfg.model_revision:
|
| 81 |
+
config_kwargs["revision"] = cfg.model_revision
|
| 82 |
|
| 83 |
try:
|
| 84 |
model_config = AutoConfig.from_pretrained(
|
| 85 |
+
model_config_name,
|
| 86 |
+
trust_remote_code=trust_remote_code,
|
| 87 |
+
**config_kwargs,
|
| 88 |
)
|
| 89 |
except ValueError as err:
|
| 90 |
if "mamba" in model_config_name:
|