Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX TST Small regression in BNB LoRA output (#2238)
Our regression tests reveal that the 8bit LoRA BNB regression test is failing. To reproduce, run: pytest tests/regression/test_regression.py -s --regression -k test_lora_8bit The regression was introduced in #2122. We didn't notice this earlier because of other failing tests in the nightly CI. The cause of the error is subtle. In the original code, we would calculate the LoRA output, convert the dtype if necessary, then add it to the base output. After the mentioned PR, we calculate the LoRA output, add it to the base output, then convert the dtype if necessary. The difference is very small on a per layer basis, but it can accumulate over the layers, leading to a significant difference in outputs, as witnessed by the regression test. This PR rolls back this specific part of the PR (both for 8bit and 4bit) while leaving the main change of that PR intact.
- Loading branch information