You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
npu: the draft loop refuses the hidden-row shape its own interface documents, aborting the run at the first partial accept #1137
BaseModel::last_hidden_rows() (npu/mtp/draft.h) documents "Every row's hidden of the last batched pass (M x hidden_size, row-major)" — the whole verify batch. Q4nxNpuForward::commit_verify_rows truncates that buffer to the accepted prefix (#820), and run() required exactly that second shape:
if (rows.size() != (size_t)take * (size_t)base.hidden_size()) {
if (!rows.empty()) { r.err = "drafter rows: base returned a partial batch hidden"; return r; }
}
So any base that keeps its batch buffer — the documented shape, and what a new target (NpuModel P4, Hexagon P5) writes first — fails the whole run on the first partial accept, with an error calling a full buffer "partial". Reproduced with a toy base that keeps its rows: 680 of 2000 randomised cases (k, tau, budget, batch width, head accuracy) aborted, while the same 2000 with the pre-truncated shape all passed on text, state and position.
Row m is the hidden after the token at start_pos+m in both shapes, so the first accepted rows are the ones the drafter must advance over either way.
Fixed in #PR (next message): the loop takes the first accepted rows of either shape and still fails loudly on any other count; tests/mtp_draft_test.cpp [13] is red before and green after.
Activity