refactor(hardware): rewrite QLoRA-on-ROCm refusal — permanent, not deferred
- SHA
24d1fbde9116c591ad2d2ff74635db25fb654b6c- Parents
-
fa29957 - Tree
4511895
24d1fbd
24d1fbde9116c591ad2d2ff74635db25fb654b6cfa29957
4511895| Status | File | + | - |
|---|---|---|---|
| M |
src/dlm/hardware/refusals.py
|
3 | 2 |
| M |
tests/unit/hardware/test_refusals.py
|
2 | 2 |
src/dlm/hardware/refusals.pymodified@@ -150,8 +150,9 @@ def _refuse_qlora(caps: Capabilities) -> None: | ||
| 150 | 150 | ) |
| 151 | 151 | if caps.backend == Backend.ROCM: |
| 152 | 152 | raise ResolutionError( |
| 153 | - "QLoRA on ROCm is not supported (bitsandbytes ROCm is unstable). " | |
| 154 | - "Set `adapter: lora`, or wait for Sprint 22's ROCm work.", | |
| 153 | + "QLoRA on ROCm is not supported: `bitsandbytes` ROCm builds are " | |
| 154 | + "upstream-unstable and we refuse rather than silently corrupt " | |
| 155 | + "weights. LoRA on ROCm works — set `adapter: lora`.", | |
| 155 | 156 | ) |
| 156 | 157 | if not caps.has_bitsandbytes: |
| 157 | 158 | raise ResolutionError( |
tests/unit/hardware/test_refusals.pymodified@@ -29,10 +29,10 @@ class TestQloraRefusals: | ||
| 29 | 29 | with pytest.raises(ResolutionError, match="CPU detected"): |
| 30 | 30 | check_refusals(_cfg(adapter="qlora"), caps, base_params=135_000_000) |
| 31 | 31 | |
| 32 | - def test_qlora_on_rocm_refused_with_sprint_22_pointer(self) -> None: | |
| 32 | + def test_qlora_on_rocm_refused_permanently(self) -> None: | |
| 33 | 33 | with force_rocm(): |
| 34 | 34 | caps = probe() |
| 35 | - with pytest.raises(ResolutionError, match="Sprint 22"): | |
| 35 | + with pytest.raises(ResolutionError, match="bitsandbytes.*ROCm"): | |
| 36 | 36 | check_refusals(_cfg(adapter="qlora"), caps, base_params=1_500_000_000) |
| 37 | 37 | |
| 38 | 38 | def test_qlora_on_cuda_without_bnb_refused(self) -> None: |