fix validation for qlora merge
Browse files
src/axolotl/utils/validation.py
CHANGED
|
@@ -1,9 +1,14 @@
|
|
| 1 |
def validate_config(cfg):
|
| 2 |
if cfg.adapter == "qlora":
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
# TODO
|
| 8 |
# MPT 7b
|
| 9 |
# https://github.com/facebookresearch/bitsandbytes/issues/25
|
|
|
|
| 1 |
def validate_config(cfg):
|
| 2 |
if cfg.adapter == "qlora":
|
| 3 |
+
if cfg.merge_lora:
|
| 4 |
+
# can't merge qlora if loaded in 8bit or 4bit
|
| 5 |
+
assert cfg.load_in_8bit is False
|
| 6 |
+
assert cfg.load_4bit is False
|
| 7 |
+
assert cfg.load_in_4bit is False
|
| 8 |
+
else:
|
| 9 |
+
assert cfg.load_in_8bit is False
|
| 10 |
+
assert cfg.load_4bit is False
|
| 11 |
+
assert cfg.load_in_4bit is True
|
| 12 |
# TODO
|
| 13 |
# MPT 7b
|
| 14 |
# https://github.com/facebookresearch/bitsandbytes/issues/25
|