mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #619] [CLOSED] Add support for CYBER-FROST-3.8 (Blackfrost): read qwen4exp.nextn_predict_layers #2724
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#2724
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/619
Author: @mw00
Created: 10/3/2026
Status: ❌ Closed
Base:
main← Head:nextn-mtp-blocks📝 Commits (10+)
749d957setup (--backend hip): a system ROCm without the HIP development files falls back to the wheels (#446)5a30024calibrate: the engine's arguments come from the server's engine_args; a failed tuning says why (#447)9f60d13serve, setup: name the small split card that caps the prompt chunk; setup recommends the big card alone (#448)eb8da1d/metrics: each request's speculative draft counts, and their sums in the totals (#457)6a09387setup (--gguf-dir): GGUFs Strata cannot run are named as such, with the --family/--model to use (#444)d6a91e2docs: the Coder is weaker outside code, Chinese/CJK text included; the unpruned sizes for that (#438)d8d4ad3Merge branch 'f-135-eng' into rel-0.1.357b600d5Merge branch 'f-135-small' into rel-0.1.35d9ab843Engine 0.1.35: Windows AMD uses its bundled HIP runtime (#468 #461), the low-RAM resident mode on Windows 32 GB PCs (#467), fixes #460 #459 #446 #447 #457 #448 #444; setup requires it57bd713sycl: pipeline the expert cache's profile fill (model load 3-4x faster)📄 Description
Add support for CYBER-FROST-3.8 (Blackfrost) — a qwen4exp fine-tune with its own nextn/MTP block
Model:
peasantsmith/CYBER-FROST-3.8-PS-GUFF(a Q5_K_M requant of
Blackfrost-AI/CYBER-FROST-3.8-BF16)Base: upstream
main, verified against99f3dbdDiff: 3 files, 41 insertions(+), 6 deletions(-)
What this adds
Strata currently runs one model family,
Qwen3.8-Flash-Next, and the MTP machinery is builtaround that family's files:
tools/mtp_fetch.pyfetches the draft head fromQwen/Qwen3.8-Flash-Nextat a pinned revision, and nothing in the engine reads a model's owndeclaration of whether it has an MTP block.
CYBER-FROST-3.8is a fine-tune of that family which declares its own nextn block in its GGUFmetadata:
It cannot be loaded by the current engine. This patch makes the engine read that declaration,
which is what any
qwen4expfine-tune carrying its own nextn block needs — the same class ofcontribution as the existing
Swift 1.5and OrcaRouter entries indocs/MODELS.md, but one thatdoes need engine changes.
Why the engine refuses it today — four paths, four failures
include/strata/artifact/gguf_reader.hppblock_count(49) includes the MTP block, so the comparison againstQwen4ExpGuard::block_count(48) fails and the model is rejected outrightsrc/core/native_dense.cpptools/iq_pack.pyn_layers = 1 + max(blk.N)counts the nextn block and emits an expert row the engine rejects as"a malformed line"(its parser bounds-checksl < n_layers)The change
1.
include/strata/artifact/gguf_reader.hpp— readqwen4exp.nextn_predict_layers(absent → 0).
Qwen4ExpGuardgains anextnfield, and the architecture check subtracts it fromthe observed
block_countbefore comparing, because the kernels' contract is the trunk:nextn blocks sit after it and are a separate subsystem. A file reporting
block_count < nextnreturns a precise error instead of a confusing mismatch.
2.
src/core/native_dense.cpp— add the three 2-D nextn projections to the dense-eligiblesuffix list:
The 1-D nextn norms (
enorm/hnorm/hc_head_norm) are deliberately not listed — theexisting
shape.size() == 2filter excludes them, so they stay on the packed fallback. Thelist is additive and every new entry passes the same guards the existing entries do (
blk.prefix, supported quant type, 2-D shape), so eligibility for any other model is unchanged.
3.
tools/iq_pack.py— subtract the declarednextnfromn_layersso the pack'snative_experts.txtcovers the trunk exactly. The drafter loads its own experts from the runtimedirectory, so emitting a nextn row only makes the pack unloadable.
Relationship to the existing MTP flow
This does not replace or change
tools/mtp_fetch.py,mtp_pack.pyormtp_rt.py. Those stayexactly as they are, and remain the way a draft head is obtained.
The gap is narrower:
mtp_fetch.pyis pinned toQwen/Qwen3.8-Flash-Next, so a fine-tune whoseGGUF declares its own
nextn_predict_layerscan be packed with a head from that base — but theengine then refuses to load it, because nothing reads the declaration. These three changes
close that gap and nothing else.
Verification
Applies and builds against current upstream:
End-to-end load of the model this PR is for:
The architecture guard passes, the MTP head binds, and the nextn projections load natively.
Before the patch this model is rejected at the architecture check.
The pack is trunk-correct:
Speculative decoding works: the MTP drafter accepted 9,258 of 10,809 drafts (85.7%) across the
measurement runs — 42% of the 274 drafting windows accepted every draft. Two drafters exist and
they are separate: the MTP/suffix drafter is the one bound by this patch, and its rate is the
85.7% above; the
--specverify window is a different mechanism and reports its own rate.No hardcoded paths, GPU counts, or host assumptions in the diff.
Draft-head provenance — stated plainly
The draft head used in these measurements was packed from the base model, because this
fine-tune ships no MTP weights of its own — the same reason
mtp_fetch.pyreads the basecheckpoint. It works — the MTP drafter accepts 85.7% of drafts — and speculative decoding is
output-equivalent by
construction, so generated text is unaffected.
It is not necessarily the ideal head for this fine-tune — one trained against the fine-tune's
distribution would accept more tokens. That is a property of the available weights, not of these
changes.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.