Repository navigation
zonos3: LACI (--laci-heads), short texts (--short-text), and the phoneme, start and pause tokens - #3879
Draft
BobClawblaw wants to merge 41 commits into
Draft
zonos3: LACI (--laci-heads), short texts (--short-text), and the phoneme, start and pause tokens#3879BobClawblaw wants to merge 41 commits into
BobClawblaw wants to merge 41 commits into
Conversation
This was referenced Nov 18, 2026
Contributor
Author
|
/atc depends 3878 |
BobClawblaw
force-pushed
the
zonos3-laci
branch
from
November 20, 2026 23:22
7c6003a to
70e6911
Compare
…'s dumps fp32 rows over the published bf16 weights (model.pth read without Python), one row-kernel path for prompt and decode rows. zonos3-generate --check compares every sublayer with tools/dump_golden.py lm captures of Zyphra/ZONOS3-Mini.
…d against the reference's greedy frames
…nce's captures and audio Nested torch checkpoints (generator.pt, the decoder heads) read without Python; frames decode in any chunks to the same samples as one pass.
…, the output stage zonos3-generate --text matches the reference's prompt rows and greedy frames, and its audio matches the reference's CPU fp32 decode.
…'s default voices, its sampling defaults ZONOS3 reads its checkpoints through core's torch.save reader. A release folder has no config.json: it is recognised by lm/zonos3_mini/params.json and its tokenizer loads from there. The speech request gains an optional speaker vector. A release's voices are its own (the server's `zonos` beside Drama 3's voice store), so --voices, --request-voices and --manage-voices are refused with it.
…es after each; host tests in test-cuda-host
…against the reference's fp32 run
…hecked against the reference's fp32 run
…at it gave) and the reference-dump tool
…nd: codes equal to the reference's fp32 run
… to the reference's fp32 run at one and four lanes
…he engine on first use A clip is read by core's WAV reader and resampler. The speech request gains reference_audio.
… codes for other models
The frame sampler keeps the release's masks and repetition penalty and hands each codebook's unmasked logits to core/lanes/sampling.zig at position frame * 10 + codebook, in place of the family's own seeded generator. Greedy frames are unchanged: 78 of 78 and 80 of 80 identical to the reference at prompt chunks of 7 and 256 rows.
…ms and linears Gate 5: each launch's registers and shared memory on sm_80 to sm_121, measured with nvcc 13.0, and a 13.2 set for the seven launches later releases compile differently. Gates 1 to 4: z3_rmsnorm, zc_layernorm, z3_linear and zc_linear through the row and dense input families.
The host counts a load's device bytes before allocating (the release's weights, then the backbone's and decoder's own count of their state) and asks the CUDA families' pool; a load or a clip that does not fit is refused, and a refused clip leaves the engine serving.
…, with exact gates
… for all 40 zc_spec and ze_nearest now keep a NaN: the spectrum's clamp is a comparison, and a NaN dot is never the nearest code.
…g re-pinned for the four images
… figures on the rebased branch
…and from the branch on Metal
Clients written for OpenAI's text to speech send alloy, nova and the like unless told otherwise. A name the release has stays that voice; any other unknown name is still refused.
response_format takes mp3, opus and aac where LAME, libopus and FDK AAC load (looked for on first use, like the image libraries; a missing one refuses its format with the line to act on) and flac, which the server writes itself. A whole or streamed pcm reply carries X-Audio-Sample-Rate. WAV stays the default and its bytes are unchanged.
A request that asks for it has its text rewritten into its spoken form before the tokenizer, as the reference servers do, by the publisher's own library loaded on first use (TENSORFOLD_LIBZYPHRA_TEXTNORM, or lib/ beside the installation). language picks the grammar (en_us by default, the reference's 44 codes). Only text_normalization: true normalizes; left out or false, the text is spoken as typed whether or not the library loads, so installing it changes no reply. true without the library is refused with the line that says how to build it. zonos_textnorm_test.zig checks the text step against every case of the reference's test_textnorm_wrapper.py, byte for byte, where the library loads.
condition_values and condition_buckets set the loudness, fmax and speaking-rate rows (a raw value through the edges in params.json); speaker_cfg_scale runs the reference's twin, the prompt without its voice, on a second set of caches and samples each frame from the two logits mixed on the host. Greedy frames equal the reference's for both, alone and together, on the reference-prefix and the speaker-row paths.
Each request has a lane of the backbone's caches and recurrent state and a lane of the decoder's; one worker gives every request in progress a turn, a frame each, through the single-stream passes already checked. A reply beside others is the reply alone, byte for byte. Each request at once past the first adds 1,236,862,976 device bytes, admitted with the load. Nothing is batched across requests: the total speed is one request's.
Engine.runLanes runs a row of each lane together: the launches that read no lane's state take every row at once, and the four that do run a lane at a time on that lane's state. A request's reply is still the reply alone, byte for byte. Four 17.8 s replies at once take 1.71 s where they took 2.42 s; a guided request's two passes a frame are one.
BobClawblaw
force-pushed
the
zonos3-laci
branch
from
November 21, 2026 05:44
70e6911 to
d19e7f2
Compare
…en hold, controls guidance, embedding voices A request's controls name directions of the publisher's steering bundle. Hidden directions add dose times the vector to Full AttnRes bank sources on every generated frame (z3_combine as one fp32 add, checked by the kernel contract at that shape); speaker-embedding directions move an embedding voice's vector and keep its norm. speaker_mode "embedding" and speaker_embedding speak a voice by its speaker row. GET /v1/audio/controls lists the directions. Against the publisher's code with its bundle, five greedy requests: the host's deltas and moved embeddings are bit-identical, and the frames are identical at --max-rows 1, 7, 64 and 256. --voices and --default-voice now parse in voice_cli.zig, unchanged, so cli.zig stays within 600 lines.
…eme, start and pause tokens LACI reads a request's place in its text from the alignment heads' attention after every row, rolls a skip, a stall or an early end back to its onset and regenerates under ACI masks; the masked heads run through the same attention kernel over a closed-up cache. The release's 143 extra text rows load in fp32 and embed exactly; their markers tokenize as in the reference. A text of a word or two is generated with a pause and a filler sentence and cut where the filler starts. Against the publisher's code: its seven portable replay fixtures pass; on the model, thirteen greedy requests (four that retry eight times) give its readings, masks, rows and records; and the three token requests give its frames.
BobClawblaw
force-pushed
the
zonos3-laci
branch
from
November 22, 2026 13:04
d19e7f2 to
25a1023
Compare
This branch has not been deployed
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.
What this changes
LACI (
laci: true, heads from--laci-heads) reads a request's place in its text from the alignment heads' attention after every row, rolls a skip, a stall or an early end back to its onset and regenerates under ACI masks; the masked heads run through the same attention kernel over a closed-up cache. The release's 143 extra text rows (phonemes, start, pauses) load in fp32 and embed exactly, and their markers tokenize as in the reference. A text of a word or two (--short-text) is generated with a pause and a filler sentence and cut where the filler starts.zonos3-steering). This pull request adds its last commit; the commits below are the parent's.atc overlap --json: run on the stack's top after the rebase ontoab2c3b27a, came back incomplete (its PR, file and time limits). Of what it checked: textual conflicts with CUDA: #1764's BF16 prompt tile for Qwen ModelOpt, Nemotron and Dory, plus two exact Qwen prompt kernels (#1762) #2008 (1 file), flashnext ranks: every byte after the key proof crosses the pair's link in sealed records #3076 (1), idol: the octree and Gaussian decoders on CUDA (stacked on #1773, #1767; not yet run on a GPU) #1858 (2), EXL3 Flash Next: deep prefill (3/8) #1443 (5), EXL3 Flash Next: expert-parallel TP=2 (same tokens as TP=1) and MTP drafts (2/8) #1442 (5), EXL3 Flash Next on CUDA: one rank, offloaded experts, sm_120 gate (1/8) #1441 (4), GLM on CUDA: the latent split's per-rank page book and owner (TF_GLM_KV_SPLIT, #1431 part 1; stacked on #1411) #2415 (1) and native: Qwen3.5-2B on CUDA attests the execution witness's first path, every weight byte read once the server is ready #2956 (4); clean with flashnext cuda: the opt-in --tp 2 decode graph takes the dense split and keeps its graph across drafted verifies #2982 and Qwen3.5-family CUDA: enable dense MTP drafting #3582; 536 more share files with merges not determined.server/cli.zig(two more paths inArgs.zonos, no new lines),speech_voices.zig,server/speech.zig,core/speech_api.zigandcore/engine_api.zig(SpeechLaci; null means as before),build/server.zig.Checks on this head
25a1023bb, on mainab2c3b27a. The stack was rebuilt on 2026-11-22 without zonos3: the decoder's linear layers through cuBLAS; every request decodes in the stream's chunks #3877 (closed as asked on ZONOS3 Mini (Zyphra/ZONOS3-Mini) text to speech on native CUDA: family proposal and gate #3615), so it now sits on zonos3: several requests at once (--parallel 1 to 16) #3876.ab2c3b27aand on this head: 168 and 168, 0 new (lean_new.py).zig fmt --check,zig build -Dfixed-cpu testandzig build -Dfixed-cpu test-zonos-hostpass.59b76e5a8): the no-GPU CI job's steps, run locally on Linux, all pass:zig fmt --check, the lean check,test-host-a,test-host-b,zig build test,test-kernel-contract,test-golden,test-gradient-serving test-qwen-serving-host test-glm-pdl-scan,test-server-security test-pull-security,fuzz-cortheonandcheck-release-paths, withtest-zonos-host,test-cuda-hostandzig build native -Dsm=120.zonos3-generatecheck in the recipe page,tf-cuda-test kernel-contract zonos3, the served checks and the harness's speech plans (speech,speech-controls,speech-concurrent,speech-steer,speech-laci,speech-edit), all passing.ab2c3b27a(zonos3: several requests at once (--parallel 1 to 16) #3876 conflicts too). The stack is rebased onto main after speech: Drama 3's voices through speech_voices.zig, and sampling defaults through parseFrom #4609 and zonos3: ZONOS3 Mini text to speech on CUDA (voices, reference codes, cloning from a clip) #3720, as ZONOS3 Mini (Zyphra/ZONOS3-Mini) text to speech on native CUDA: family proposal and gate #3615 sets out; CI runs then, and I will classify any failure here.zig fmt --check,zig build testandtest-zonos-host). The GPU contract runs on sm_80, 86, 89 and 121, for want of those cards. The harness quality suite: ZONOS3 has none, and the reference checks above stand for it.Receipt
--parallel 1is 3,833,389,568 bytes (this head's host test).4b21e9ade(rebase, no merge): main now holds core: Drama 3's torch.save reader and WAV code move to core (torch_pth, torch_zip, wav) #3719's reader and Drama 3's voice store (drama_voice_store.zig,--request-voices,--manage-voices), and the stack is fitted to them: a ZONOS3 release's voices are the server'szonos, beside Drama's store, both set up byspeech_voices.start; Drama 3's catalog flags are refused with a ZONOS3 release; the speech field check takes both the inline-voice option and ZONOS3's fields. On the RTX 5090, the stack's top before (f4882ab54) and after (8d7981a91) this rebase served the same 24 requests alone and four at once (voices, the default and a stock voice name, seeds, conditions, controls, a control span, LACI, duration, a short text, a 48 kHz clone, the aligner, an edit, MP3, Opus, FLAC and AAC, streamed and whole PCM,text_normalization): all 48 replies are byte-identical, AAC andtext_normalization: truerefused on both (neither library loaded). With the textnorm library loaded, on the top:text_normalizationleft out equalsfalseon/v1/audio/speechand on/v1/audio/edit, andtruediffers.46c6ee229(22 more commits: other families' kernel registrations and changelog lines, no speech file). Two of the stack's commits changed, both in zonos3: ZONOS3 Mini text to speech on CUDA (voices, reference codes, cloning from a clip) #3720: the ZONOS3 contract images are listed after Inkling 2's, andkernels.zigis re-pinned. On the new heads, the lean check,zig fmt --check,zig build testandtest-zonos-hostpass at every head, the no-GPU CI steps pass on the top (e0c4e7db5), andtf-cuda-test kernel-contract zonos3there gives 41 of 41 kernels and controls with 0 limit problems. The 5090 and Drama 3 A/Bs above were run before this rebase and not repeated.37fa51d23and on toab2c3b27a(104 more commits in all: other families' work, server changes and changelog lines). Of the files the stack changes, main changed the CUDA kernel list,server/cli.zig,server/main.zig,server/root.zig,server/hf_text.zig,core/engine_api.zigand the contract registry; the second rebase applied cleanly, andcli.zigstays within 600 lines. One of the stack's commits changed, in zonos3: ZONOS3 Mini text to speech on CUDA (voices, reference codes, cloning from a clip) #3720:kernels.zigre-pinned after main's new image. On the new heads, the lean check finds 0 new problems at every head. On the new top (535fa5398) the no-GPU CI job's steps,test-zonos-host,test-cuda-hostandzig build nativepass, andtf-cuda-test kernel-contract zonos3gives 41 of 41 kernels and controls with 0 limit problems. The middle heads' tests were not rerun after these rebases; their results above are from the stack on46c6ee229.--laci-heads PATHand--short-text PATH(ZONOS3 only).4b21e9adeagainst the stack's top after the rebase onto it (8d7981a91): threedrama3-generateoutputs (greedy, seeded, clone) a build, andGET /v1/voiceswith four/v1/audio/speechrequests (whole WAV, streamed PCM, sampled, a named voice) from two server starts a build, each both without a catalog and with--voices DIR --default-voice NAME(one voice file made from Drama's own greedy reply). Every sha256 is identical between the two builds and between starts, 17 of 17, the unknown-voice refusal without a catalog included, with no leak or panic line. Speeds were not measured in this run. Drama on CUDA was not run: its load peaks at 48 GB and does not fit the 5090.Checklist
The title and description match the head commit, including the receipt and the stack.
New tests fail before the change, pass after it, and skip cleanly without their dependency.
Comments and docstrings are one line. No measurements or history in the source.
No personal data, machine names, internal hosts or local paths in the diff or its commits. No AI attribution lines.
Every token still goes through the lane rounds. No serial path, and nothing that needs drafts off.
Drafted output equals
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo. (No drafts in this family; prompt chunking and concurrency as above.)No precision traded for speed.
Decode and prompt processing are no slower than main at one stream and the widest admitted (no other family's path changes).