Skip to content

fix(drama): report speech admission units without raising context - #2143

Open
akol1 wants to merge 2 commits into
ashhart:mainfrom
akol1:drama2002/metal-admission
Open

akol1 wants to merge 2 commits into
ashhart:mainfrom
akol1:drama2002/metal-admission

Conversation

@akol1

@akol1 akol1 commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

Explicit Drama frame budgets are honored exactly or refused instead of silently reduced. Current-limit speech admission reports separate assembled-row, request-text-token and acoustic-reference-frame counts, with loaded speech budgets in discovery.

  • Issue: Refs Agree the gate for Drama 3 model-maximum native speech context on Metal and CUDA #2002; no context raise or full-length qualification. Separate structural checker on the fork is not part of this PR.
  • Stacked on: main at 8abb30f. Two admission/documentation commits; no kernel, precision, weight, scheduler or cache-arithmetic changes.
  • atc overlap --json: after rebase, global scan incomplete (pullFilesLimit/pullFilesUnavailable/timeLimit). Fully paginated focused scan covered197 open PRs. Code overlaps2195/2186/2184 merge cleanly; conflicts with2202/2170/2157 also occur against unchanged base. Changelog insertion conflicts2077/2074 removed by relocating our note within Unreleased; all previously clean changelog-only merges remain clean. Older unrelated-history branches remain unknown, not claimed clean. No other branch changed.

Checks on this head

  • Head commit: ac839fd.
  • Lean checker:425 base/425 head, zero new; inherited checker exits1. Same checker on exact base.
  • Tests: zig build test test-golden test-kernel-contract fuzz-cortheon --summary all:700/700steps,9265passed67skipped at7bfb1930d; only CHANGELOG placement changed afterward. Exact current head native apple_m1 build passes; zig build dev-tools --summary all passes230/230steps. zig fmt --check build.zig zig and git diff --check pass. Admission tests cover refusal before submission and explicit/default frame budgets across1025..8192.
  • CI: formatting and Ubuntu/Windows benchmark-client tests passed. Linux Zig, Windows Zig, release-paths and macOS dev-tools CANCELLED, not green: https://github.com/ashhart/TensorFold/actions/runs/41972371497 . Draft retained until complete green CI per maintainer.
  • Not run: CUDA device, Windows runtime and other Metal chips; unavailable locally. Full-length independent fidelity remains unresolved on#2002.

Receipt

  • Environment: current head above, Zig0.17.0, native Metal/apple_m1 build, M4 Pro64GiB macOS27.2. Pinned plotarmordev/drama-3-NVFP4-Pruned494db08481db952f834b2241bce63fb3dfa72554. Binary SHA2561359a9e3a865384d9457f5ccd6c2ce64a455f2a4e45162188bc2a14be64eb62a. Root-run single-device test; the two Macs are independent, not pooled inference.
  • Paths/platforms: shared admission/discovery reaches Metal and CUDA; actual device coverage Metal only. Context1025..8192 and HTTP4096 assembled-row cap unchanged.
  • Exactness: speech PCM is the applicable output, not text token_sha. Current-head public input Hello world., context8192,maxframes8,parallel2,seed1234:3solo+2concurrent responses HTTP200,32768bytes each, SHA256c8ecea016318e716598eb96f2d95e255ada73d0668e8b2f359ffbdd583bc50e9, identical across a fresh exact-base8abb30f6f run and candidateac839fd64:3solo+2concurrent each,10/10 outputs. Base binary SHA2568b1d1440416bbc912fc8239a85622fd2d6112ecb1d46269f4f41b7d10a0cf84d. No long-window requalification claimed.
  • Decode speed: fresh exact-base short solo1.077–1.126s/concurrent1.977–2.153s; candidate solo1.077–1.132s/concurrent1.979–2.155s. No general performance improvement or full-window nonregression claim from this short workload. LLM bench_openai is not speech PCM benchmark.
  • Prompt speed: full-length cold prompt comparison not run on this rebased head. Prior-head long speech/streaming measurements remain in comments and are not relabelled current-head evidence. No full-window audio claim; exact4096-row synthetic served fixture returned empty audio.
  • Licence: n/a; no new weights, drafter or third-party code. Existing stored precision unchanged.

Checklist

  • Title, description and receipt name current head and distinguish historical measurements.
  • Fresh explicit-budget boundary control: the same exhaustive test fails against exact base8abb30f6f (silent trimming instead of NoDramaPromptRoom) and passes against candidateac839fd64 for contexts1025..8192. This does not requalify every historical HTTP control.
  • Complete platform CI remains pending; cancelled jobs are not passes.
  • Source comments/documentation and outgoing commits checked; no private machine paths, logs, assets or tool attribution included.
  • No new serial path, no draft-disabling requirement, no precision change.
  • Full-length independent fidelity and all-stream performance qualification are not established; this is current-limit groundwork, not closure of#2002.

Maintainer-requested rebase preserves main's reasoning-discovery guard and keeps the compatibility note under Unreleased. Device processes stopped and fans restored automatically. Raw device artifacts remain private. Draft until CI green; no merge/release requested.

@akol1

akol1 commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

Final-head short regression check completed for be50fa9 (native binary SHA256 b223f8aa63487f524f2103295239ea20ece62cd37347d7417d4412138fa6058f). Same M4 Pro, pinned checkpoint, context 8192, output budget 8, parallel 2, seed 1234, input Hello world.: baseline and candidate each ran three solo plus two concurrent requests. All ten returned HTTP 200 and byte-identical 32768-byte PCM (SHA256 c8ecea016318e716598eb96f2d95e255ada73d0668e8b2f359ffbdd583bc50e9). Processes stopped and fans restored. This closes the final-head short byte-comparison gap only; full-window fidelity, chunk equality and seam checks remain unqualified. No context raise or performance improvement is claimed.

@ashhart

ashhart commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Thanks @akol1. This keeps the current limits and makes every refusal say which unit ran out, which is the groundwork #2002 needs. Honouring --max-frames exactly instead of trimming it is right; the one value that changes is context − 2, now refused by name, so please add a CHANGELOG line for that and for the new 400 text. Two small things besides: CI hasn't run yet, and drama_admission_test.zig is skipped on Windows without a reason. A one-line comment saying why would do. The 10 byte-identical PCM outputs on the final head are what a draft at the current limits needs.

@akol1

akol1 commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

Addressed in fb18d32: CHANGELOG now names the explicit context-minus-two refusal and the changed HTTP 400 unit text. The Windows guard now explains the Unix socket-pair harness dependency. This follow-up changes documentation/comments only; runtime remains the measured be50fa9 implementation. Format and diff checks passed. CI is still not claimed as passing.

@akol1

akol1 commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

Separate follow-up tooling is available at akol1@53c0a99 (based on be50fa9; no changes to this PR). On the pinned Metal checkpoint, 8186 synthetic prompt rows matched chunk-1 versus chunk-128 state; four forced frames, 23 next-step probes and post-step state/output matched concatenated prefill. Poisoned-KV and resume-at-4096 controls passed; planted bit-flip and omitted-restore controls failed as intended. Full graph: 697/697 steps, 5895 passed, 55 skipped; zero-new lean. Exact-file overlap scan covered 162 PRs; #1850 merges cleanly. This remains synchronized structural evidence, not independent fidelity, concurrent isolation or full-window audio. No cap increase; oracle request on #2002 remains open.

@ashhart

ashhart commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Thanks @akol1, both points are in, and the runtime is the head you measured. Take it out of draft once CI is green and it's ready to land. Thanks too for the structural checks on your fork; they're useful groundwork for the larger window, and we'll come back on #2002 about the oracle.

@akol1

akol1 commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

Could you trigger or approve CI for fb18d32? The Actions API reports zero runs for that exact head, and the PR has no checks attached. The earlier No GPU run on be50fa9 was cancelled; I cannot treat that as green. My upstream permissions are read-only. I will keep this draft until the requested CI condition is satisfied, then mark it ready. Thanks for confirming the admission changes and the forthcoming oracle follow-up.

@akol1

akol1 commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

Tooling follow-up: akol1@016c8f5 adds distinct-history cooperative lane isolation, capped at chunk 128 because admission has a static scratch estimate. Synthetic histories 8186+4 and 8057+6 rows matched their own solo terminal state/output in AB/BA orders; verified-different cross-lane corruption failed. Final capped binary passed the smaller 257/385-row smoke. Separately, distinct HTTP texts/references matched their own solo PCM at 590/635 prompt rows, including one cache hit and one build. These are not full-window served scheduling, audio quality or independent fidelity claims. Full graph 700/700 steps; focused 170-PR overlap scan clean. Current admission draft and limits unchanged; still awaiting CI/oracle guidance.

@akol1

akol1 commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

Additional current-limit receipts: distinct synthetic-reference requests at 3243/3288 assembled rows produced identical own-history PCM fresh, after restoring a 2694-row prefix, and concurrently. Each output was 262144 bytes. One streamed 3243-row request had first audio ready at 100.460s and Darwin lifetime peak physical footprint 10240365928 bytes; these are workload-specific, not full-window measurements. Exact HTTP boundary: 4096 rows admitted but yielded zero samples, so not an audio pass; 4097 refused with named units and unchanged zero prompt/generation/decode counters. Limits and source unchanged. Both devices stopped with fans automatic. Independent oracle and current-head CI remain unresolved; draft retained.

@ashhart

ashhart commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Thanks @akol1. CI hasn't started on fb18d3278, and GitHub won't run it while the PR shows a conflict with main. The code still applies cleanly, so it's only the CHANGELOG slot: a rebase that keeps your line under Unreleased is all it needs, and we'll approve the run if it asks for that. Once CI is green, please take it out of draft. Your later receipts are noted; they don't change anything here.

@akol1

akol1 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Rebase is prepared locally on 8abb30f. Besides CHANGELOG, current main required preserving its info.reasoning guard alongside speech discovery. Host graph: 700/700 steps, 9265 passed, 67 skipped; lean 425 base/head, zero new. Focused scan covered 197 PRs. Code overlaps #2195/#2186/#2184 merge cleanly; #2202/#2170/#2157 have conflicts also present against unchanged main, so I am not treating their whole-branch conflict flags as admission regressions. I am checking the remaining changelog-only overlaps before the lease-protected branch update. No other PR will be modified; old device receipts remain explicitly tied to their original head.

@akol1
akol1 force-pushed the drama2002/metal-admission branch from fb18d32 to ac839fd Compare November 5, 2026 05:10
@akol1

akol1 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Rebased and lease-pushed ac839fd onto 8abb30f. The Drama note remains under Unreleased, moved away from the #2077/#2074 insertion slot; those newly introduced changelog conflicts now merge cleanly. Main’s reasoning-discovery guard is retained. Host checks before that note-only relocation: 700/700 steps, 9265 passed, 67 skipped; lean 425 base/head, zero new; format/diff pass. Older device receipts remain tied to be50fa9, not this rebased binary. The immediate GitHub read still showed the old head, so I have not claimed CI started or turned green. Draft retained pending actual checks.

@akol1

akol1 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Could you rerun the cancelled No GPU jobs on ac839fd? The head is now mergeable. Formatting and both benchmark-client jobs passed, but Linux/Windows Zig, release-paths and macOS dev-tools were cancelled rather than completed. I refreshed the description to the actual head. Its rebuilt Metal binary passed three solo plus two concurrent short speech requests, all byte-identical to the stored baseline; processes stopped and fans restored. I am keeping the draft until the remaining CI checks are green.

@ashhart

ashhart commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Thanks @akol1. We've rerun the cancelled no-GPU jobs on ac839fd64. Once they're green, it's yours to take out of draft.

@akol1
akol1 marked this pull request as ready for review November 5, 2026 08:03
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