From 69a235061b8a4b8252e97272f25b24ebcff3a026 Mon Sep 17 00:00:00 2001 From: Wing Lian Date: Thu, 13 Jul 2023 22:58:25 -0400 Subject: [PATCH] support for loading a model by git revision --- src/axolotl/utils/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/axolotl/utils/models.py b/src/axolotl/utils/models.py index 7181cca31..6849551bc 100644 --- a/src/axolotl/utils/models.py +++ b/src/axolotl/utils/models.py @@ -154,6 +154,8 @@ def load_model( ) model_kwargs = {} + if cfg.model_revision: + model_kwargs["revision"] = cfg.model_revision if cfg.adapter == "qlora" and cfg.load_in_4bit: model_kwargs["quantization_config"] = BitsAndBytesConfig( load_in_4bit=True,