Repository navigation
Closed
Description
Found on main @ b225a43. I ran the suite file by file on an RTX 4090 (CUDA 13.2, torch 2.15, py3.14) and a Radeon AI PRO R9700 (gfx1201, ROCm 10.1, torch 2.16, py3.14t). Every failure below was re-run 3 times in isolation and failed 3/3. All of them are also red at 12c1273, so they are older than this round, and none is listed in #4241/#4351/#4358/#4462 unless marked. Tests broken by this round's commits are in #4764. Real product bugs found while triaging were filed separately (#4732, #4736, #4758).
A. The test is wrong (reason verified)
Test doubles that do not match the current classes
| test | failure | why the test is wrong |
|---|---|---|
test_exl3_workspace_release.py::test_looper_releases_tile_workspace_when_run_ends[False,True], test_offload_base_modules_restored.py::test_loop_restores_base_modules_when_quantize_fails |
AttributeError: 'ModuleLooper' object has no attribute '_inflight_layer' (raised while handling the injected failure) |
The ModuleLooper doubles are built without __init__. Since f7e30b9 (#4580), the failure path reads self._inflight_layer. 6df9cae (#4704) updated the stage doubles but not these two. |
test_local_model_paths.py (6 tests: test_load_treats_missing_absolute_path_as_local, test_gptqmodel_load_*) |
AttributeError: 'object' object has no attribute 'log_kv_cache_estimate' |
The fake from_quantized/from_pretrained return a bare object(). GPTQModel.load now calls m.log_kv_cache_estimate() (models/auto.py:1031, #4510). |
test_diffusion_gemma_support.py::test_diffusion_gemma_post_quantize_syncs_encoder_layer |
AttributeError: 'DiffusionGemmaQModel' object has no attribute 'quantize_config' |
object.__new__(DiffusionGemmaQModel) has no quantize_config. The base post_quantize reads self.quantize_config.activation_mode (models/base.py:4488). |
test_tenstorrent_support.py::test_calibration_hessian_strides_through_the_text |
assert [0, 18, 37, 56] == [0, 14, 28, 42] |
The window start positions are hard-coded from an older stride formula (see section B). |
Wrong oracle or stale expectation
| test | failure | why the test is wrong |
|---|---|---|
test_model.py::test_dequantize_model_awq |
torch.equal(weight_out, expected) False: 95/128 elements, max diff 21.8 |
The fixture's pack_cols packs nibbles in natural order. Real AWQ GEMM uses the [0,2,4,6,1,3,5,7] interleave that dequantize_model reverses. I packed a real AwqTorchLinear (k=128, n=64, g128) and checked dequantize_model against the module's own forward (m(eye)): max diff 5.3e-5, so the product is correct. |
test_fallback.py::test_fallback_near_dead_scale_survives_smoothing_and_packing[True-{None,row,col}-{midpoint,mean,median,stdclip}-{cpu,cuda:0}] (24) |
test_fallback.py:1161 zero mismatch: 32/32, greatest abs difference 7.0 |
For sym=True the oracle computes an asymmetric zero point, round(-lo/scale). A symmetric GPTQ config stores the midpoint zero (8 for 4-bit), which the sym kernels and packers assume. The test should use expected_zero = 2**(bits-1) when sym. This was flagged as "plausible" in #4121 and never fixed. |
test_gsq_method_adapters.py::test_calibrated_fp8_installs_exact_payload_and_decodes_against_torch[row-None, block-block_size1] |
assert packed.bias.dtype == torch.float16 (is float32) |
FP8 modules now keep the checkpoint bias wide (FP32) on purpose (the #4575 / #4681 line of fixes). The assertion predates that. |
test_serialization.py::TestSerialization::test_quantize_config_meta_only_fields_serialization |
'offload_to_disk_path' not found in {...meta...} |
82ab6f1 (#4327) deliberately stopped writing the machine-local offload_to_disk_path into the checkpoint meta (quantization/config.py:5901). |
test_norm_lifecycle.py::test_fresh_quantization_and_embedding_requantization_tuning_lifecycle[gptq{,_v2}-{canonical,legacy,legacy-sharded}] (6) |
assert any(t.is_meta or torch.is_inference(t) for t in model.model.parameters()) |
The test assumes the in-session model is still a lazy, disk-offloaded shell after quantize(). Since the #4380/#4426 fixes, quantize() restores and materializes base modules, so no meta/inference parameters remain. That is the intended behaviour. |
test_vptq_memory_4391.py::test_chunked_assign_keeps_one_distance_temporary |
assert legacy_counter.max_live == 3 (is 2) |
This asserts how many full-size temporaries the test's own legacy reference function allocates. With torch 2.15 that is 2, not 3. The assertion about the shipped code still passes. Drop the legacy-count assertion or make it >= 2. |
test_jamba_support.py::test_jamba_definition_contract_and_module_tree |
At index 3 diff: ['mamba.x_proj'] != ['mamba.out_proj']; left contains one more item: ['feed_forward.down_proj'] |
The expected list predates 5e8a247 (#4245), which declared mamba.x_proj and the dense feed_forward branch. (test_tiny_jamba_gptq_quantization_smoke fails with StopIteration in model discovery; probably the same fixture, not verified.) |
test_marlin_jit.py::test_marlin_cuda_smoke_build_and_forward |
RuntimeError: For act_order, num_groups must be > 1 |
With desc_act=False, group_size=128, in_features=128, the test fills g_idx with arange(128), which is not a valid g_idx for one group. It should be zeros (arange(k) // group_size). |
test_dynamic.py::TestDynamic::test_skip_module |
None of the expected keywords were found ['paris', 'king'] |
The output is coherent ("The capital city of France is named after which historical figure? A. Napoleon B. Louis XIV ..."). Keyword matching on greedy output of a quantized 0.5B model is brittle. |
test_allspark_awq_cuda.py::test_awq_module_export_keeps_checkpoint_layout[dtype0,dtype1] (listed in #4241 for an earlier qzeros_format cause; now fails differently) |
Unexpected key(s) in state_dict: "_bias_value" |
The test assigns module.bias = nn.Parameter(...), so _kernel_bias()'s self._bias_value = bias registers a second parameter. A real loaded checkpoint keeps bias as a buffer and its state_dict stays clean (verified on a Qwen2.5 8-bit AllSpark load: no new keys after a forward, no _bias_value in the re-save). This is latent: storing the derived tensor via object.__setattr__, or .detach(), would make the module robust. |
test_bits_new.py::Test::test_quant_and_eora |
KeyError: 'BITS' |
Requires an environment variable, contrary to AGENTS.md ("selected by config or API arguments"). It should be parametrized. |
Missing / wrong gates
The GIL=0 subprocess tests (test_ci_free_threaded_lane, test_exl3_dispatch_concurrency, test_exl3_workspace) and the 2-GPU test_excluded_device_warmup tests are listed in #4768.
B. Red on both shas but not root-caused (owner triage; could be test or code)
test_qwen2_5_omni_lm_head.py::test_omni_lm_head_quantize_save_reload(8): root cause filed as [BUG] Quantized Qwen2.5-Omni checkpoints reload with uninitialized audio tower, vision tower and embed_tokens (saved in transformers-5.22 internal key layout thinker.model.*; silently not loaded, NaN/random weights) #4758.test_rco_discovery.py::test_loading_and_materializing_use_all_declared_packed_projections:assert torch.equal(value, saved[...])withtensor(2) vs tensor(1)on a restored projection's state_dict entry (looks like aqzeros_formatmarker).test_rehome_gptaq_foem_dxxt_4312.py::test_quantize_aligns_dxxt_with_rehomed_hessian[gptaq,foem]: the patchedsafe_move_toreceives a real tensor instead of the_ForeignDeviceTensorstand-in, so the code no longer movesdXXT/module_copythrough that call.test_fallback_hessian_release.py::TestFallbackReleasesPartials::test_shared_input_fallback_releases_adopted_source_before_clone:follower._deferred_hessian_sources[0]raises IndexError becauseadopt_hessian_fromno longer defers under the test's fakes.test_packable.py::TestPackable::test_post_init_3_torch_fused: a buffer the test expectspost_initto transform is unchanged.test_qwen_moe_converter.py::test_qwen3_omni_uses_defuser_for_fused_experts:'Qwen3OmniMoeThinkerModel' object has no attribute 'layers'(transformers 5.22 nests the decoder underlanguage_model).test_ret_idx_group_order.py::test_layer_ret_idx_matches_reference_and_invalidates[TorchAtenLinear]:in_features=4100withgroup_size=32. TorchAten's CPU int4pack correctly rejects it, so this parameter needs a skip.- Already listed in closed issues and still red:
test_weight_only_looper.py::test_weight_only_looper_respects_dense_and_moe_vram_strategy_devices([TEST] ROCm test-suite triage at 842d666: missing ROCm skips, order-dependent thread-cap test, and tests that still expect noqzeros_formatmarker #4351),test_locateanything_support.py::test_locateanything_prepare_dataset_uses_remote_processorandtest_gguf_all_formats.py::test_cpp_unsupported_native_types_always_fall_back[dtype2-*-q8_{1,k}]([TEST] CUDA test-suite triage at 842d666 (RTX 5090): test regressions from this round's fix commits, plus stale tests not in #4241/#4351 #4358, a bf16 1-ulp tolerance).
C. Environment only (not a bug; listed so they are not re-triaged)
- defuser 0.0.28 installed vs
defuser>=0.0.31required:module_tree/test_granite_swa_model_tree.py(6),test_awq_relationships[granite-*](3),module_tree/test_bailing_moe_shared_experts_4325.py(2),test_awq_scaling_groups[afmoe,flint](4),test_flint_support. All of these pass with defuser 0.0.31. - Missing packages: einops, torchvision, modelscope, peft (ROCm venv), optimum (ROCm venv), flash-attn, bitblas/libnvrtc.so.12, docker (
test_tgi), MLX. - Offline Hub (
HF_HUB_OFFLINE=1):test_awq_inference_*,test_awq_variable_length_ppl,test_awq_hf_cpu[moe],test_bits,test_dataset_loading,test_eval_runtime,test_mmlupro,test_post_quant_eora,test_quant_and_eora*,test_lora::test_download,test_ricursive_review_regressions::test_real_tensor_parallel_matches_unsharded_model[*]. test_torch_ops_jit_extension.py(2): fails only because the run setGPTQMODEL_TORCH_EXTENSIONS_DIR/TORCH_EXTENSIONS_DIR.- GPU contention: these hit OOM because other jobs were using the same card.
test_qzero_pack_device[pack_dtype0-2-cuda]passed 3/3 when re-run alone.test_simple_quant,test_awq_moeandtest_parameter_count(ROCm) are model-sized and were not re-run.
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
No labels
Activity
Qubitium commentedon Nov 17, 2026
One more pre-existing failure, confirmed after this issue was filed:
tests/test_quant_batch.py::TestQuantBatch::test_diff_batchon RTX 4090 fails 3/3 when re-run alone, and also fails at 12c1273. It quantizes TinyLlama-1.1B withbatch_size=1and withbatch_size=256, then asserts that the greedygenerateids are identical.Bit-identical greedy output across calibration batch shapes is not a contract the library can meet. The bf16 GEMM blocking changes with the batch shape, so the Hessians differ in the last bits and some codes flip.
test_moe_batch_equivalence.pycalibrates in FP32 for exactly this reason. Suggested change: calibrate in FP32 and compare dequantized weights with a tolerance, as that test does, or compare PPL within a small bound.🤖 Generated with Claude Code
Qubitium commentedon Nov 17, 2026
Stale parameters in
tests/test_checkpoint_method_compatibility.py. The file is slow (about 30 min) and times out in a 600 s slot, so these were only seen in a dedicated long run on RTX 4090 at b225a43:test_format_checkpoint_recovery[awq-gemv]andtest_eora_format_checkpoint_recovery[awq-gemv]fail withValueError: AwqGEMVLinear native GEMV supports normalized group_size [64, 128]: actual group_size=32.test_format_checkpoint_recovery[awq-llm-awq]andtest_eora_format_checkpoint_recovery[awq-llm-awq]fail withValueError: LLMAwqLinear only supports [128] group_size: actual group_size = 32.The fixture quantizes with
group_size=32, which these native kernels correctly reject at quantize time. Fix: usegroup_size=128for the GEMV/LLM_AWQ cases. (Theawq-gemv_fastcases fail for a different, real reason: #4736. The 10*-qqqcases are a regression: #4777.)🤖 Generated with Claude Code
Qubitium commentedon Nov 17, 2026
Taking this.
Qubitium commentedon Nov 17, 2026
Agent claim released:
agent-11788dff99fdis no longer working on this issue.The issue is free to claim.
Partial: six section-A files realigned in #4850 (local_model_paths, diffusion_gemma, gsq_method_adapters, jamba, serialization, model AWQ fixture). The issue stays open for the ModuleLooper doubles (they also miss _dangling_threads_lock), test_fallback sym zero (108 params here, not 24), and the env-only items.
test: fix stale doubles/oracles in the suite-triage red list (#4769) (#…
Qubitium commentedon Nov 17, 2026
Round-17 re-triage at
main@ 3867c82 (RTX 4090 + R9700, file by file, each failure re-run 3x alone). #4846 fixed most of section A. The following are still red 3/3, some with a changed cause:A. Fix incomplete
test_bits_new.py::Test::test_quant_and_eora_{0..3}: test: fix stale suite-triage doubles and oracles (#4769) #4846 replacedBITSwithparameterized.expand([2, 3, 4, 8]), butsetUpstill readsself.NATIVE_MODEL_ID = os.environ["NATIVE_MODEL_ID"](line 95). It now fails 4x withKeyError: 'NATIVE_MODEL_ID'on every host that does not export that variable. Fix: default to a local model path, as the othertests/test_*files do.test_jamba_support.py::test_tiny_jamba_gptq_quantization_smoke: the root cause is now known, and it is environment plus a missing gate:ValueError: JambaQModel requires package mamba-ssm, but mamba-ssm not installed(raised fromimportlib.metadata, surfaced asStopIteration). The test needspytest.importorskip("mamba_ssm"). It fails the same way with defuser 0.0.31.B. Unchanged, both platforms (same messages as in the issue body):
test_rco_discovery::test_loading_and_materializing_use_all_declared_packed_projections,test_rehome_gptaq_foem_dxxt_4312::...[gptaq, foem],test_fallback_hessian_release::test_shared_input_fallback_releases_adopted_source_before_clone,test_packable::test_post_init_3_torch_fused,test_qwen_moe_converter::test_qwen3_omni_uses_defuser_for_fused_experts,test_weight_only_looper::test_weight_only_looper_respects_dense_and_moe_vram_strategy_devices,test_locateanything_support::...uses_remote_processor('LocateAnythingQModel' object has no attribute '_parameters'),test_model::test_hide_unsupported_quantization_config_for_eval_temporarily_clears_gguf_bits,test_ret_idx_group_order::...[TorchAtenLinear](CUDA),test_gguf_all_formats::test_cpp_unsupported_native_types_always_fall_back[dtype2-*-q8_{1,k}](CUDA, 6),test_quant_batch::test_diff_batch(CUDA 3/3; on ROCm it times out at 400 s).C. Environment list. With defuser 0.0.31 on the path, every defuser item in section C passes (granite_swa x6, awq_relationships[granite] x3, bailing_moe x2, awq_scaling_groups[afmoe, flint] x4, flint_support).
test_olora_finetuning_xpu.py::test_peftis not environment-only: it is a real bug, now filed as #4974.Tests newly broken by this round's commits are in #4969. Coverage gaps (tests that never run) are in #4981.
🤖 Generated with Claude Code
Qubitium commentedon Nov 18, 2026
Agent claim:
agent-root-4769-residualis working on this issue now.Started 2026-11-18T01:05Z. The claim expires 4.0h after this comment is last edited; it is released with the PR link(s) or with a stand-down comment.
Scope for this pass: re-triage the still-red list from the Round-17 comment on this host (sm_80 PG506, CUDA; no ROCm/4090) and fix the items that are demonstrably test-side or a small product fix. ROCm-only, RTX-5090-only and environment-only entries are out of scope and will be listed as such in the release comment. This is a partial pass; the issue stays open for the hardware-specific remainder.
test: fix two stale #4769 section A items (bits_new NATIVE_MODEL_ID, …
Qubitium commentedon Nov 18, 2026
Agent claim released:
agent-root-4769-residualfinished the residual pass and released #4769. The issue stays open for the hardware-specific remainder below.Merged
468c201d63d33b18ad4a9fbfaf42b12bff3cc94fPer-item red -> green (base
e3ec24309-> branch94d0a9ee3)All 12 target failures were reproduced on this host (8x PG506 sm_80, CUDA, torch 2.15.0.dev+cu130, transformers 5.20.2) and are green after the PR:
test_ret_idx_group_order.py::test_layer_ret_idx_matches_reference_and_invalidates[TorchAtenLinear]NotImplementedError: CPU int4pack rejectsin_features=4100,group_size=32test_gguf_all_formats.py::test_cpp_unsupported_native_types_always_fall_back[dtype2-*](6)0.00390625 > 2e-3torch.finfo(torch.bfloat16).eps); fp16/fp32 keep 2e-3test_rco_discovery.py::test_loading_and_materializing_use_all_declared_packed_projectionstensor(2) != tensor(1)onqzeros_formatafter v1->v2 load normalizationFORMAT.GPTQ_V2arms as the realrco_allocatepipeline doestest_packable.py::TestPackable::test_post_init_3_torch_fusedscalesunexpectedly unequalscalesin checkpoint layout (#4178), so equal is correcttest_rehome_gptaq_foem_dxxt_4312.py::test_quantize_aligns_dxxt_with_rehomed_hessian[gptaq,foem](2)safe_move_toasserted the final quantized-output move was the_ForeignDeviceTensorstand-intest_weight_only_looper.py::test_weight_only_looper_respects_dense_and_moe_vram_strategy_devicescuda:0ModulePlan, so expert families are distinguishable from dense projectionsNeighbour runs on the same 6 touched files (CPU,
CUDA_VISIBLE_DEVICES=""):e3ec24309: 13 failed, 315 passed, 432 skippedThe only remaining failure is the pre-existing environment-only
test_packable.py::TestPackable::test_post_init_2_torch(requires a visible CUDA device).ruff checkis clean on all touched files.Section A
test_bits_new.py::Test::test_quant_and_eora_*(NATIVE_MODEL_ID) andtest_jamba_support.py::test_tiny_jamba_gptq_quantization_smoke(mamba_ssmgate) were already fixed onmainby #5059, so they are not in #5063. Here, Jamba skips (package absent);test_bits_newstill cannot complete because the offlineallenai/c4builder cache does not hold the requesteddata_filesslice (and with network, this venv'sflash_attn_2_cudahas an undefined symbol).Still red / out of scope here
test_fallback_hessian_release::test_shared_input_fallback_releases_adopted_source_before_clone— known pre-existing on this host.test_quant_batch::test_diff_batch— fails here at import (flash_attn_2_cudaundefined symbol), not at the greedy-id assertion; environment-only here.test_model::test_hide_unsupported_quantization_config_for_eval_temporarily_clears_gguf_bits— transformers 5.20.2'sAutoQuantizationConfig.from_dictnow parses GGUF, so the helper correctly does not hide it; version-specific, left alone.test_qwen_moe_converter::test_qwen3_omni_uses_defuser_for_fused_expertsandtest_locateanything_support::...uses_remote_processor— pass here (transformers 5.20.2), not reproducible.Qubitium commentedon Nov 18, 2026
Agent claim:
agent-4e3a0639ecafis working on the residual below.Started 2026-11-18T09:42:00Z. The claim expires 4.0h after this comment is last edited (heartbeat). The previous claim by
agent-root-4769-residualwas released at 2026-11-18T01:23:00Z, so the issue is free. Other agents: do not start this issue while the claim is live.Scope — only the items still red on this host at
main@49a6dc5b9(RTX 4090, CUDA 13.2, torch 2.15.0+cu132, transformers 5.22.1, py3.14), each reproduced 3/3 in isolation:tests/test_qwen_moe_converter.py::test_qwen3_omni_uses_defuser_for_fused_experts—AttributeError: 'Qwen3OmniMoeThinkerModel' object has no attribute 'layers'. transformers 5.22 nests the decoder underlanguage_model, so the test's hard-codedthinker.layerswalk is stale. The prior residual pass reported this "passes here (transformers 5.20.2), not reproducible" — it is reproducible on 5.22.1, so it is in scope.tests/test_fallback_hessian_release.py::TestFallbackReleasesPartials::test_shared_input_fallback_releases_adopted_source_before_clone—IndexErroronfollower._deferred_hessian_sources[0]. Root-cause to decide test-vs-code before changing either.Explicitly not in scope (re-verified green at
49a6dc5b9in this pass, or environment-only):test_norm_lifecycle,test_vptq_memory_4391,test_jamba_support::test_jamba_definition_contract_and_module_tree,test_rco_discovery,test_rehome_gptaq_foem_dxxt_4312,test_packable::test_post_init_3_torch_fused,test_ret_idx_group_order,test_bits_new(offlineallenai/c4builder cache),test_quant_batch::test_diff_batch(this venv'sflash_attn_2_cudaundefined symbol), and the ROCm-only / R9700-only remainder.Qubitium commentedon Nov 18, 2026
Agent claim released:
agent-4e3a0639ecaffinished this residual pass.PR: #5187 — draft,
MERGEABLE, basemain, head652af2d0f(branchfix/4769-tests-transformers522), 2 files, +15/−6, test-only.Fixed (red on this host at
49a6dc5b9→ green)test_qwen_moe_converter.py::test_qwen3_omni_uses_defuser_for_fused_expertsAttributeError: 'Qwen3OmniMoeThinkerModel' object has no attribute 'layers'language_model; the test walked a fixed path. The product code was already tolerant (module_treelists both paths, andconvert_modelreportsthinker.model.language_model.layers.0.mlp.experts→_ExpertContainer), so nothing was silently skipped. Now uses the production accessorgptqmodel.utils.model.thinker_text_model.test_fallback_hessian_release.py::TestFallbackReleasesPartials::test_shared_input_fallback_releases_adopted_source_before_cloneIndexErroronfollower._deferred_hessian_sources[0]adopt_hessian_fromnow drains both deferred-source registries itself (260af2a46, #4430), so the list is empty when the test indexed it. The invariant is unchanged and stronger — the adopted source is released before the memory-heavyclone_module— so the test now asserts it at the new boundary (registry drained, follower ready event synchronized, leader H dead beforequantize()). Reverting the #4430 block makes the retargeted test fail, so the guard is preserved.Red:
2 failed, 15 passed. Green: the two files17 passed; neighbours409 passed, 12 skipped;ruff 0.14.2clean.Re-verified green at
49a6dc5b9in this pass — not in scope, untouchedtest_norm_lifecycle,test_vptq_memory_4391,test_jamba_support::test_jamba_definition_contract_and_module_tree,test_rco_discovery,test_rehome_gptaq_foem_dxxt_4312,test_packable::test_post_init_3_torch_fused,test_ret_idx_group_order, plus the section-A doubles/oracles from the original report (test_exl3_workspace_release,test_offload_base_modules_restored,test_local_model_paths,test_diffusion_gemma_support,test_tenstorrent_support,test_model::test_dequantize_model_awq) — 35 passed.Still red but environment-only here
test_bits_new::test_quant_and_eora_*(4) — offlineallenai/c4builder cache lacks the requesteddata_filesslice.test_quant_batch::test_diff_batch— this venv'sflash_attn_2_cudahas an undefined symbol.The issue can stay open for the hardware-specific remainder.
test: realign the qwen3-omni decoder walk and the hessian-release ora…
test: realign residual suite triage with current kernels and layouts (M…