skip explicit model type too if using trust_remote_code
Browse files
src/axolotl/utils/models.py
CHANGED
@@ -241,7 +241,7 @@ def load_model(
|
|
241 |
# device=cfg.device,
|
242 |
# )
|
243 |
# model.train() # sets to train instead of eval mode
|
244 |
-
elif model_type:
|
245 |
model = getattr(transformers, model_type).from_pretrained(
|
246 |
base_model,
|
247 |
load_in_8bit=cfg.load_in_8bit and cfg.adapter is not None,
|
|
|
241 |
# device=cfg.device,
|
242 |
# )
|
243 |
# model.train() # sets to train instead of eval mode
|
244 |
+
elif model_type and not cfg.trust_remote_code:
|
245 |
model = getattr(transformers, model_type).from_pretrained(
|
246 |
base_model,
|
247 |
load_in_8bit=cfg.load_in_8bit and cfg.adapter is not None,
|