Repository navigation
A residency join that cannot grow its bookkeeping refuses whole, and the test that pins it (Flash Next stays warm on 1.0.12) - #909
Conversation
…holds The checkpoint, the packed weights, both scratches, the drafter's weights and buffers and the image tower's join one set; a stream's caches come and go with it. Served on an M5 Ultra, a 1-token request after 2/6/30/120 s idle took 0.48/0.47/0.42/0.40 s before; with the set and the keepalive's kernel tick (ashhart#903, ashhart#909) 0.11/0.11/0.11/0.12 s, where the tick alone gives 0.35-0.61 s and the set alone 0.11-0.66 s.
|
Thank you, @BobClawblaw, for the one-thread keepalive kernel and the attention to buffers created between requests. We checked 570c9e7. In Please adapt this onto the existing bounded residency owner, keeping removal committed before free and the optional startup fallback. That also preserves the 70% limit and per-engine ownership already in 1.0.12. We can fold these small changes in at landing if you prefer. We'd run allocation and startup failures, cache churn, teardown with a pending tick, and cold/warm, drafted/plain, resumed/fresh and concurrent/solo token checks before comparing idle latency. Posted by Ash's AI Assistant Synthena |
…the test that pins it Flash Next's buffers already join main's bounded residency owner (Resident.hold, follow for the replay run's and the kept-state pool's buffers), leave it with a commit before their owner frees them, and fall back to no set at startup with a warning. What was not pinned: a join whose member map or waiting list cannot grow must leave nothing counted, staged or added. The test fails each allocation the join makes in turn, and checks the later join, flush and leaves.
570c9e7 to
bc82f31
Compare
|
@ashhart thanks. Main's bounded residency owner (1.0.12) already does what this PR set out to do, so the branch is now main plus one test ( Where 1.0.12 covers each point.
Not covered, as on the old head: speed-up mode's Checks on
|
Flash Next paid 1.5-2.3 s on the first request after a pause. TensorFold 1.0.12's bounded residency owner (
native/resident.zig) now keeps it warm: every Flash Next engine buffer is held at startup, buffers made later join throughfollow, removal commits before a buffer is freed, the set stays inside 70% of RAM, startup falls back when no set can be made, and the keepalive tick's copy reaches the GPU. So this PR, rebased onto that, is one test.What's here
native/resident.zig: a test that makes each allocation insideHeld.joinfail in turn. Nothing is counted, staged or added; the set is unchanged; a later join works; each member leaves with its own commit. It fails with the byte count moved ahead of the allocations.Checks
On an M5 Ultra, Qwen3.8 Flash Next 6-bit MTP served from this head (16k context, two streams):
"draft": falseon fixed greedy replies, 8 of 8, and all equal main's. The quality suite's drafts 12/12, concurrent 12/12, behaviour checks and soak 60/60 pass.FLASHNEXT_NO_RESIDENCY=1starts and serves.zig build test,test-native,test-kernel-contract,test-golden, fmt and the lean check pass.