mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1343] [CLOSED] Add support for CYBER-FROST-3.8 (Blackfrost): read qwen4exp.nextn_predict_layers #3401
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#3401
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/1343
Author: @rluisr
Created: 10/7/2026
Status: ❌ Closed
Base:
main← Head:feat/nextn-mtp-blocks📝 Commits (1)
748eca8Add support for CYBER-FROST-3.8 (Blackfrost)📊 Changes
5 files changed (+193 additions, -6 deletions)
View changed files
➕
docs/CYBER_FROST.md(+131 -0)📝
docs/MODELS.md(+21 -0)📝
include/strata/artifact/gguf_reader.hpp(+26 -4)📝
src/core/native_dense.cpp(+7 -1)📝
tools/iq_pack.py(+8 -1)📄 Description
Takes over #619 by @mw00, which GitHub closed when
mainwas force-pushed on 2026-10-06 (its branch is on the old history). Same change on the currentmain(82f46a8): commit94a3ae2cherry-picked with-x, author kept, changed lines identical to #619's.docs/MODELS.mdonly.mainadded the "Unsloth UD-IQ4_XS" section where #619 inserted its own; the CYBER-FROST-3.8 section now sits after Swift 1.5 and before UD-IQ4_XS, the order #619's own merge ofmain(21a1dda) chose.main, without a GPU or the model:gguf_reader_test,gguf_split_test: pass.tools/test_iq_pack.py: 24 tests pass.check_architectureon synthetic GGUFs: accepts 48 blocks (no key, ornextn_predict_layers = 0) and 49 blocks withnextn_predict_layers = 1; refuses 49 without the key, 50 with 1, and 0 with 1.iq_pack.pyon a synthetic 3-block model:native_experts.txthas layers 0-2 without the key or with 0, and layers 0-1 withnextn_predict_layers = 1.99f3dbd.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.