Implement the Qwen3.8 Flash Next Rust and Metal text core #95
Reference in New Issue
Block a user
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?
Area
Implement the Qwen3.8 Flash Next transformer core in Rust and Metal: embeddings, hyper-connections, Gated DeltaNet layers, dense full-attention behavior within the sparse budget, MoE, final projection, and recurrent state ownership.
Sequence
Step 3 of 7. Previous: #94. Next: #96. Start only after the exact loader contract in #94 is complete; #96 builds on this executor.
Implementation
qwen4expRust executor and dispatch it only after #94 validation succeeds..metalplus the existing small Objective-C bridge.Verification
Completion requirements
Non-goals
hugo referenced this issue2026-09-01 18:27:01 +00:00
Implemented in
c414640(Implement Qwen text core).The server now opens the frozen Qwen safetensors set through a dedicated Rust model/executor path and runs the 48-layer 3:1 hybrid text graph with MLX affine Q2/Q4/Q8 and BF16 projection kernels, four-stream rank-320 hyper-connections, BF16 width-4 convolution history, fp32 Gated DeltaNet recurrence, 24Q/2KV dense causal attention through the 2,048-token budget, top-10-of-512 routed experts plus the shared expert, Qwen RoPE, final hyper mixer, and LM projection. Rust owns model maps, graph scheduling, session state, resident-state swaps, and versioned checkpoints; native additions are limited to Metal kernels and the existing Objective-C dispatch bridge. Missing layer-2 PLE and over-budget sparse QSA fail before unsafe or partial execution and remain explicitly assigned to #96 and #97.
Verification completed in isolation on Apple M5 Max against the pinned 105 GB artifact set:
Required gates passed: cargo fmt --all -- --check; cargo clippy --all-targets --all-features -- -D warnings; make bundle; cargo test --all-features (233 passed, 22 ignored, plus 4/4 artifact-tool tests). The initial full test run encountered the unrelated randomized dev_brain YAML fixture flake; its isolated rerun and the complete rerun both passed. DS4 has no Qwen3.8 path, so this is a new DS4Server feature while preserving existing DeepSeek and GLM behavior.