Conversation
Gate the native operator to the existing Qwen3.8 TP4 E512 M1 contract, retaining default-off behavior and neighboring routes. Document numerical attribution, observed quality changes, and incomplete production acceptance. Assisted-by: OpenAI Codex <noreply@openai.com> Signed-off-by: Leonccaa <166551845+Leonccaa@users.noreply.github.com>
Evaluate both AWQ arithmetic paths against an independent fixed-weight reference; distinguish existing quantization error, local arithmetic bounds, and task-level quality. Assisted-by: OpenAI Codex <noreply@openai.com> Signed-off-by: Leonccaa <166551845+Leonccaa@users.noreply.github.com>
This was referenced Sep 6, 2026
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.
Purpose and stack
Layer 2/3, based on
perf/sm70-awq-qpn-kernel-20260905: connect the nativeoperator to a narrow, default-off AWQ runtime path. The third layer is an
independent cooperative 3-byte metadata load optimization.
Review order: #8 (prerequisite) -> #10 (kernel) -> #12 (runtime) -> #11 (3B loads).
VLLM_SM70_AWQ_QWEN38_QPN_M1, default0, accepting only0/1.W13 interleaving and legacy M1 compact admission. Explicit unsupported
layer or missing native build fails closed.
(1,2560), INT32(1,10)IDs and FP32router weights select QPN. Other/padded batch shapes keep existing routes.
loading, compilation at startup, new persistent weight copy, graph policy,
prefill/grouped decode, router, shared expert or attention change.
0before restarting the engine. Changing anenvironment variable cannot replace already captured CUDA graphs.
Open-PR checks found no duplicate native AWQ QPN runtime proposal. Fork #8 is
the separate grouped M=2..8 prerequisite, 1Cat 1CatAI#509 is startup cache release,
and merged 1CatAI#477 supplies common compilation behavior; none implements this
M1 expert operator. The QSA page4 fix is a separately tracked validation
dependency, not part of this diff. The stack is based on fork #8 (
fbaa195f47)above main
755baae1d075; no unrelated upstream changes are packaged here.Numerical acceptance: controlled additional perturbation
Both paths already approximate the same fixed AWQ-weight computation. Neither
is ground truth. Evaluate each against the same independently decoded-weight /
FP64 reference, and distinguish existing quantization error from this change's
additional arithmetic perturbation. Passing local error bounds does not mean
identical noise or prove whole-model task-quality non-inferiority.
The initial cross-process 65-case pair had one IFEval pass-to-fail change
(4/5 to 3/5). Its unchanged C4 controls also differed, so it did not isolate
QPN as the cause. That failed comparison remains recorded. A later same-runtime
pair produced the following small-sample scores:
47/65 token streams were exact. One GSM regression and one IFEval improvement
remain; they do not cancel into a zero-regression result. Original answer
budgets, EOS behavior and scoring were retained.
Focused attribution then froze the process, M1 graph, target shapes and GEMM
LUTs. Both local MoE operators executed on identical local inputs/routes;
a device boolean selected the output. OFF/ON/ON/OFF C4 controls and same-arm
C1 repeats were exact. The diagnostic's overhead is not performance data.
samples at three fixed prefixes. Both implementations' W13/W2 remain
within the retained bounds; QPN maximum bound fractions 0.173925/0.966499,
legacy 0.173925/0.954273. Legacy W2 is checked using its own intermediate.
tie at21.59375, whereas QPN favors16526 at21.625 over4003 at21.578125.
Legacy also reproduced the previous QPN failed trajectory at the unchanged
256-token budget. This failure is not exclusive to the new kernel.
respect each arm's actual router scores. The first change reverses a
0.01171875 score margin, supporting internal routing amplification.
5.052734 remains evidence. A GSM maximum 2.59375 occurs away from its first
token flip and that step lacks a local FP64 capture. These are not all
described as a few ULPs or as fully reconstructed historical trajectories.
topk(2)index as greedy argmax, which iswrong at ties. Corrected to
argmaxand reanalyzed unchanged raw tensors:the earlier same-runtime pair's flip is IFEval index80 entering a tie,
not the previously reported short-prompt tie-order artifact. Quality
scores and raw-logit maxima were unaffected; 25 tool CPU tests pass.
Current evidence supports numerical trajectory variation, without a
demonstrated systematic kernel defect on tested inputs. It does not establish
broad quality non-inferiority or production readiness. We do not rewrite the
kernel solely to reproduce a historical sampled answer; quality remains a
separate acceptance question. Full details are in the design document.
Full-model performance snapshot
Four V100s, TP4/MTP0, FP16 activations and KV, native-g32 AWQ, 4-byte
metadata, frozen prompts, prefix cache off, max batched tokens8192,
ignore_eos=false/min_tokens=0, maximum320 output tokens. Each cell/arm wasscored once. Both arms use the same separate QSA page4 fix and grouped-decode
baseline. Aggregate pure-decode, excluding prefill/mixed phases:
C1 is +17.99% in this pair and about2.04% below the separate same-day NVFP4
reference60.2609. No claim of exact/statistical parity, C8x64K performance,
or E2E equivalence. The independent older54.6544 baseline and +25% target
68.3180 remain unchanged and unachieved. These 4-byte results do not measure
the layer3 cooperative 3-byte optimization.
Tests and provenance
69 passed, run using the canonical repository venv from this worktree.
Changed-file pre-commit hooks (including mypy) and
git diff --check: passed.An expanded CPU invocation including unchanged fallback and prefill-exact
modules was 78 passed, 9 teardown errors: their global cleanup calls
torch.accelerator.empty_cache()on a no-accelerator host. This invocationis not all-green; those fixtures and product cleanup are unchanged, and no
unrelated cleanup patch is included.
The final four Python runtime files are SHA-256 identical to the native-r2
GPU-validated snapshot. Native core:
e5083c1f26392873460c4a798244f454c6adef4acb66cc7d6573d4da8f8916e1.Full-model evidence uses the unchanged 4-byte kernel shared with layer1;
scalar/cooperative builds also have separate portable and real-weight GPU gates.
Evidence IDs under
qwen38-c1-qpn-awq-20260905:native-model-{0,1}-r1,same-runtime-numerics-r2,same-runtime-focused-r1.No new GPU timing was collected during this documentation/stack extraction.
AI assistance: OpenAI Codex assisted with implementation, analysis, tests and
documentation. Leon directed scope and requested submission to this fork.
Draft for human review: human line-by-line review is not claimed complete.
No upstream submission, production deployment, default enablement or claim of
completed broad quality acceptance is made here.