Repository navigation
[Benchmark] validate Ascend MoE and compensate S2 rounding - #3582
Closed
zhachar14h-cell wants to merge 3 commits into
Closed
zhachar14h-cell wants to merge 3 commits into
zhachar14h-cell wants to merge 3 commits into
Conversation
Add an opt-in compensated product/sum path, retain failed candidates, and validate all 512 real experts on A3 in three fresh processes. Keep the default projection binary byte-identical and return failure status for completed MoE collections with numerical failures.
Author
|
@Niko1221 Could you approve the pending CI runs when you have a moment? The PR includes A3 real-weight MoE validation, a same-day baseline, and an opt-in accuracy fix with unchanged defaults. Feedback on whether this standalone benchmark scope fits the project would also be appreciated. Thanks! |
Owner
|
Thank you for the benchmark. The results are saved in our benchmark records, so I'm closing this pull request without merging it. |
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.
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.