Skip to content

[2/3] server: expose request sampling controls for Drama CUDA - #6

Draft
krunkosaurus wants to merge 2 commits into
plotarmordev:drama-nvfp4from
krunkosaurus:drama-nvfp4/sampling-controls
Draft

krunkosaurus wants to merge 2 commits into
plotarmordev:drama-nvfp4from
krunkosaurus:drama-nvfp4/sampling-controls

Conversation

@krunkosaurus

@krunkosaurus krunkosaurus commented Oct 25, 2026 •

Copy link
Copy Markdown

What this changes

Part 2 of the legacy CUDA stack; merge protected chunking #5 first. Incremental source diff.

Expose the same request controls as modern TensorFold #1277: temperature, top_p, top_k in 1..64 and exact u64 seed. Whole/streamed speech, references, CFG, long-form history and redraws retain the selected values. Each long-form segment starts with the supplied seed; retries within that segment add their attempt ordinal with wrap. Omitted/null settings preserve the existing prompt-hash/default policy.

The public MLX API is a behavior reference. Native code is independently implemented; legacy sampling arithmetic/RAS is unchanged.

Receipt

Zig 0.17.0, macOS arm64, synthetic CPU code/PCM fixtures:

  • Isolated legacy contribution: 360/364 tests passed, four skipped, zero failures.
  • Final composed chunking/sampling/speaker tree: 379/383 passed, four skipped, zero failures. The combined hard-cut test asserts tag continuity, CFG text, all settings and an exact seed above 2^53.
  • Tests cover numeric/type boundaries, parsed-f64 underflow semantics, exact u64 limits, before-submit rejection, whole/streamed requests, prompt rebuilding, Busy retry reuse, per-segment seed reset and silence/register redraws.
  • Formatting/diff checks pass; no new lean findings.
  • Independent adversarial agent review resolved the f64 documentation boundary and verified native retry/segment propagation. Existing socket-fixture read-before-join repairs are inherited once from server: preserve controls and CJK boundaries in long-form speech #5.

Draft: no CUDA device/model, acoustic listening, audio identity or performance qualification. The base's O.DIRECT use prevents CUDA host compilation on this Mac. No guard was weakened and no speed/quality or cross-backend byte-parity claim is made.

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