Repository navigation
Add native macOS support for Drama NVFP4 and CFG - #24
Merged
plotarmordev merged 1 commit intoOct 25, 2026
Merged
Conversation
Use a separate checksummed Metal series proposed in ashhart/TensorFold#1268, preserving full-model and CUDA pins. Require the selected weight manifest for both launchers. Include clean-build, numerical and actual 28-request Mac evidence with original failures and unrun limits retained; no performance or quality-equivalence claim.
7 of 9 tasks
Owner
|
Thanks, Jerry, this is careful work. I checked what I can from Linux: the three Mac patches apply to A few small things for a follow-up, none blocking:
|
5 of 6 tasks
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.
Description and motivation
Add a clean, pinned native macOS path for the new Drama 3 NVFP4 checkpoint and engine. This is actual Zig/Metal support, not a Python fallback or checkpoint conversion.
Native implementation: ashhart/TensorFold#1268. This recipe carries the ordered/checksummed patches, so building it does not require waiting for that source PR to merge.
Changes
scripts/build-engine.sh --weights nvfp4selects a separate upstream pin, applies three verified patches, and builds the native server, codec generator and voice writer with Zig 0.17.0 /apple_m1. Existing full-model and CUDA NVFP4 pins/series stay unchanged.--checkpointoverrides; a missing default can be downloaded, but an existing incomplete/modified directory is refused, not silently repaired or replaced. Explicit legacy overrides do not acquire a false pinned-provenance label.results/macos-nvfp4.json; no voice data, PCM, weights or private paths.Exact checkpoint:
plotarmordev/drama-3-NVFP4-Pruned@494db08481db952f834b2241bce63fb3dfa72554(all 15 files verified). Engine base:3d219d2156d4c25dcfb74370c8703cd89e58aa49, native 1.1.4.Testing
Actual Mac execution
Apple M5 Ultra,
applegpu_g17, retained 256 GiB inventory. Three sequential single-stream native servers: paired gamma 1.5, separate gamma 1.5, and opt-in request gamma.28 HTTP checks, zero failed checks: 15 complete nonempty/nonzero PCM replies, one deliberate early stream cancellation, and 12 expected validation refusals. Paired/separate, streamed/whole, repeated reference, A→B→A and post-cancellation responses matched exactly. Gamma 1/2 requests were each repeatable. All original server/client owners settled; servers exited 0. No Studio/oMLX/production changes.
The observed early close plus exact follow-up is the cancellation evidence; it is not an internal engine-submission/cancellation trace. Live inference used the native binary directly; launcher selection has CPU coverage, not a separate end-to-end launcher/model run.
Numerical contract, including the initial failure
Initial registered Metal run:
The shared-gate precision stress was underpowered because sigmoid saturation hid FP16 overflow. A test-only correction centers the exact dot at one and proves FP16/BF16 discrimination with an independent CPU regression; no kernel or tolerance change. Only the failed variant was rerun:
The other 13 passes and all original runtime-limit checks remain retained. This is not presented as a second full-suite pass.
Build / CPU / publication
6585530054e273aa1a1554549585489f2497cb41.Unrun / limitations: Metal M1–M4, smaller-memory capacity, CUDA model parity, teacher-forced fidelity, full mixed-family/golden suite, multilane speech, drafted-token equivalence, voice encoder execution, WER/speaker quality and latency/RTF. The standalone quant diagnostic was built, not run. Existing full-model qualification is not relabeled as NVFP4 evidence.
Performance or quality claim
None. This PR establishes scoped native Mac functionality and correctness checks, not a speedup, quality equivalence, minimum RAM, or whole-host exclusivity.
Checklist
SHA256SUMS, attribution and patch table updated; all patches linked to upstream #1268.compare_gate.py/stream_check.pyfull-model A/B gate: not run for this newly supported NVFP4 backend; the actual native HTTP/PCM equality checks above are reported explicitly instead.