Skip to content

[Benchmark][SM70] Audit GLM reasoning completion - #402

Merged
yangzhuxinyzx merged 1 commit into
mainfrom
codex/v100-glm53-quality-audit-20260828-112610
Sep 5, 2026
Merged

yangzhuxinyzx merged 1 commit into
mainfrom
codex/v100-glm53-quality-audit-20260828-112610

Conversation

@yangzhuxinyzx

Copy link
Copy Markdown
Contributor

Purpose

Make the SM70 quality/speed matrix understand GLM-5.3's real chat-template control and reject outputs that exhaust their budget inside reasoning without a visible final answer. Record the stabilized TP4/PP2 decode, prefill, KV-capacity, and task-level quality evidence.

Base SHA: 62ad1e02693f4c857f3b7547cef1860ee54e8053
Head SHA: 70f1d4fb3c

Why This Is Not A Duplicate

An open-PR search for quality-audit, reasoning-effort, and GLM matrix work returned no match. Runtime PRs #392 and #396 provide the exact KDA kernel; this PR changes only the audit harness, focused tests, and retained acceptance record.

Implementation

  • Add --reasoning-effort={low,high,max} and preserve it through tokenizer fallbacks and matrix worker subprocesses.
  • Record rendered chat-prompt hashes, reasoning closure, and visible-final-answer length.
  • Fail closed on unclosed reasoning or an empty final answer. Allow a short output only when it naturally stops.
  • Add six focused tests for template forwarding/fallback and output-completion gates.
  • Record exact speed/quality artifacts and the production reasoning-mode caveat.

Test Plan And Result

  • pytest -q --confcutdir=tests/benchmarks tests/benchmarks/test_sm70_quality_speed_matrix.py: 6 passed.
  • Ruff 0.14 check and format: pass.
  • Typos and markdownlint pre-commit hooks: pass.
  • Python compileall, CLI help smoke, and git diff --check: pass.
  • Real GLM tokenizer render check: enable_thinking=true/false are identical Max prompts; reasoning_effort=low/high/max renders the intended mode.

Retained GPU Evidence

Contract: GLM-5.3-Flash-NVFP4, modelopt NVFP4 MoE plus FP16 non-expert weights, FP8 E4M3 KV, TP4/PP2 on eight V100 32GB, B1, no MTP, 1K input / 256 output, full decode CUDA Graph.

  • Stable decode: 53.013085 / 53.018516 / 53.017527 token/s; mean 53.016376 token/s, mean TPOT 18.862097 ms.
  • 1K prefill: 3.845156 / 3.851318 / 3.850663 s; mean 3.849045 s or 266.039984 token/s.
  • KV: 2.94 GiB available on the limiting worker, 255,122 cache tokens, 62.29x at 4,096 tokens.
  • Official Max reasoning: six of eight tasks pass by 4,096 output tokens; two code tasks remain inside unclosed reasoning.
  • Low reasoning rerun: both targeted code tasks stop and pass AST plus external execution tests (2/2).
  • Exact KDA on/off sequences and real-weight operator comparisons remain exact; no tested fast-path or FP8-KV corruption was observed.

Artifacts: /data/minimax-h3/task-cache/glm53-nvfp4-sm70-20260827/.

Risk

This does not claim unconditional default-Max model quality: production must pass reasoning_effort=low for concise code/structured work or allocate a sufficiently large Max reasoning budget. No runtime CUDA, model, attention, quantization, or KV-cache source is changed by this PR.

AI Assistance

AI assistance was used to implement and test this change. The human submitter must review every changed line and be able to defend the result before promotion from Draft.

Assisted-by: OpenAI Codex
Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
@yangzhuxinyzx

Copy link
Copy Markdown
Contributor Author

最新 main 审计发现空输出漏洞:_quality_metrics("", [], finish_reason="stop") 返回 passed=True。维护者修复 #499 保留本 PR 的 reasoning-effort 与历史质量证据,新增空字符串/纯空白回归,并按已确定的产品标准将 greedy token identity 留作诊断而非质量硬门槛。8 项测试和修改文件 pre-commit 已通过,待最终 CI 后合入。

@yangzhuxinyzx
yangzhuxinyzx merged commit 40a1e67 into main Sep 5, 2026
4 checks passed
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