mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2105] [CLOSED] feat(mtp): support native Q4_0 and Q8_0 experts #3860
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#3860
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/2105
Author: @xszwow
Created: 10/12/2026
Status: ❌ Closed
Base:
main← Head:feature/mtp-native-experts📝 Commits (1)
0c4583efeat(mtp): support native Q4_0 and Q8_0 experts📊 Changes
4 files changed (+124 additions, -23 deletions)
View changed files
📝
include/strata/core/mtp.hpp(+6 -1)📝
src/core/mtp.cpp(+70 -11)📝
tools/mtp_fetch.py(+6 -1)📝
tools/mtp_rt.py(+42 -10)📄 Description
Summary
Teach the Flash-Next MTP drafter to load routed experts in native GGUF Q4_0 or Q8_0 row layout, in addition to the existing Q2_0 S2 runtime.
This is opt-in through a runtime generated by
tools/mtp_rt.py. Existing runtimes withoutexperts.txtkeep the legacy Q2_0 S2 path and default behavior.What changed
tools/mtp_rt.pynow:[gate | up | down]order;experts.txtwith a version, layout, types, and bytes per expert.MtpDrafterreads and validates that metadata, checks the exactexperts.binsize, allocates the correct expert blob size, and dispatches native runtimes through the existing grouped native-expert kernels.tools/mtp_fetch.pyaccepts opt-inSTRATA_MTP_REPOandSTRATA_MTP_REVISIONvalues for a compatible fine-tune's MTP tensors. With neither variable set, the original Qwen URL, pinned revision, and SHA-256 verification path are unchanged.The model geometry, server defaults, CLI defaults, legacy Q2_0 runtime, and non-MTP paths are unchanged.
Validation
Rebased cleanly onto
mainat7695859a; the four touched files had no intervening upstream changes since the tested 0.1.42 base (61b3fb5d).Static/tool checks:
python -m py_compile tools/mtp_fetch.py tools/mtp_rt.pypython -m unittest tools.test_mtp_fetch: 8 passedgit diff --checkConversion check:
experts.bin(1,415,577,600 bytes),experts.txt,dense.bin, anddense.txtwere byte-identical to the runtime used for the HIP tests.experts.binSHA-256:cb101ab35f946698ef09dddc942c41620ac03de40483a661ea07052b59ff16c5experts.txtSHA-256:c6fed393954caefd784ba689f7cc23f045f82051631406333c3b37c34e4ba44fEnd-to-end run:
gfx1151), 128 GB unified RAM, Windows HIP Release build from the tested 0.1.42 source.native types 2/2, loaded 1,350 MiB of Q4_0 MTP experts, reachedsession is up, and served repeated text, long-context, tool-use, and vision-integrated requests.--spec 6..8, an 8,192-token MTP window, INT8 KV, and up to 262,144 total context capacity.Compatibility and limits
experts.txtmeans the legacy Q2_0 S2 layout, preserving old runtimes.Related performance/configuration evidence is kept separate from this code change in #1947.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.