Skip to content

[3/3] server: preserve dialogue speaker tags across long-form requests - #7

Draft
krunkosaurus wants to merge 3 commits into
plotarmordev:drama-nvfp4from
krunkosaurus:drama-nvfp4/dialogue-speakers
Draft

krunkosaurus wants to merge 3 commits into
plotarmordev:drama-nvfp4from
krunkosaurus:drama-nvfp4/dialogue-speakers

Conversation

@krunkosaurus

@krunkosaurus krunkosaurus commented Oct 25, 2026 •

Copy link
Copy Markdown

What this changes

Part 3 of the legacy CUDA stack; merge chunking #5 then sampling #6. Incremental source diff.

Accept canonical speaker tags 0..15 in requests, references, catalogs and the native writer, and carry the active role across long-form continuations, history, paragraph shifts and redraws. Original segment slices remain intact; added role text is counted at prompt admission. Existing malformed-tag, body/file/prompt and codebook limits remain enforced. The legacy formats have no new fixed reference-count cap.

The public MLX prompt tests are a behavior reference. Modern source companion #1278 extends the corresponding current route. Native changes are independently implemented.

Receipt and adversarial review

Zig 0.17.0, macOS arm64; synthetic CPU code/PCM fixtures.

  • Isolated legacy speaker candidate: 360/364 passed, four skipped, zero failures.
  • Final composed source 9e782dc9: zig build test-server-cpu -j2 --summary all passes 379/383, four skipped, zero failures.
  • Whole/streamed, reference/CFG, all-ID and malformed-tag cases inspect actual submitted rows. Continuations, paragraph shifts, stripped redraws, history and prompt-budget admission are covered.
  • Independent review exposed a required dependency: the old splitter fragments abcdefghijklmnop<|speaker:15|>abcdefghijklmnopqrstuvwxyz at target 20. The stack includes protected chunking first. A composed HTTP regression now asserts all three complete prompt segments, carried speaker/CFG text, sampling settings and an exact seed above 2^53, for whole and streamed replies.
  • The frozen oracle fixture remains unchanged; exactly its two speaker-zero-only refusal cases are explicitly documented/tested as newly accepted native extensions.
  • Formatting/diff checks pass; zero new lean findings. Six inherited fixture ordering repairs occur once in the prerequisite.
  • Independent review has no open native speaker findings. Recipe documentation correctly distinguishes the modern four-reference cap from legacy admission bounds.

Draft: no CUDA device/model inference, acoustic identity/listening, audio identity or performance qualification. The existing macOS O.DIRECT compilation limitation remains. Speaker tags preserve model roles; distinct or faithfully cloned acoustic voices are not guaranteed or claimed.

Pinned-engine packaging and user documentation: drama-tensorfold companion PR.

Keep complete special tokens, bracketed cues and nested paired tags intact across sentence, clause, space and code-point splitting. Protect topic-shift preprocessing and recognize CJK boundaries without changing prompt or frame ceilings.

Exercise exact whole and streamed prompt segments, oversized spans, malformed controls and redraws. Drain inherited socket fixtures before joining so CPU validation completes on macOS.

Refs: plotarmordev/drama-tensorfold#25
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.

1 participant