Fine-tune LLMs from one YAML. Layer streaming trains an 8B model on a 4 GB laptop GPU.
Python cliconsumer-gpudpofine-tuningggufhuggingfacellmllmopslocal-ailocal-llmloralow-vrammachine-learningollamapeftpythonpytorchqlorasfttransformers
test(config): the DoRA refusal on a pre-quantized base covers the unsloth backend (#1466) (#1661)
Yang Bai6bac320b5c9b
diff --git a/tests/test_issue1466_dora_prequantized.py b/tests/test_issue1466_dora_prequantized.pyindex 324c7312..90b5ea94 100644--- a/tests/test_issue1466_dora_prequantized.py+++ b/tests/test_issue1466_dora_prequantized.py@@ -101,3 +101,25 @@ def test_the_mlx_backend_keeps_its_own_refusal(quantization):message = str(excinfo.value)assert "not supported on the mlx backend" in messageassert "use_dora: false" not in message+++def _on_unsloth(yaml: str) -> str:+ return yaml.replace("task: sft\n", "task: sft\nbackend: unsloth\n")++[email protected]("quantization", NO_DORA)+def test_the_unsloth_backend_gets_the_dora_refusal(quantization):+ """The early return is for mlx alone: on unsloth the pairing is refused.++ Which refusal answers is not pinned: today it is this one, and a refusal of+ DoRA on the unsloth backend itself (#1651) would fire first. Both name DoRA."""+ with pytest.raises(ValueError) as excinfo:+ load_config_from_string(_on_unsloth(_yaml(quantization, use_dora=True)))+ assert "dora" in str(excinfo.value).lower()++[email protected]("quantization", NO_DORA)+def test_plain_lora_on_the_unsloth_backend_still_loads(quantization):+ cfg = load_config_from_string(_on_unsloth(_yaml(quantization, use_dora=False)))+ assert cfg.backend == "unsloth"+ assert cfg.training.quantization == quantization