Skip to content

Commit 87b90f0

Browse files
FIX TST Wrong attribute in LoftQ test (#2841)
This is to fix an oversight from #2797, where the LoftQ test was sligthly refactored but one test was not updated accordingly.
1 parent 086f187 commit 87b90f0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/test_gpu_examples.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2950,8 +2950,9 @@ def test_bloomz_loftq_4bit(self, device, tmp_path):
29502950
assert mse_loftq > 0.0
29512951

29522952
# next, check that LoftQ quantization errors are smaller than LoRA errors by a certain margin
2953-
assert mse_loftq < (mse_quantized / self.error_factor)
2954-
assert mae_loftq < (mae_quantized / self.error_factor)
2953+
error_factor = self.get_error_factor(device)
2954+
assert mse_loftq < (mse_quantized / error_factor)
2955+
assert mae_loftq < (mae_quantized / error_factor)
29552956

29562957
@pytest.mark.parametrize("device", [torch_device, "cpu"])
29572958
def test_bloomz_loftq_4bit_iter_5(self, device, tmp_path):

0 commit comments

Comments
 (0)