Skip to content

DeepSeek Flash 1017 affine weights on native Metal - #4368

Draft
ashhart wants to merge 5 commits into
mainfrom
deepseek-1017-metal-receipt
Draft

ashhart wants to merge 5 commits into
mainfrom
deepseek-1017-metal-receipt

Conversation

@ashhart

@ashhart ashhart commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

What this changes

Adds an experimental native Metal path for the DeepSeek V4.1 Flash 1017 TensorFold e2e3-p4-h8 checkpoint. The standard tensorfold-native server recognizes the affine pack and uses the shared lane host. It reads the stored codes, scales and biases directly, with BF16 projection inputs. The port brings over the affine model's exact prefill plan and DSpark verifier. Release FP8/MXFP4 weights continue through their existing Metal entry point.

Checks on this head

  • Head: 5c068fbde8604fa9112b7a0d619acf473be759be.
  • Lean and PR check: zero new findings.
  • zig build native -Dcpu=apple_m1 -Dversion=1.3.2 built the Metal server. The capabilities output lists deepseek_v41 with mlx-q8g64.
  • The Zig loader's config code accepted the exact installed checkpoint config in a host check. It resolved 1,048,576 positions, the 8-bit group-64 default and mixed 2-bit and 3-bit routed experts.
  • Metal shader compilation passed for the affine backbone, the routed and output projection shaders, and the route-weighted affine kernel at 2, 3, 4 and 8 bits.
  • The first build against the updated main base ran 161 native tests with 3 skips. The release-weight Metal fixture suite passed 38 tests. The exact-head build repeated 161 passes and 3 skips.
  • CI: pending on the updated head.

Receipt and outstanding device checks

  • The installed checkpoint revision is 9012d3064675de44630c529f496e4961b30a73a4. No weight transformation is part of this change. The archived source, measurements and reproducible inputs cover the earlier experimental runtime.
  • This head has loader config, build and shader coverage. A real-checkpoint startup, generated-token parity against the original build, and updated throughput are outstanding. The existing serving instance holds the model during the review window.
  • New runtime support is macOS Metal. A release build or performance claim requires device coverage for the affine kernels and served lanes.

Historical 1017 results and source replay

@ashhart ashhart changed the title Preserve the DeepSeek V4.1 Flash 1017 Metal experiment DeepSeek V4.1 Metal: reuse exact prefixes and stream decode attention partials Nov 21, 2026
@ashhart ashhart changed the title DeepSeek V4.1 Metal: reuse exact prefixes and stream decode attention partials DeepSeek Flash 1017 affine weights on native Metal Nov 21, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant