Add XPU expected slice for SlowBnb4BitFluxControlWithLoraTests::test_lora_loading#14202
Open
jiqing-feng wants to merge 1 commit into
Open
Add XPU expected slice for SlowBnb4BitFluxControlWithLoraTests::test_lora_loading#14202jiqing-feng wants to merge 1 commit into
SlowBnb4BitFluxControlWithLoraTests::test_lora_loading#14202jiqing-feng wants to merge 1 commit into
Conversation
Contributor
|
Hi @jiqing-feng, thanks for the PR! It does not appear to link an issue it fixes. If this PR addresses an existing issue, please add a closing keyword (e.g. |
Contributor
Author
|
This PR doesn't fix a tracked issue — it only adds a device-specific expected_slice so SlowBnb4BitFluxControlWithLoraTests::test_lora_loading passes on Intel XPU, while keeping the original CUDA reference values unchanged. |
Signed-off-by: jiqing-feng <jiqing.feng@intel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add a device-specific expected output slice for the Flux Control LoRA bitsandbytes
test so it passes on Intel XPU, while keeping the original CUDA reference values as
the default.
Why
SlowBnb4BitFluxControlWithLoraTests::test_lora_loadingfails on XPU with a largemismatch (cosine distance ≈ 0.044 vs the
1e-3threshold):Root cause is not a bitsandbytes XPU bug. Direct probes show the bnb int8 path is
aligned across backends:
int8_vectorwise_dequant): XPU vs CPU identical (rel 6.96e-03, just the normal quantization error).Linear8bitLt): XPU vs CPUrel 1.99e-06(pure floating-point noise).The hard-coded
expected_slicewas recorded on CUDA, and1e-3is too tight to beportable across accelerators — even the plain no-LoRA
test_qualitydrifts to~0.0039on XPU. This test is affected the most because loading the Control LoRAdequantizes and expands the quantized
x_embedder(the first projection into thetransformer), and that difference accumulates over the 8 denoising steps.
Change
Expectationsintests/quantization/bnb/test_mixed_int8.py.Expectations:(None, None): unchanged original CUDA values (default for all non-XPU hardware).("xpu", 5): newly recorded XPU reference values.The
1e-3threshold is unchanged, and CUDA/other backends keep the exact originalbehavior.
Testing