mirror of
https://github.com/ashhart/TensorFold.git
synced 2026-12-03 20:06:17 +08:00
Checkpoints of type qwen3_5 that have their own output head, such as Qwen3.8-27B in MLX 4-bit, now open the new qwen27 family on the shared serial host. Tied-head qwen3_5 checkpoints like Qwen3.5-2B stay on the lane core. 1.0.2 refused the 27B. - --drafter turns on DFlash2 draft trees. It takes a directory or a repo id in the Hugging Face cache, and an unknown drafter is refused before the model loads. The drafter's weights are prepared in 4 bits unless --drafter-bits 0 keeps them bf16. Every drafted reply equals the same request with "draft": false. - Earlier assistant replies prefill with the arithmetic that decoded them. The prompt cache keys a state by its tokens and its decoded rows, and the server prefills a finished reply in the background for the next turn. States learned to disk with --learn hold prompt arithmetic only. - Prompt rows have kernels of their own. The GDN scan takes four value columns a simdgroup, and projections read each weight once per 128-row chunk with K splits picked for prompts. On chips with tensor units, prompt rows attend through a separate kernel, and on the M5 part of each MLP runs on the Neural Engine. A prompt row's bits never depend on where the prompt was cut. - On M1 to M4, 4-bit projections and the drafter run on simdgroup-matrix tiles, the attention tail reads its results in that layout, and drafted requests decode on the shared lane core. TF_QWEN27_LANES=0 or 1 overrides that choice on any chip. - The shared lane core gains shared-context rounds: one prompt KV prefix, recurrent state forked per lane block, masked lane attention, and rollback of failed or canceled updates. Lane projections take their inputs' group sums, and Flash Next's dense projections now use the core lane projection. - Window costs are timed once per engine build, chip and model shape and then cached, for the 27B and for Nemotron on Metal, so later loads skip the timing. - The Metal runtime gains blit copies, and the --keep-warm ticker keeps the 27B's residency set warm. - A direct engine request at temperature 0 samples greedily, and an exact tie goes to the lower token id. Where 1.0.2 and the 27B work did the same job, one path stays: 1.0.2's checkpoint loader with its safetensors header checks, its --keep-warm ticker, and its 2-, 4-, 6- and 8-bit row projections, joined by the simdgroup-matrix tiles for chips before the M5.
3 lines
130 B
Zig
3 lines
130 B
Zig
//! Shared draft primitive sources are embedded at build time.
|
|
pub const text = @embedFile("kernels/metal/core/draft_ops.metal");
|