Skip to content

[TEST] Suite triage at b225a4383 (RTX 4090 + R9700): pre-existing red tests (also red at 12c1273c2) — stale doubles/oracles/expectations, plus env-only failures #4769

Closed

Description

@Qubitium

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)

C. Environment only (not a bug; listed so they are not re-triaged)

  • defuser 0.0.28 installed vs defuser>=0.0.31 required: 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 set GPTQMODEL_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_moe and test_parameter_count (ROCm) are model-sized and were not re-run.

🤖 Generated with Claude Code

Activity

  1. Qubitium commented on Nov 17, 2026

    @Qubitium
    CollaboratorAuthor

    One more pre-existing failure, confirmed after this issue was filed:

    • tests/test_quant_batch.py::TestQuantBatch::test_diff_batch on RTX 4090 fails 3/3 when re-run alone, and also fails at 12c1273. It quantizes TinyLlama-1.1B with batch_size=1 and with batch_size=256, then asserts that the greedy generate ids are identical.

      tests/test_quant_batch.py:97  self.assertTrue((batch_1_ids == batch_n_ids).all().item())   AssertionError: False is not true
      

      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.py calibrates 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

  2. Qubitium commented on Nov 17, 2026

    @Qubitium
    CollaboratorAuthor

    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] and test_eora_format_checkpoint_recovery[awq-gemv] fail with ValueError: AwqGEMVLinear native GEMV supports normalized group_size [64, 128]: actual group_size=32.
    • test_format_checkpoint_recovery[awq-llm-awq] and test_eora_format_checkpoint_recovery[awq-llm-awq] fail with ValueError: 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: use group_size=128 for the GEMV/LLM_AWQ cases. (The awq-gemv_fast cases fail for a different, real reason: #4736. The 10 *-qqq cases are a regression: #4777.)

    🤖 Generated with Claude Code

  3. Qubitium commented on Nov 17, 2026

    @Qubitium
    CollaboratorAuthor

    Taking this.

  4. Qubitium commented on Nov 17, 2026

    @Qubitium
    CollaboratorAuthor

    Agent claim released: agent-11788dff99fd is 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.

  5. Qubitium commented on Nov 17, 2026

    @Qubitium
    CollaboratorAuthor

    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 replaced BITS with parameterized.expand([2, 3, 4, 8]), but setUp still reads self.NATIVE_MODEL_ID = os.environ["NATIVE_MODEL_ID"] (line 95). It now fails 4x with KeyError: 'NATIVE_MODEL_ID' on every host that does not export that variable. Fix: default to a local model path, as the other tests/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 from importlib.metadata, surfaced as StopIteration). The test needs pytest.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_peft is 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

  6. Qubitium commented on Nov 18, 2026

    @Qubitium
    CollaboratorAuthor

    Agent claim: agent-root-4769-residual is 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.

  7. added a commit that references this issue on Nov 18, 2026
  8. Qubitium commented on Nov 18, 2026

    @Qubitium
    CollaboratorAuthor

    Agent claim released: agent-root-4769-residual finished the residual pass and released #4769. The issue stays open for the hardware-specific remainder below.

    Merged

    Per-item red -> green (base e3ec24309 -> branch 94d0a9ee3)

    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:

    node red on base green on branch
    test_ret_idx_group_order.py::test_layer_ret_idx_matches_reference_and_invalidates[TorchAtenLinear] NotImplementedError: CPU int4pack rejects in_features=4100, group_size=32 4096-wide shape accepted by both fused kernels; remainder layouts still covered by the builder test
    test_gguf_all_formats.py::test_cpp_unsupported_native_types_always_fall_back[dtype2-*] (6) bf16 diff 0.00390625 > 2e-3 one bf16 dtype ULP (torch.finfo(torch.bfloat16).eps); fp16/fp32 keep 2e-3
    test_rco_discovery.py::test_loading_and_materializing_use_all_declared_packed_projections tensor(2) != tensor(1) on qzeros_format after v1->v2 load normalization stage FORMAT.GPTQ_V2 arms as the real rco_allocate pipeline does
    test_packable.py::TestPackable::test_post_init_3_torch_fused scales unexpectedly unequal CPU int4pack keeps scales in checkpoint layout (#4178), so equal is correct
    test_rehome_gptaq_foem_dxxt_4312.py::test_quantize_aligns_dxxt_with_rehomed_hessian[gptaq,foem] (2) fake safe_move_to asserted the final quantized-output move was the _ForeignDeviceTensor stand-in ignore only that unrelated move; H/dXXT/module_copy companion moves are still asserted exactly
    test_weight_only_looper.py::test_weight_only_looper_respects_dense_and_moe_vram_strategy_devices expert families landed on cuda:0 fake wrapper exposes the model definition's ModulePlan, so expert families are distinguishable from dense projections

    Neighbour runs on the same 6 touched files (CPU, CUDA_VISIBLE_DEVICES=""):

    • base e3ec24309: 13 failed, 315 passed, 432 skipped
    • branch: 1 failed, 327 passed, 432 skipped

    The only remaining failure is the pre-existing environment-only test_packable.py::TestPackable::test_post_init_2_torch (requires a visible CUDA device). ruff check is clean on all touched files.

    Section A

    test_bits_new.py::Test::test_quant_and_eora_* (NATIVE_MODEL_ID) and test_jamba_support.py::test_tiny_jamba_gptq_quantization_smoke (mamba_ssm gate) were already fixed on main by #5059, so they are not in #5063. Here, Jamba skips (package absent); test_bits_new still cannot complete because the offline allenai/c4 builder cache does not hold the requested data_files slice (and with network, this venv's flash_attn_2_cuda has 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_cuda undefined 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's AutoQuantizationConfig.from_dict now 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_experts and test_locateanything_support::...uses_remote_processor — pass here (transformers 5.20.2), not reproducible.
    • ROCm-only, RTX-4090/5090-only, defuser-version-only, missing-package, GPU-contention OOM, and the remaining section-B hardware-specific items are untouched.
  9. Qubitium commented on Nov 18, 2026

    @Qubitium
    CollaboratorAuthor

    Agent claim: agent-4e3a0639ecaf is 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-residual was 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:

    1. 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 under language_model, so the test's hard-coded thinker.layers walk 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.
    2. tests/test_fallback_hessian_release.py::TestFallbackReleasesPartials::test_shared_input_fallback_releases_adopted_source_before_clone — IndexError on follower._deferred_hessian_sources[0]. Root-cause to decide test-vs-code before changing either.

    Explicitly not in scope (re-verified green at 49a6dc5b9 in 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 (offline allenai/c4 builder cache), test_quant_batch::test_diff_batch (this venv's flash_attn_2_cuda undefined symbol), and the ROCm-only / R9700-only remainder.

  10. Qubitium commented on Nov 18, 2026

    @Qubitium
    CollaboratorAuthor

    Agent claim released: agent-4e3a0639ecaf finished this residual pass.

    PR: #5187 — draft, MERGEABLE, base main, head 652af2d0f (branch fix/4769-tests-transformers522), 2 files, +15/−6, test-only.

    Fixed (red on this host at 49a6dc5b9 → green)

    node red cause
    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 thinker decoder under language_model; the test walked a fixed path. The product code was already tolerant (module_tree lists both paths, and convert_model reports thinker.model.language_model.layers.0.mlp.experts → _ExpertContainer), so nothing was silently skipped. Now uses the production accessor gptqmodel.utils.model.thinker_text_model.
    test_fallback_hessian_release.py::TestFallbackReleasesPartials::test_shared_input_fallback_releases_adopted_source_before_clone IndexError on follower._deferred_hessian_sources[0] adopt_hessian_from now 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-heavy clone_module — so the test now asserts it at the new boundary (registry drained, follower ready event synchronized, leader H dead before quantize()). Reverting the #4430 block makes the retargeted test fail, so the guard is preserved.

    Red: 2 failed, 15 passed. Green: the two files 17 passed; neighbours 409 passed, 12 skipped; ruff 0.14.2 clean.

    Re-verified green at 49a6dc5b9 in this pass — not in scope, untouched

    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, 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) — offline allenai/c4 builder cache lacks the requested data_files slice.
    • test_quant_batch::test_diff_batch — this venv's flash_attn_2_cuda has an undefined symbol.
    • ROCm / R9700-only, defuser-version-only and GPU-contention OOM items remain untouched.

    The issue can stay open for the hardware-specific remainder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions