Repository navigation
Run Drama on macOS (PR #17 with the Mac-tested repair; supersedes #21) - #22
Merged
Merged
Conversation
Adds a macOS path that leaves the GB10 path unchanged, and one engine patch that removes the repeated reference prefill from Drama 3 speech. - scripts/build-engine.sh: on Darwin, omit -Dnvcc (the option is only declared for the CUDA steps) and use shasum where sha256sum is absent. The Linux branch is the previous code. - recipe/pilot_macos.py: the guarded pilot without systemd. Same shared GPU lock, admission check, port check, DRAMA_PILOT_READY and evidence files; vm_stat replaces /proc/meminfo and process-group signals replace systemd-run. --host defaults to 0.0.0.0, --host 127.0.0.1 available. - recipe/README-macos.md: the macOS procedure, measurements and the voice cloning steps. - recipe/build_voice.py: builds a drama3-http-voice/1 catalog from an encoded reference clip and its transcript. - engine/patches/0012: the Metal host prefills a voice reference once per lane, snapshots the recurrent state and reuses it. Measured 3.59 s to 1.37 s first audio on a short line and 4.68 s to 2.41 s on a 454 character paragraph, with byte-identical audio. It stacks on 0005 and is proposed upstream once that lands. - engine/patches/SHA256SUMS and the patch table updated.
4 of 6 tasks
6 tasks done
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
Supersedes #21. Lands #17 (macOS support and Metal reference-prefill reuse) through the Mac-tested repair, so the
recipe runs on Apple silicon with the full model on Metal. The GB10/CUDA path is unchanged.
This replaces #21 only to fix commit metadata: the three repair commits in #21 carried an author email with the
authoring machine's default local hostname. Here the commit emails were switched to GitHub noreply addresses to
keep credit without exposing host names. Author names, messages and author dates are unchanged; the code is
unchanged (tree proof below).
Credit:
e77d80a):recipe/pilot_macos.py,recipe/README-macos.md,recipe/build_voice.py, the Darwin branch ofscripts/build-engine.sh,bench/reference_cache_test.pyandengine patch 0012.
e77d80amust not merge as is (wrong audio afterA → default → A, about 61 MiB retained per voice switch, launcher defects):
review comment.
He then repaired it and retested it on a Mac:
repair comment,
submitted as Fix PR17: bounded reference cache and clean macOS lifecycle BobClawblaw/drama-tensorfold#1 (not merged there).
How this branch was built: jerryfane's tested head
f119696d1eca0aa53e91e1e7c2c141685e38c9fdreplayed as linearhistory on
main(844d0eab), commit by commit, with no merge commit:ed11f6dfeat: run the recipe on macOS and cache a voice reference's prefille77d80a[email protected](already noreply, unchanged)7e5a119fix: make macOS reference caching safe and boundede9660d7[email protected]c8776a4Merge current main while preserving the macOS full-model build pathd7dc8ec[email protected]60d1e59test: record real Metal cache and macOS lifecycle verificationf119696[email protected]882caa3docs(macos): drop the production Studio remark from the repair verification[email protected]mainconflicted in two places that jerryfane's merged7dc8echad already resolved:scripts/build-engine.shin the first commit andREADME.mdin the second. Each was resolved with the fileexactly as in
d7dc8ec, so every commit keeps the macOS and Linux build paths working. The third commit keepsits original message and carries the rest of that merge's resolution (
recipe/README-macos.md, 5+/4−).git rev-parse 60d1e59^{tree}=ff708fb7891b5884bba3e4aa21898e17eb3554a4=git rev-parse f119696^{tree}. Alsoc8776a4^{tree}=d7dc8ec^{tree}=8742f83deeb7227b4eed7f7e65064dcf825a34a0.recipe/README-macos.md(line 186) and touches nothing else.Engine patches: adds
0012-feat-drama3-reuse-a-voice-reference-s-prefill-across.patch(one boundedreference-prefix snapshot per Metal lane, exact prompt-prefix identity including tower lookahead, invalidation
before default or different-prefix prefill and on errors; CUDA execution unchanged).
SHA256SUMSandengine/patches/README.mdare updated. Patch 0012 has no upstream TensorFold PR yet; the patch table lists it as"to be proposed".
Testing
The Metal results are jerryfane's Mac runs, not mine. They are in his
repair comment and in
results/macos-pr17-repair.json(on Mac: clean Metal build 66/66 steps; 48/48 paired corpus PCM capturesbyte-identical; voice/default/text transitions passed; streaming 9/9 checks in four runs; 0 KiB RSS spread over
eight warmed voice switches). I have no Mac and did not re-run any of it.
Re-run at this head (
882caa3) on a GB10 host (aarch64 Linux), no GPU work, no model downloads:(cd engine/patches && sha256sum -c SHA256SUMS)python3 -m unittest discover -s recipe -p 'test_*.py'python3 -m unittest discover -s recipe -p test_pilot_macos.pypython3 -m unittest discover -s recipe -p test_build_voice.pypython3 bench/stream_check.py --self-test"self_test": "passed"844d0eab..882caa3(5 commits, linear) and over the fullmain..HEADdiff127.0.0.1/0.0.0.0/localhostin code and docs; cleanCarried from #21, not re-run here because the engine inputs are byte-identical (the fourth commit's tree equals
f119696's, and the fifth commit changes onlyrecipe/README-macos.md), run atf119696with Zig 0.17.0 andCUDA 13 nvcc:
scripts/build-engine.shfrom a clean checkoutBuild Summary: 102/102 steps succeeded; engined1018b3 + 12 patches = c265ca2fc4b9b54ba75b6780e110c566483c93d2844d0eab, 11 patches) gives881151ca8b83605c38a99f26fc8a94a92a6a51d7, which equals the PR build'sHEAD~1: 0001–0011 are unchangedzig build test -Dnvcc=/usr/local/cuda/bin/nvccinbuild/tensorfold(host tests,CUDA_VISIBLE_DEVICES=empty)215/215 steps succeeded; 3056/3070 tests passed (14 skipped)python3 tools/zig/test_speech_flags.py(built binary)python3 tools/zig/test_drama_prefill_compare.pyBuilt artifacts (from #21's build):
Not run by me:
PILOT_MACOS_INTEGRATION=1lifecycle smoke: needs macOS.bench/reference_cache_test.py, the corpus audio-identity gate and servedstream_check.py: they need arunning server with the model, and this change was checked without GPU work.
Performance or quality claim
None.
Checklist
SHA256SUMSandengine/patches/README.mdupdated
scripts/build-engine.shapplies the whole series and builds from a clean checkout (Linux/CUDA by me;macOS/Metal by jerryfane)
recipe/test_pilot_macos.py,recipe/test_build_voice.py; real-model checks are Mac-run by jerryfane)or commit messages (commit emails are GitHub noreply addresses)
compare_gate.pyreports"identical": trueandstream_check.pypasses:reported by jerryfane on Mac only (48/48 identical, streaming 9/9); not re-run on GB10
Evidence (only with a claim)
n/a: no claim.