Repository navigation
Conversation
…em, answered on the engine thread between rounds
…ow, as a plain pass leaves it
|
Thanks @Mirrdhyn for putting decision scoring on the engine thread and for the bit-exact last-row test against the plain pass. We are carrying both commits onto current main ourselves, kept as yours, and a separate commit of ours will complete pending asks on every exit path of the engine thread (today - Synthema, Ash's AI Assistant. |
|
Thanks Ash. A priced slot of its own, please. A decision generates no token: it runs one prompt pass and frees its sequence at once. Through ordinary admission, a decision sent while every slot holds a decoding stream waits until a stream finishes, and callers that use decisions as a quick pre-step (ours gives up after 2 s) then fall back. The slot's cost is bounded: fixed recurrent state plus a KV cache sized to the decision's prompt. I have a follow-up on a local branch that touches |
…e ranked scoring Carried onto main: the CUDA build wiring keeps main's own registrations beside the new one. Main holds the architecture contract test inline (zig/build/cuda.zig:285) and #1217's glue host beside it (:286); the scoring host takes the proposal host's place (:287) because zig/build/flashnext_scoring_host.zig:4 calls the proposal host's own steps, so the proposal checks and the score step both run. The file keeps its 600 lines. The worker's exit still closes the scoring queue (zig/src/core/lane_host.zig:522 and zig/src/core/lane_host_score.zig:66), and the ranked vtable still advertises the score hook for one rank only (zig/src/families/flashnext/cuda_lanes.zig:214, :217 and :218).
|
Landed on main as 9761e4e and 76928be, with a maintainer fix-up (1a4b6bf) that completes pending scores when the worker exits and refuses ranked scoring, thank you @Mirrdhyn. /v1/decisions on Flash Next CUDA scores labels from the prompt's last row, answered on the engine thread between rounds. The full host suite passes on main. - Synthema, Ash's AI Assistant. |
|
This shipped in TensorFold 1.1.4: https://github.com/ashhart/TensorFold/releases/tag/v1.1.4 Thank you @Mirrdhyn for the contribution. - Synthema, Ash's AI Assistant. |
What this changes
POST /v1/decisionsnow works with Flash Next on one CUDA GPU. Before this change, the lanes engine did not answer the route.scorehook. The lane host calls it on the engine thread between rounds (lane_host_score.zig). A backend without the hook refuses as it does today.cuda_score.zig). Kernels and arithmetic are unchanged. A two-rank run refuses withUnsupportedRankOperation.Receipt
Environment: TensorFold main
d1018b31plus these two commits, on an NVIDIA DGX Spark (GB10 sm_121), with driver 595.84, nvcc 13.2.86 and Zig 0.17.0. Checkpoint: Flash Next MLX 4-bit with MTP. Server flags:--context 32768 --parallel 2 --prompt-cache-gib 0, withTF_FLASHNEXT_CHUNK=16384.Exactness:
tf-cuda-test flashnext-scoreat 16, 300 and 2,600 prompt tokens. The 5 label logits and the logsumexp equal the plain pass's last row, bit for bit, and the best label is the greedy token. On JevBench, two passes give identical probabilities on 231 of 231 items. Decisions sent while two streams decode 512 tokens are identical to the decisions sent alone, 231 of 231. In the same run,bench_concurrent.py --alone --serial(2 streams, T=0, code and chat prompts) gives 8 of 8 streams equal to their reply alone and 2 of 2 equal to the serial reply.Decision quality and latency: JevBench public set (
fstandhartinger/jevbenchat609a664e), 231 decisions, one request per item. Same machine and same checkpoint, compared with the Python engine 0.6.4 (qwen4_exp):Decode speed: n/a, the decode path is unchanged.
Prompt speed: n/a, the prompt pass is unchanged. A decision is one plain pass.
Tests run:
zig fmt --check: OK.zig build nativeand the install build: OK.zig build test: 575/579 passed (4 skipped).zig build test-cuda-host: 89/89.test-kernel-contract,test-goldenandfuzz-cortheon: OK.lean_check.py: 444 problems, same as main.kernel-contract:SUMMARY 85 kernels: 85 pass gates 1-4, 0 fail, 0 known findings; 7 controls: 7 red as planted, 0 missed; 899 limit problems(no kernel change).tf-cuda-test: 19 suites passed (smoke, symbols, route-rows, experts-rows, flashnext-hc, flashnext-attn, flashnext-dense-hc, flashnext-draft-affine, flashnext-shared, flashnext-nvfp4-tp, norms, norm-rows, sample, projection-f32, mxfp8, quant-ref, modelopt, glue, glm-ref), plusflashnext-score.row[t]→row[t + 1]),flashnext-scorefails withlabel 13's logit is the plain pass's row value (5.25 vs 9.625).Not run:
scorehas no image input.lane_host_score_test.zig), but no Metal machine was run.Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo. Decisions under two decoding streams equal the decisions sent alone.SUMMARYline is above.flashnext-scorefails on the planted bug above. It takes a model and an id file, and is not part of the synthetic suites.