mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
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#3317
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/1220
Author: @x00r
Created: 10/6/2026
Status: ❌ Closed
Base:
main← Head:fix/batch-mtp-head-metadata📝 Commits (1)
1bd5d29fix: preserve shared draft-head metadata in batch MTP slots📊 Changes
4 files changed (+181 additions, -0 deletions)
View changed files
📝
CMakeLists.txt(+7 -0)📝
include/strata/core/mtp.hpp(+2 -0)📝
src/core/mtp.cpp(+27 -0)➕
tests/core/mtp_shared_head_test.cpp(+145 -0)📄 Description
Preserve shared draft-head metadata in batch MTP slots
Summary
dhead_type_anddvocab_host_when a batch slot binds shared draft-head buffers.STRATA_DEBUG_MTP=1, off by default).Problem
With
--batch 2 --batch-mtpand a draft vocabulary subset, batch admission repeatedly reports:MtpDrafter::bind()sharesdhead_,dvocab_, andn_dvocab_, but leaves the slot'sdhead_type_at its default-1. The draft-output path passes that invalid format tonative_mmvq(), and the admission error path exits the entire engine. Both slots can be affected while solo requests continue to work.The same sharing branch also omits the host vocabulary map used by
record_top2()diagnostics.Fix
Copy both metadata fields alongside the borrowed buffers:
The format must come from the source drafter, not
head->type(): a Q4-converted draft subset can differ from the main head. Keepowns_draft_head_ = false.No changes to model files, quantization formats, control vectors, or experimental speed-projection settings are needed.
Tests and evidence
On Windows, MSVC, CUDA 12.4, RTX 3090 / sm_86:
mtp_shared_head_test,vmm_test,file_expert_source_test, andexpert_profile_save_test.shared draft head type is -1, expected 13.shared head lost the host token map (top2 diagnostics).The new test calls the real binding method and covers Q5_K, IQ4_XS, a Q4-converted subset, the no-subset fallback, both slots, incompatible-head rejection, and source-buffer survival after slot destruction. It does not launch draft-output MMVQ or run full-model concurrent generation. The full suite was not run.
Scope / review notes
src/core/mtp.cpp,include/strata/core/mtp.hpp,tests/core/mtp_shared_head_test.cpp, and its CMake registration.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.