From c7abf4fab6d177f577f59ecfd6ce423ce601bda6 Mon Sep 17 00:00:00 2001 From: Pavlo Ratushnyi Date: Thu, 15 Oct 2026 08:58:13 +0200 Subject: [PATCH] model-format: allow the whole-tensor stream for output.weight and token_embd.weight (native head / embedding owners) Co-Authored-By: Claude Sonnet 5.5 --- crates/model-format/src/qwen4exp.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/model-format/src/qwen4exp.rs b/crates/model-format/src/qwen4exp.rs index 9c5f50d4..14a25ed8 100644 --- a/crates/model-format/src/qwen4exp.rs +++ b/crates/model-format/src/qwen4exp.rs @@ -1425,6 +1425,9 @@ fn plan_stream_rows( .. } | TensorRole::Global(GlobalRole::OutputHcUp) => (320, 10240, false), + // The complete vocabulary-major head / embedding table: the native head and embedding owners + // (`generate.cpp` NativeHead / embedding upload) read each as ONE whole-tensor stream. + TensorRole::Global(GlobalRole::Output | GlobalRole::TokenEmbedding) => (2560, 248320, false), _ => return Err(BindingError::Range("row_count")), }; let expected = [columns, rows, 512];