mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3641] [Engine] opt-in qwen35moe F16 inference, validated on Sage-A1.5 #4729
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#4729
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/3641
Author: @acrogenesis
Created: 10/21/2026
Status: 🔄 Open
Base:
main← Head:acrogenesis/sage-f16📝 Commits (2)
6c1f1e2Add opt-in F16 weights to the qwen35moe enginef3f2136Keep opt-in Sage F16 decode fast at 256K context📊 Changes
32 files changed (+10145 additions, -70 deletions)
View changed files
📝
CMakeLists.txt(+16 -0)➕
bench/results/2026-10-21-sage-f16-rtx5090/README.md(+90 -0)➕
bench/results/2026-10-21-sage-f16-rtx5090/all-probes.csv(+58 -0)➕
bench/results/2026-10-21-sage-f16-rtx5090/cache-tuning.json(+338 -0)➕
bench/results/2026-10-21-sage-f16-rtx5090/check-default.py(+50 -0)➕
bench/results/2026-10-21-sage-f16-rtx5090/check-logits.py(+47 -0)➕
bench/results/2026-10-21-sage-f16-rtx5090/cuda-build.txt(+24 -0)➕
bench/results/2026-10-21-sage-f16-rtx5090/cuda-tests.txt(+13 -0)➕
bench/results/2026-10-21-sage-f16-rtx5090/default-check.txt(+19 -0)➕
bench/results/2026-10-21-sage-f16-rtx5090/fixture-reproduction.txt(+4 -0)➕
bench/results/2026-10-21-sage-f16-rtx5090/hip-build.txt(+69 -0)➕
bench/results/2026-10-21-sage-f16-rtx5090/llama-256k-optimized-reference-nc27-t8.output.txt(+5 -0)➕
bench/results/2026-10-21-sage-f16-rtx5090/llama-dump.cpp(+171 -0)➕
bench/results/2026-10-21-sage-f16-rtx5090/llama-log.txt(+21 -0)➕
bench/results/2026-10-21-sage-f16-rtx5090/logits-repeat.txt(+3 -0)➕
bench/results/2026-10-21-sage-f16-rtx5090/make-fixture.py(+90 -0)➕
bench/results/2026-10-21-sage-f16-rtx5090/prompt-hashes.json(+32 -0)➕
bench/results/2026-10-21-sage-f16-rtx5090/provenance.json(+40 -0)➕
bench/results/2026-10-21-sage-f16-rtx5090/results.json(+7802 -0)➕
bench/results/2026-10-21-sage-f16-rtx5090/run.py(+167 -0)...and 12 more files
📄 Description
The release
qwen35moepath rejects full F16 weights, including Sage-A1.5's publisher GGUF. This adds opt-in--f16-weightsexecution and explicit--kv f16for compatible F16 GGUFs in that model family. The loader selects the path by architecture, geometry and tensor layout; there is no Sage model-name restriction.Model scope: source inspection indicates that other compatible
qwen35moeF16 exports, including Qwen3.6-35B-A3B and its compatible fine-tunes, are candidates for this path. Those other checkpoints have not been run. Matrices, embeddings and routed experts must be F16 and pass the existing geometry/layout checks. Dense Qwen architectures and the separateqwen4exp/ Flash-Next engine gain no F16 support from this change.Sage-A1.5 is the only real F16 checkpoint validated end to end and benchmarked here. On an RTX 5090 32 GB / Ryzen 9 9950X3D / 128 GB RAM, its fresh near-full run generates 36.58 tok/s versus llama.cpp's 29.95 (+22.2%). That speedup applies to this model, machine and workload; it does not establish a gain for other compatible models.
Both final runs use the same F16 weights and F16 KV, 262,144 context capacity, 261,888 actual input tokens plus 256 greedy outputs, 512-token chunks and MTP off. The llama.cpp reference was tuned to 27 CPU-expert layers / 8 threads; Strata uses 15 pool workers plus caller / 60 resident experts per layer. There is one fresh run per final configuration; the report separates saved-prefix tuning repeats and retains the original losing F16 prototype (7.46 tok/s).
The implementation adds raw F16 dense/embedding/expert kernels, reuses F16 prompt GEMMs, expert streaming and ggml's CPU F16 path, and shares coalesced KV reads across each group of eight query heads. The opt-in hybrid cache limits prompt routing history and updates every layer's scores so it can adapt during generation. F16 KV/session copies and prefill reads use the correct element width. Omitting the new flags retains the release quantized/FP32-cache paths; model catalogs and setup are unchanged.
Related: #2464 and #3303. The measured result covers Sage F16 at a near-full 256K window, so those broader reports remain open. FP32 stays the default; this introduces no int8 KV format or global precision change.
Full report, raw measurements, commands, outputs and provenance.
Passed
Preparation failures resolved: the first 16K reference helper exceeded its batch; it now reads 512-token chunks. An older SYCL toolchain failed unchanged dependency helpers; the documented 2026.1 build passed. A synthetic-fixture SSM width was corrected and its 96 tensor shapes checked before GPU regression. Details are retained in the report.
Not run / limits: AMD hardware execution, Sage vision, multi-GPU, real-model MTP/concurrent serving, long-context task accuracy, other F16 checkpoints in the same family and other model quantizations. The default regression uses synthetic weights with the actual layer widths, not a downloaded quantized Sage checkpoint. Preparatory CPU work overlapped prefill; only the final generation windows are the acceptance comparison. No general hardware or prefill-speedup claim.
AMD runtime validation remains outstanding: an AMD owner can run
q36_f16_parity,q36_attn_parityand a real F16 prompt/decode check. CUDA execution has been validated; HIP compilation alone does not establish AMD execution correctness.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.