File tree Expand file tree Collapse file tree
backends/arm/test/models/Qwen3_VL Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -252,16 +252,17 @@ def _test_qwen3_vl_full_models_tosa_FP(
252252def _test_qwen3_vl_full_models_tosa_FP_bf16 (
253253 test_case : Qwen3VLModelTestCase ,
254254 config_factory = _make_qwen3_vl_e2e_test_config ,
255+ text_model_atol : float | None = None ,
255256):
256257 model , inputs = test_case .model_cls .prepare_model_and_inputs (config_factory )
257258 model , inputs = _to_bfloat16_model_and_floating_inputs (model , inputs )
258259 # Slightly higher atol for TOSA BF16 on aarch64 (MLETORCH-2048: numeric mismatch)
259- atol = (
260- 0.4
261- if common . is_aarch64_host ()
262- and test_case . model_cls is LowerableVisionModelWrapper
263- else 0.1
264- )
260+ if common . is_aarch64_host () and test_case . model_cls is LowerableVisionModelWrapper :
261+ atol = 0.4
262+ elif text_model_atol is not None and test_case . model_cls is TextModelWrapper :
263+ atol = text_model_atol
264+ else :
265+ atol = 0.1
265266 with torch .no_grad ():
266267 pipeline = TosaPipelineFP [input_t ](
267268 model ,
@@ -382,7 +383,9 @@ def test_qwen3_vl_2b_instruct_full_models_tosa_FP_bf16(
382383 test_case : Qwen3VLModelTestCase ,
383384):
384385 _test_qwen3_vl_full_models_tosa_FP_bf16 (
385- test_case , _make_qwen3_vl_2b_instruct_layer_config
386+ test_case ,
387+ _make_qwen3_vl_2b_instruct_layer_config ,
388+ text_model_atol = 0.15 ,
386389 )
387390
388391
You can’t perform that action at this time.
0 commit comments