Repository navigation
test(models): fix silently-skipping tests, auto eval batch OOM, refresh Qwen2.5 slow baselines (#4398) - #4445
Merged
Merged
Conversation
Refs #4398. - test_internlm2_5 now gates on the model definition's transformers pin via check_versions, so the skip reason names the installed and required versions and the test runs automatically once the pin is lifted. - test_llama3_2_gptq_cuda opts in through registered pytest markers (gptq_cuda_e2e / gptq_cuda_eval_only) instead of environment variables. - tests/eval.py resolves batch_size="auto" from available VRAM and the checkpoint config (logits, KV cache, activations), capped at 16, and the OOM retry halves the attempted batch instead of jumping to 8. Adds unit coverage for the chooser and the evaluate() wiring. - Refresh Qwen2.5-0.5B-Instruct slow-mode baselines from a measured Marlin run on the public model revision; acceptance thresholds are unchanged.
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
The remaining findings of #4398 (items 1-2 shipped in #4433):
test_internlm2_5always skipped on transformers > 4.44.2 with an opaque reason, andtest_llama3_2_gptq_cudawas gated byGPTQMODEL_RUN_LLAMA3_2_GPTQ_CUDA_E2E(an env-var switch, banned by AGENTS.md).batch_size="auto"picked 384-768 on a 32 GiB card and OOM'd, then retried at 8 in nearly every test (granitemoe_swa 12.8 min).Addresses items 3-5 of #4398.
What Changed
tests/eval.py:resolve_eval_batch_size()derives a conservativeautobatch from free/total VRAM and the checkpoint config (fp32 logits + KV cache + activations), spends 25% of available memory, caps at 16, and falls back to the known-safe 8.tests/models/model_test.pyresolves it before eval and, on OOM, halves the attempted batch instead of jumping to 8 (which could increase it).tests/conftest.py,tests/pytest.ini: registeredgptq_cuda_e2e/gptq_cuda_eval_onlyopt-in markers; the default skip message names the marker.tests/models/test_llama3_2_gptq_cuda.pyno longer reads environment variables.tests/models/test_internlm2_5.py: gate through the definition'srequire_pkgs(check_versions), so the skip reason names installed vs required versions and the test runs automatically once the pin is lifted.tests/models/test_qwen2_5.py: refresh slow-mode baselines from a measured Marlin run;floor_pct/ceil_pctthresholds are unchanged.tests/test_eval_batch_size.py(chooser +evaluate()wiring).Tests
Qwen2.5-0.5B-Instruct slow-mode re-measurement (
Qwen/Qwen2.5-0.5B-Instructrevision7ae557604adf67be50417f59c2c2f167def9a775, Marlin, NVIDIA GB10): gsm8k_platinum_cot 0.35814722911497104, arc acc 0.2901023890784983, arc acc_norm 0.31399317406143346, mmlu_stem 0.39930225182366. A second evaluation of the saved checkpoint reproduced gsm8k exactly and the evaluation half passed all four updated baselines at 100.00%. The new chooser resolves Qwen2.5-0.5B on a 32 GiB card to 8 (previously 384-768).Pre-existing failure
tests/test_model.py::test_hide_unsupported_quantization_config_for_eval_temporarily_clears_gguf_bitsreproduces identically on pristine main.Not executed: the full slow-mode pytest pass (the redundant native-fallback pass was stopped after collecting the quantized metrics; the evaluation half was verified directly from the saved checkpoint) and the opt-in Llama-3.2-1B CUDA E2E quantization (marker selection/skip behavior verified).
Logic Flow Documentation
Not applicable — test-harness selection and thresholds only; the new
resolve_eval_batch_size()decision is documented in its docstring and pinned by unit tests.Review Requirements