Repository navigation
Conversation
Give the row and lane modules one owner for their metadata type. Keep native FP32 matrices out of the BF16-only Neural Engine MLP path and exercise that refusal in the existing family host tests. Fix the group16 packing test to check the layout packed-byte count. Refs #1920.
Read actual metadata dtypes from checkpoint headers before admission. Preserve the original BF16 tensor-unit group refusal, restrict FP32 metadata to the four gated forms, and check direct projection loads too. Use the declared q4 lane threadgroup bytes in resource records. Refs #1920.
Resolve local GGUF paths through a content-keyed native image before the existing Metal startup. Reuse its fusions and projection loader, keeping FP32 affine metadata and checking scalar transforms. Adapt the reviewed core block repacker and expose an explicit tokenizer callback. Keep its named refusal until the metadata tokenizer is linked. Keep the qualified 27B production geometry. Exercise synthetic complete images, independent projections, source and builder cache invalidation, and failed or corrupt publication on the host. Refs #1920.
Refuse inexact BF16 scalars before repack, retain named metadata errors, and invert the measured key-fast value-head layout for all affected Qwen35 tensors without changing packed codes or F32 affine metadata. Use the shared core exact-narrowing helper for small tensors. Keep stored norm multipliers unchanged. Test the inverse map, every small tensor class, packed form, and complete prepared projection.
Keep norm multipliers and negative ssm_a exactly as stored, including value-head permutation. Dispatch F32 gain kernels and an explicit direct-decay mode while retaining the BF16 MLX specialization and legacy A_log expression. Cover exact image bytes, all norm roles, converter one-ulp neighbors, invalid coefficients and storage flags with host regressions. References #1920.
Use Qwen35's letter-only split and ByteLevel flags. Keep the six FIM and repository added tokens ordinary for decoding while masking all added tokens in request text. Include the end-of-text control in model and generation stop sets, refuse an ordinary end-of-text spelling, and test effective eosIds against an independent generation config. Add a read-only CPU parity runner for supplied text cases and tokenizer assets. References #1920.
Register input, residual and head norms plus prompt and decode decay paths against independent binary64 formulas, with coefficient controls and launch declarations. Simulate alternative RMS accumulators and state the BF16-output discrimination limit. Document scalar precision, tokenizer flags, stop sets and the CPU comparison runner; GPU qualification remains separate. References #1920.
Carry the root config marker through Config and Shard into the weight builder. Admit F32 gains and stored negative ssm_a only for a marked GGUF image; retain the legacy BF16 gain and A_log path otherwise. Exercise both refusals on a generated image with its marker removed, plus valid and malformed markers, rank propagation and dtype admission. No shader arithmetic changes. References #1920.
Use the owning core module in standalone Qwen tools so scalar admission does not import safetensors twice. Keep the GGUF marker predicates unchanged. Refs #1920.
4 tasks done
Owner
Author
|
Closing as superseded by #2078, which serves the dense Qwen3.8-27B from a GGUF on Metal on top of the core GGUF adapter in #2064. This PR's two pieces that #2078 didn't have, the full stop set and the 834-string tokenizer comparison against the MLX checkpoint, moved over in #2078's second commit, and that comparison passes on both Q4_K_M and Q8_0. |
ashhart
added a commit
that referenced
this pull request
Nov 5, 2026
Port the complete control-token stop set and tokenizer comparison from #1955. Check both providers against the same 834 varied strings, vocabulary slots, added-token flags and rendered chat IDs. Keep FIM controls ordinary for decoding and leave unused padding slots unmapped. Document the measured generic projection path under Unreleased.
ashhart
added a commit
that referenced
this pull request
Nov 12, 2026
Port the complete control-token stop set and tokenizer comparison from #1955. Check both providers against the same 834 varied strings, vocabulary slots, added-token flags and rendered chat IDs. Keep FIM controls ordinary for decoding and leave unused padding slots unmapped. Document the measured generic projection path under Unreleased.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #1920. Metal serves Qwen3.8-27B straight from a GGUF file, with the weights the kernels multiply exactly the file's.
What it does
scale × code + biasper group, with FP32 scales and biases. Every product is an fp16 times a small integer, so it's exact in FP32. The reader and repacker are core: a GGUF reader and an exact repack of GGUF's quantized blocks (#1920, steps 1-2) #1926, already on main.f32(1 + w), more precise than MLX's BF16 rounding, andssm_aasf32(−exp(A_log)). Both are used exactly as stored, and only for an image whose config carriestensorfold_gguf.Checks
ggml-org/Qwen3.8-27B-GGUF@a316ea527, Q8_0 and Q4_K_M):Not yet run: the device gate
This doesn't land before the device gate: both real files served on Metal, with tokens and speed against the MLX checkpoints. A prepared image is about 26 GB, and the Macs don't have the room yet.