Skip to content

Commit 3574bf1

Browse files
Arm backend: Relax Qwen3-VL 2B MXFP8 tolerance (pytorch#22590)
Parameterize MXFP comparison thresholds and relax them only for the full-size 2B text model to account for accumulated quantization error. cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani Signed-off-by: Sangwon Ha <sangwon.ha@arm.com>
1 parent cfc6ecd commit 3574bf1

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

‎backends/arm/test/models/Qwen3_VL/test_qwen3_vl_model.py‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,8 @@ def _test_qwen3_vl_full_models_vgf_no_quant_bf16(
314314

315315
def _test_qwen3_vl_text_model_tosa_mxfp8_bf16(
316316
config_factory=_make_qwen3_vl_e2e_test_config,
317+
frobenius_threshold: float = 0.1,
318+
cosine_threshold: float = 0.98,
317319
):
318320
# The Qwen 3 VL FP8 model only quantizes the TextModel
319321
model, inputs = TextModelWrapper.prepare_model_and_inputs(config_factory)
@@ -326,8 +328,8 @@ def _test_qwen3_vl_text_model_tosa_mxfp8_bf16(
326328
aten_op=aten_op_mxfp_linear,
327329
exir_op=[],
328330
filter_fn=_is_linear,
329-
frobenius_threshold=0.1,
330-
cosine_threshold=0.98,
331+
frobenius_threshold=frobenius_threshold,
332+
cosine_threshold=cosine_threshold,
331333
mxfp_config=mxfp_config,
332334
tosa_version="1.1",
333335
tosa_extensions=["bf16", "mxfp"],
@@ -404,4 +406,8 @@ def test_qwen3_vl_2b_instruct_full_models_vgf_no_quant_bf16(
404406
@pytest.mark.slow
405407
@pytest.mark.xlarge
406408
def test_qwen3_vl_2b_instruct_text_model_tosa_mxfp8_bf16():
407-
_test_qwen3_vl_text_model_tosa_mxfp8_bf16(_make_qwen3_vl_2b_instruct_layer_config)
409+
_test_qwen3_vl_text_model_tosa_mxfp8_bf16(
410+
_make_qwen3_vl_2b_instruct_layer_config,
411+
frobenius_threshold=0.3,
412+
cosine_threshold=0.95,
413+
)

0 commit comments

Comments
 (0)