mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3582] [Benchmark] validate Ascend MoE and compensate S2 rounding #4698
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4698
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/3582
Author: @zhachar14h-cell
Created: 10/21/2026
Status: 🔄 Open
Base:
main← Head:codex/ascend-a2-s2-prototype📝 Commits (3)
e1e5381[Benchmark] add isolated Ascend 910B3 S2 decode and projection probes9a07eb5[Benchmark] validate unchanged S2 probes on Ascend A30d5287cbench: validate real-weight Ascend MoE and compensate S2 rounding📊 Changes
135 files changed (+15977 additions, -0 deletions)
View changed files
➕
bench/ascend_a2_s2/CMakeLists.txt(+21 -0)➕
bench/ascend_a2_s2/README.md(+71 -0)➕
bench/ascend_a2_s2/RESULTS.md(+100 -0)➕
bench/ascend_a2_s2/a3/RESULTS.md(+175 -0)➕
bench/ascend_a2_s2/a3/evidence/EVIDENCE_MANIFEST.json(+29 -0)➕
bench/ascend_a2_s2/a3/evidence/SOURCE_MANIFEST.a3.json(+21 -0)➕
bench/ascend_a2_s2/a3/evidence/SUMMARY.json(+407 -0)➕
bench/ascend_a2_s2/a3/evidence/build-settings.a3.json(+18 -0)➕
bench/ascend_a2_s2/a3/evidence/decode-build.log(+174 -0)➕
bench/ascend_a2_s2/a3/evidence/decode-configure.log(+9 -0)➕
bench/ascend_a2_s2/a3/evidence/decode-run-1.json(+176 -0)➕
bench/ascend_a2_s2/a3/evidence/decode-run-1.log(+16 -0)➕
bench/ascend_a2_s2/a3/evidence/decode-run-2.json(+176 -0)➕
bench/ascend_a2_s2/a3/evidence/decode-run-2.log(+16 -0)➕
bench/ascend_a2_s2/a3/evidence/decode-run-3.json(+176 -0)➕
bench/ascend_a2_s2/a3/evidence/decode-run-3.log(+16 -0)➕
bench/ascend_a2_s2/a3/evidence/host-facts.a3.json(+38 -0)➕
bench/ascend_a2_s2/a3/evidence/npu-smi-after.txt(+17 -0)➕
bench/ascend_a2_s2/a3/evidence/npu-smi-before.txt(+17 -0)➕
bench/ascend_a2_s2/a3/evidence/projection-build.log(+171 -0)...and 80 more files
📄 Description
Problem and result
The isolated Ascend S2 prototype passed individual projection bounds but failed a real-weight expert chain: FP32 rounding moved an intermediate value across an INT8 half-integer boundary. Expert 423 exceeded the predeclared RMS limit in every baseline run. An opt-in compensated product/sum path now passes all 512 experts in three fresh A3 processes, using the same weights, input hashes and error limits. Its RMS error for expert 423 falls from
7.467131e-4to7.509644e-8.This extends the existing A2/A3 projection benchmark with a complete layer-zero MoE harness: router/top-10, routed gate/up/SwiGLU/down, gated shared expert and weighted output. Weights are the installer's pinned Q2_0 GGUF; inputs are synthetic hidden states. It does not add an inference backend.
Approach
STRATA_S2_COMPENSATED=ONretains product and addition low parts using Dekker splitting and TwoSum. The FP16-derived weight scale times each exact integer chunk dot is exactly representable in FP32. CANN'sascendc_compile_*interface passes the macro and non-reassociation/non-contraction settings to the device compiler. OFF remains the default. Its rebuilt A3 library is byte-identical to the original (e49fd7ae…cf86b9). The MoE collector also returns exit 1 after saving a numerical failure, instead of printing FAIL and returning 0.The independent oracle uses existing Strata C++ weight decoders and FP64 computation. Each native projection is additionally checked with its actual quantized input. All eight tensor hashes match independent Hugging Face origin and pinned ModelScope reads. Weight binaries are not committed.
Validation
Measured on A3 /
Ascend910_9362, CANN 9.0.0, driver 25.5.5, aarch64 Ubuntu 20.04.5; Python 3.11.4, torch 2.7.1+cpu, torch_npu 2.7.1.post4, NumPy 1.26.4; HF32 disabled; logical NPU zero only. Final fix measured on 2026-10-22.Passed:
1.279868e-7; maximum complete-layer RMS:2.161990e-6. Limits remain max normalized1e-3, RMS5e-4.1and-2^-22exactly with ON.git diff --check.Exact commands, source and binary hashes, raw reports and comparisons: real-weight MoE report, final summary, build/commands/evidence manifest. Earlier A2 projection and A3 report retain their original scope and dates. The upstream reference is
9de04cd44e927a9a3df6bbc0e94fc1be8b844ba4; these are isolated prototype measurements, not a run of the latest engine.Failed, retained:
passed: false. The initial exact-scale precheck failed at one ULP; failed transfers and earlier A2 prototype failures also remain documented. No thresholds were relaxed for the fix.Not run / limits:
ON performance or A2 execution; arbitrary/subnormal/overflow inputs outside the documented compensation assumptions; original BF16 model weights; prompt activations; other layers; attention/GDN/QSA/cache/residual integration; default AVX/shared-activation parity; full inference/token generation; vision, HCCL or the second chip. Shared mixed-format weights are host-decoded then run with FP32 NPU operations; expert dispatch is a host loop. No model-quality or throughput claim. CUDA/HIP/SYCL/Metal and production engine, installer and root build files are untouched; their binaries were not rebuilt. The full 37.6 GB shard was not downloaded or independently hashed.
Scope
This updates the existing standalone benchmark PR. Initial open/closed searches found no matching Ascend/910B thread. No default or production backend change is requested; a full backend would need separate scope agreement. AI assistance was used for implementation, investigation and reporting.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.