Skip to content

test(models): run the large-model suite on a single GPU and fix what it finds - #6307

Merged
Qubitium merged 1 commit into
mainfrom
fix/models-gpu
Nov 29, 2026
Merged

Qubitium merged 1 commit into
mainfrom
fix/models-gpu

Conversation

@Qubitium

Copy link
Copy Markdown
Collaborator

Summary

Single-GPU sweep of the tests/models/ files that the CPU budget could not cover, plus the test-side fixes it found.

  • Host: one idle RTX 4090 (24 GB, SM 8.9), pinned with CUDA_VISIBLE_DEVICES=1; it appears as cuda:0 in-process. GPUs 2 and 3 were busy with other work and were never used. No device_map="auto" override was passed by the runner.
  • Candidates: 160 files reference a readable checkpoint under /monster/data/model/ and were not in the 20 files already green on CPU (test_opt.py, test_lfm2_vl.py, test_deepseek_vl.py, test_model_test_fast_mode.py, test_non_w4a_lifecycle.py, and 15 test_w4a_* files). test_inkling_mm_model.py was dropped because its checkpoint directory is unreadable.
  • Executed: 37 of the 160, each with a hard 240 s timeout (two lanes). The bottleneck is the fixed Evalution cost (arc_challenge = 1,172 samples; mmlu_stem = 12,612), not quantization.
  • Result: 23 pass, 3 skip, 5 timeout, 6 fail. Of the 6 failures, 2 are fixed here and 1 more missing gate was found in a manual probe (test_llama3_2_swordfish.py); the remaining 4 are environmental (GB10 cgroup scope, transformers-5 tokenizer conversion).
  • Logs: /tmp/modelsgpu/<file>.log; raw outcomes: /tmp/modelsgpu/results.tsv.

Outcome inventory

# test file checkpoint result s note
1 test_act_group_aware.py 2.47 GB pass 93
2 test_admmq_real_model.py 0.99 GB timeout 240 ADMMQ multi-subset quantization exceeds the budget
3 test_bloom.py 2.24 GB pass 100
4 test_bloom_bias_torch_fused.py 2.24 GB timeout 240 custom full-dataset path; >240 s
5 test_codegen.py 4.13 GB pass 140
6 test_ernie4_5.py 0.72 GB pass 108
7 test_gemma3.py 2.00 GB pass 114
8 test_glm_asr.py 4.52 GB pass 76
9 test_glm_ocr.py 2.65 GB pass 125
10 test_gpt2.py 1.10 GB pass 30
11 test_gptbigcode.py 4.50 GB pass 59
12 test_granite.py 5.27 GB fail(1) 8 tokenizer conversion fails although sentencepiece/tiktoken are installed (checkpoint has only vocab.json + merges.txt); environmental, see below
13 test_granite_4_0_h_350m.py 0.68 GB timeout 240 eval includes mmlu_stem (12,612 samples) + arc
14 test_granite_swa.py 4.29 GB pass 135
15 test_internlm2_5.py 3.78 GB pass 146
16 test_internvl.py 1.88 GB fail(1) 90 stale monkeypatch target (auto.AutoConfig removed); fixed
17 test_internvl_chat.py 2.12 GB pass 105
18 test_k2_horizon.py 2.16 GB timeout 242 fast mode covers all 13 layers; timed out mid-quantization
19 test_lfm2.py 2.34 GB pass 146
20 test_llama3_2_fusion.py 1.03 GB pass 21 1 skipped: AWQ checkpoint absent
21 test_llama3_2_fusion_devices.py 1.03 GB pass 42
22 test_llama3_2_gsq_paper_w3.py 2.47 GB pass 6
23 test_llama3_2_gsq_staged.py 2.47 GB skip 6 gated behind GPTQMODEL_RUN_LLAMA3_2_GSQ_STAGED_E2E=1
24 test_llama3_2_lazy_turtle_memory.py 2.47 GB pass 19
25 test_llama3_2_macaq.py 2.47 GB pass 48
26 test_llama3_2_swordfish.py 2.47 GB skip 3 failed on SM 8.9 before the fix; fixed (now skips via swordfish_skip_reason())
27 test_llama3_2_w4a16_reference.py 2.47 GB fail(1) 7 requires the GB10 cgroup scope from run_w4a_gb10_safe.sh; environmental
28 test_llama3_2_w4a_nvfp4.py 2.47 GB fail(1) 7 requires the GB10 cgroup scope; environmental
29 test_llama3_2_w4afp8.py 2.47 GB fail(1) 7 requires the GB10 cgroup scope; environmental
30 test_multi_vs_single_gpu.py 2.47 GB skip 7 test skips itself (<2 CUDA devices)
31 test_ouro.py 2.87 GB timeout 243 >240 s in fast-mode quant + eval
32 test_qwen2_5.py 0.99 GB pass 186 arc + mmlu_stem + gsm8k eval
33 test_qwen2_vl.py 4.42 GB pass 128
34 test_qwen3_vl.py 4.26 GB pass 162
35 test_tinyllama.py 2.20 GB pass 108
36 test_yi.py 2.95 GB pass 105
37 test_zamba2.py 2.43 GB fail(1) 7 missing mamba_ssm/causal_conv1d import gate; fixed

Fixes (red → green)

1. test_internvl.py: stale monkeypatch target

gptqmodel.models.auto no longer re-exports AutoConfig; config loading moved to load_model_config in gptqmodel.utils.hf, which auto imports into its namespace.

  • Red: pytest models/test_internvl.py::test_internvl_model_type_selects_definition → 1 failed (AttributeError: module 'gptqmodel.models.auto' has no attribute 'AutoConfig'). The full file was 1 failed, 3 passed.
  • Fix: monkeypatch auto.load_model_config instead of auto.AutoConfig.from_pretrained.
  • Green: the same node → 1 passed; the other three nodes already passed and are untouched.

2. test_llama3_2_swordfish.py: missing Blackwell gate

The file only honoured the GPTQMODEL_SKIP_SWORDFISH_E2E env var. On this SM 8.9 host it failed with ValueError: Swordfish runtime unavailable. instead of skipping, although the repo already owns the capability gate.

  • Red: 1 failed in 43.55s (ValueError: Swordfish runtime unavailable).
  • Fix: apply tests.accelerator_gates.swordfish_skip_reason() at class level, matching tests/kernels/test_swordfish.py.
  • Green: 1 skipped in 3.17s — Swordfish requires Blackwell (sm100+); no visible device is supported (cuda:0=sm89).

3. test_zamba2.py / test_jamba.py: missing optional-dependency gates

Zamba2QModel.require_pkgs declares mamba_ssm>=2.3.1 and causal_conv1d>=1.2.0; JambaQModel.require_pkgs declares mamba-ssm. Neither test gated on the import, so the loader raised during model construction.

  • Red: models/test_zamba2.py → 1 failed in 3.69s (ValueError: Zamba2QModel requires version mamba_ssm>=2.3.1, but mamba_ssm not installed).
  • Fix: module-level pytest.importorskip(...) for the declared packages, matching test_axk2.py's pattern.
  • Green: 2 skipped in 2.93s with the two explicit reasons.

Failure classification

  • Real product bugs: none found in the 37 files. No product code was changed.
  • Stale test expectation: test_internvl.py (fixed above).
  • Missing gate: test_llama3_2_swordfish.py (Blackwell), test_zamba2.py + test_jamba.py (optional packages) — fixed above. test_multi_vs_single_gpu.py already skips itself with <2 devices.
  • Pre-existing / environmental: the three 1B W4A tests (test_llama3_2_w4a16_reference.py, test_llama3_2_w4a_nvfp4.py, test_llama3_2_w4afp8.py) raise from w4a_gb10_memory._require_limited_scope() because this host is not the GB10 memory-limited scope; that is the helper's documented contract, not a regression. test_granite.py cannot build its tokenizer under transformers 5.23 from the checkpoint's vocab.json + merges.txt (no tokenizer.json); both sentencepiece and tiktoken are installed, so this is a transformers/checkpoint-format issue outside this change.
  • Timeouts (5): test_granite_4_0_h_350m.py (mmlu_stem), test_k2_horizon.py (all 13 layers), test_bloom_bias_torch_fused.py (custom dataset), test_ouro.py, test_admmq_real_model.py — all exceed the 240 s/file ceiling in fast mode.

The four untouched-file failures were confirmed identical at 2d3261d (git diff 2d3261d HEAD -- <those files> is empty), so they are pre-existing on this host and not caused by this branch.

Not run

123 of the 160 candidates remain. The 240 s/file ceiling and the ~35 min wall-clock budget allowed 37 files; the remainder are dominated by:

  • 5 GB checkpoints (7B–1.3 TB; the 24 GB GPU cannot hold the larger ones at all),

  • suites with mmlu_stem/gsm8k_platinum_cot (12k+ fixed samples),
  • 30B–1.3TB MoE models (DeepSeek-V3.2, GLM-5.x, MiniMax-M2/M3, Qwen3-Next, Solar-Open).

The ordered candidate list and the checkpoint each file targets are in /tmp/modelsgpu_queue.json; per-file logs are in /tmp/modelsgpu/.

Validation

  • ruff check tests/models/test_internvl.py tests/models/test_llama3_2_swordfish.py tests/models/test_zamba2.py tests/models/test_jamba.py → All checks passed!
  • Fix re-runs are listed under each item above; no GPU was held by the runner when the branch was pushed.

…onkeypatch

- test_internvl: patch auto.load_model_config, which replaced the removed
  auto.AutoConfig re-export, so the model_type selection unit test runs again.
- test_llama3_2_swordfish: skip on hosts without a Blackwell device via the
  shared swordfish_skip_reason() gate instead of failing with
  "Swordfish runtime unavailable".
- test_zamba2/test_jamba: importorskip the mamba_ssm/causal_conv1d packages
  their definitions declare as required.
@Qubitium
Qubitium marked this pull request as ready for review November 29, 2026 08:04
@Qubitium
Qubitium merged commit 0efbfac into main Nov 29, 2026
6 checks passed
@Qubitium
Qubitium deleted the fix/models-gpu branch November 29, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant