From 96bd6ae1c4904dfeb3107c6d81de08ee573adccf Mon Sep 17 00:00:00 2001 From: NanoCode012 Date: Sun, 13 Aug 2023 01:16:59 +0900 Subject: [PATCH] Fix(model loading): Warn when model revision is passed to gptq (#364) * fix(model loading): warn when model revision is passed to gptq * chore: improve message --- src/axolotl/utils/validation.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/axolotl/utils/validation.py b/src/axolotl/utils/validation.py index 06669cba2..db29fcdfa 100644 --- a/src/axolotl/utils/validation.py +++ b/src/axolotl/utils/validation.py @@ -97,6 +97,13 @@ def validate_config(cfg): "push_to_hub_model_id is deprecated. Please use hub_model_id instead." ) + if cfg.gptq and cfg.model_revision: + raise ValueError( + "model_revision is not supported for GPTQ models. " + + "Please download the model from HuggingFace Hub manually for correct branch, " + + "point to its path, and remove model_revision from the config." + ) + # TODO # MPT 7b # https://github.com/facebookresearch/bitsandbytes/issues/25