Repository navigation
test(models): gate flash-attn eval args and pin QQQ test to fp16 (#4398) - #4433
Merged
Merged
Conversation
Item 1: test_llama3_2_qqq now pins TORCH_DTYPE and its evalution dtype to float16 because QQQLinear only supports FP16, preserving BACKEND.QQQ coverage instead of switching to the portable QQQ_TORCH kernel. Item 2: add ModelTest.resolve_attn_implementation(), which keeps paged|flash_attention_2 when flash-attn is importable and falls back to paged|sdpa otherwise, and route the per-task evalution_model_args (and the ParoQuant helper defaults) through it. test_multi_vs_single_gpu and test_deci were already gated/no-flash and are unchanged. Adds CPU unit tests for the new helper.
This was referenced Nov 16, 2026
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.
Summary
tests/modelsintegration suite failures atdef6e61that are test-harness bugs rather than product regressions:test_llama3_2_qqqsetsLOAD_BACKEND=BACKEND.QQQbut leavesTORCH_DTYPE="auto"; Llama-3.2-1B is bf16 andQQQLinearonly supports fp16, so post-quant validation always raised.evalution_model_argshard-codedattn_implementation: "paged|flash_attention_2", bypassing the harnessUSE_FLASH_ATTN/is_flash_attn_2_available()gate and crashing withImportErrorafter quantization on hosts without flash-attn.Addresses items 1-2 of #4398.
What Changed
tests/models/test_llama3_2_qqq.py: pinTORCH_DTYPE=torch.float16and the evaluation dtype to fp16, preserving real BACKEND.QQQ coverage.tests/models/model_test.py: addModelTest.resolve_attn_implementation(), which keepspaged|flash_attention_2when flash-attn is importable and falls back topaged|sdpaotherwise.test_llama3_2, swordfish, dynamic-skip-layer, multi-vs-single-gpu, qwen3_6_moe, qwen3_8b_fp8, cohere_compass, ling_2_6_flash, nemotron_omni, paroquant helpers).tests/test_model_test_helpers.py.Items 3-5 (stale slow-mode baselines, silently-skipping tests,
batch_size="auto"OOM thrash) are report-only in the issue; they need new baselines/perf work and are not changed here.Tests
Real RTX 5090
tests/modelsruns were not executed in this container (no GPU / no flash-attn).Logic Flow Documentation
New
resolve_attn_implementation()decision: explicit non-flash request is preserved,flash_attention_2downgrades tosdpaonly when flash-attn is missing. Pinned by the new unit tests; no docs page.Review Requirements