Nanobit commited on
Commit
96bd6ae
1 Parent(s): e37d935

Fix(model loading): Warn when model revision is passed to gptq (#364)

Browse files

* fix(model loading): warn when model revision is passed to gptq

* chore: improve message

Files changed (1) hide show
  1. src/axolotl/utils/validation.py +7 -0
src/axolotl/utils/validation.py CHANGED
@@ -97,6 +97,13 @@ def validate_config(cfg):
97
  "push_to_hub_model_id is deprecated. Please use hub_model_id instead."
98
  )
99
 
 
 
 
 
 
 
 
100
  # TODO
101
  # MPT 7b
102
  # https://github.com/facebookresearch/bitsandbytes/issues/25
 
97
  "push_to_hub_model_id is deprecated. Please use hub_model_id instead."
98
  )
99
 
100
+ if cfg.gptq and cfg.model_revision:
101
+ raise ValueError(
102
+ "model_revision is not supported for GPTQ models. "
103
+ + "Please download the model from HuggingFace Hub manually for correct branch, "
104
+ + "point to its path, and remove model_revision from the config."
105
+ )
106
+
107
  # TODO
108
  # MPT 7b
109
  # https://github.com/facebookresearch/bitsandbytes/issues/25