tenseleyflow/documentlanguagemodel / 24d1fbd

Browse files

refactor(hardware): rewrite QLoRA-on-ROCm refusal — permanent, not deferred

Authored by espadonne
SHA
24d1fbde9116c591ad2d2ff74635db25fb654b6c
Parents
fa29957
Tree
4511895

2 changed files

StatusFile+-
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:
150150
         )
151151
     if caps.backend == Backend.ROCM:
152152
         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`.",
155156
         )
156157
     if not caps.has_bitsandbytes:
157158
         raise ResolutionError(
tests/unit/hardware/test_refusals.pymodified
@@ -29,10 +29,10 @@ class TestQloraRefusals:
2929
         with pytest.raises(ResolutionError, match="CPU detected"):
3030
             check_refusals(_cfg(adapter="qlora"), caps, base_params=135_000_000)
3131
 
32
-    def test_qlora_on_rocm_refused_with_sprint_22_pointer(self) -> None:
32
+    def test_qlora_on_rocm_refused_permanently(self) -> None:
3333
         with force_rocm():
3434
             caps = probe()
35
-        with pytest.raises(ResolutionError, match="Sprint 22"):
35
+        with pytest.raises(ResolutionError, match="bitsandbytes.*ROCm"):
3636
             check_refusals(_cfg(adapter="qlora"), caps, base_params=1_500_000_000)
3737
 
3838
     def test_qlora_on_cuda_without_bnb_refused(self) -> None: