Skip to content

[3/3] Preserve dialogue speaker roles across all pinned Drama engines - #28

Merged
plotarmordev merged 7 commits into
plotarmordev:mainfrom
krunkosaurus:contrib/dialogue-speakers
Oct 30, 2026
Merged

plotarmordev merged 7 commits into
plotarmordev:mainfrom
krunkosaurus:contrib/dialogue-speakers

Conversation

@krunkosaurus

@krunkosaurus krunkosaurus commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Description and motivation

Accept canonical <|speaker:0|> through <|speaker:15|> tags in speech input and reference transcripts. Untagged input remains speaker 0; malformed and structural tokens still fail validation. This is part 3 of the stack; #26 and #27 have merged. Incremental changes after #27.

Append full-model patch 0015, Metal NVFP4 patch 0006 and CUDA NVFP4 patch 0003, with the Python catalog writer, examples, indexes and checksums. Legacy continuation carries the active speaker across hard cuts, paragraph cuts, history eviction and redraws. CUDA patch 0004 removes the unused Redraws.salt helper requested in #27 without rewriting the merged sampling patch.

Full-model/Metal catalogs and the Python writer retain their four-reference cap; legacy CUDA retains its native body/file/prompt/chunk limits. Retaining the native splitter without the MLX three-speaker grouping cap is intentional and documented. Sixteen valid IDs do not establish acoustic quality for sixteen speakers in one chunk.

Source companions: modern #1278 and legacy #7. The public MLX prompt tests are the behavioral reference; these changes independently extend TensorFold's native prompt builder.

Known limitation

The pinned CUDA full model can fail to emit its stop on short tagged dialogue. A GB10 reproduction with matching speaker 1/15 references reached the 1024-frame cap in 3/5 seeds; untagged controls stopped in 5/5. Relabeling input and references to 0/1 still capped in 2/5, and removing the catalog capped in 1/5. NVFP4 stopped in all five tagged and all five untagged requests, with its default guidance.

The limitation is documented in README-dialogue and tracked separately in #32. The preferred merge path is to include this documented limit and investigate its cause separately, as offered in review. Engine pins, weights and guidance differ; these results do not establish the cause or guarantee NVFP4 reliability.

Validation

  • GB10 CUDA: 34 serial renders, including four synthetic references and 30 diagnostic requests. Mono 44.1 kHz, signed 16-bit PCM; seeds 1–5, temperature 1.0, top-p 0.9, top-k 30. Full-model tagged capped replies contain 47.55 seconds of audio and took 35.59–35.87 seconds to render. Complete settings, per-seed times, hashes and build receipts.
  • Linux CUDA builds/tests on the final sources: full-model 107/107 build steps and 582/582 tests passed; NVFP4 106/106 steps, 870 tests passed and 9 skipped. The initial NVFP4 archive lacked required Git metadata; restoring the exact source metadata made the unchanged code pass. That failed attempt is retained in the result summary.
  • Final cleanup regression: legacy CPU 379 passed, 4 skipped; Python recipe suite 48 tests, 15 skipped, zero failures.
  • All 25 patch checksums and exact manifest coverage verified. Applying all four CUDA patches to the pinned base reproduces the final source e06a0cda byte-for-byte across 3,503 files. The full-model and Metal series are unchanged from their previously verified source trees and successful recipe builds (66/66 and 73/73 steps).
  • All 34 published takes were checked against the retained raw records for inputs, finish reasons, PCM duration, elapsed time and hashes. The existing 88 GiB admission floor, 54 GiB cap and 34 GiB abort floor were unchanged.

This is a stopping diagnostic, not a listening, speaker-identity or performance qualification. Metal inference and the reference Python runtime were not tested in this follow-up. No weights, private voices, recordings or private machine paths are published.

@plotarmordev

Copy link
Copy Markdown
Owner

Thanks for carrying the speaker through long-form continuations so carefully. The tests around hard cuts and redraws are great. Two small things: CUDA patch 0003's subject starts with "Drama speech:", while the series uses server:. I'll adjust that in a small commit on your branch, along with the README line that lists speaker tags as a request-level exception. Also, the drama3-mlx chunker caps a chunk at three speakers; is it intentional that the legacy CUDA split has no such cap? Before merging I want to run a listening check of multi-speaker output on my GB10, since this moves away from the reference's speaker-0-only rule. I'll report back here.

plotarmordev added a commit that referenced this pull request Oct 25, 2026
gpu-checks: GPU check and D1-D4 diagnostic harness for PRs #26-#28
@plotarmordev

Copy link
Copy Markdown
Owner

My CUDA checks for #28 mostly pass: tags 1 and 15 are accepted, untagged requests are unchanged, and when a long-form reply reaches its second segment the continuation carries the right speaker (5 of 8 seeds reached it, all carried correctly).

One thing I'd like your view on before I merge: on the full model (--weights full), a tagged two-speaker line with a catalog voice ran to the frame cap in 3 of 5 seeds (finish=length, 47.55 s for "<|speaker:1|> Is the train here? <|speaker:15|> It arrives at seven fifteen."). The same text untagged stopped normally in 5 of 5, and NVFP4 with the same tags stopped normally too. Do you see a reason the tags could keep the full model from emitting its stop, or is that something you've seen on Metal as well? I'm happy to run any variant you'd like on CUDA, since you can't test it there.

@plotarmordev

Copy link
Copy Markdown
Owner

Hi @krunkosaurus, a gentle nudge on my question above about the full model (--weights full) running to the frame cap with speaker tags (3 of 5 seeds, finish=length). No rush on finding the cause. Mainly I'd like to know how you'd prefer to handle it: fix the full-model case in this PR, or have me merge #28 as it is with that case documented as a known limit, and follow up separately? Either works for me. The rest of my CUDA results look good.

@krunkosaurus

Copy link
Copy Markdown
Contributor Author

Thanks for the detailed CUDA checks, and sorry for the delayed reply. I now have access to a GB10 and am running a bounded reproduction of the tagged full-model case, including the matching-reference catalog setup, before making the merge call. Please keep #28 in draft while I finish that; I will report the results here.

On the earlier three-speaker question: retaining the native splitter's existing limits was intentional. The MLX limit is a per-chunk grouping policy, separate from the model's valid speaker IDs. This change preserves TensorFold's native chunk/prompt/frame limits and carries the active role across its cuts; it does not establish acoustic quality for arbitrary numbers of speakers in one chunk. I will make that distinction explicit in the dialogue documentation. A three-speaker cap would not address the reported two-speaker stopping case.

I am also handling the unused Redraws.salt cleanup from #27. I have seen your #30 for the README and patch-subject touch-ups and will leave those to you.

@krunkosaurus
krunkosaurus marked this pull request as ready for review October 30, 2026 13:29
@krunkosaurus

Copy link
Copy Markdown
Contributor Author

I've reproduced this on a GB10 and would prefer to merge #28 with the full-model stopping case documented, then investigate it separately in #32. The documentation and per-seed results are now pushed in 6cd48e6.

For the same short line, with matching synthetic reference transcripts and seeds 1–5:

Case Natural stop Frame cap
Full, tagged catalog 1/15 2/5 3/5
Full, tags removed, same catalog 5/5 0/5
Full, input and catalog relabeled 0/1 3/5 2/5
Full, tagged built-in voice without references 4/5 1/5
NVFP4, tagged catalog 5/5 0/5
NVFP4, untagged catalog 5/5 0/5

The full-model tagged failures are seeds 1, 2 and 4: HTTP 200 with X-Finish-Reason: length, 47.55 seconds of mono 44.1 kHz PCM, rendered in 35.59–35.87 seconds. Settings and all 34 renders include the four synthetic-reference takes. Neither relabeling nor removing references reliably avoids the problem.

I don't yet have a confirmed cause or a Metal reproduction. The full-model patch admits nonzero speaker tags without changing the existing prompt assembly or stop-selection logic. These profiles also differ in source pin, weights and guidance, so the comparison doesn't isolate the cause. I haven't done a listening review; these are stopping results only.

Both CUDA builds/tests passed. The native splitter policy is now explicit in the dialogue docs, and the unused Redraws.salt cleanup from #27 is included as CUDA patch 0004 with its checksum. I'll leave the README/patch-subject touch-ups in #30 to you as planned. Marking this ready for review with the known limit documented. Thanks for the careful CUDA checks.

@plotarmordev
plotarmordev merged commit f68738e into plotarmordev:main Oct 30, 2026
@plotarmordev

Copy link
Copy Markdown
Owner

Thanks for picking option 2 and for opening #32 to track the cause. I've reviewed the two new commits (patch 0004 and the stopping-limit docs with the results file): the patches apply cleanly on the pinned fork commit, the checksums verify, the tests pass, and the documented numbers match the results file. Merged. I'll add a pointer to the stopping limit in the main README and changelog, and I'll take care of the README and patch-subject touch-ups from #30 on my side.

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.

2 participants