feat(distributed): add P2P prefill KV cache network - #159
Merged
FluffyAIcode merged 5 commits intoJul 11, 2026
Conversation
Reuse compatible prefill snapshots across trusted nodes so expensive prompts can skip recomputation while decode remains local. Ship the gossip protocol, streaming KV data plane, dashboard, deployment assets, evidence, and release documentation together. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the ADR, runbook, evidence report, and Worker rollback guide clean for review and release automation. Co-authored-by: Cursor <cursoragent@cursor.com>
Satisfy buf STANDARD naming rules by separating FetchBlocks responses from PublishBlock requests while preserving the chunked wire protocol. Co-authored-by: Cursor <cursoragent@cursor.com>
Bundle the empty dllm compatibility namespace and keep the Mac integration workflow on Transformers 4.x, while leaving the Gemma/K3 production dependency range unchanged. Co-authored-by: Cursor <cursoragent@cursor.com>
Correct the remote A2D Qwen config binding during model import and keep the Mac integration runner on the compatible Transformers 4.x range. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AppendTokens, publish telemetry, and ship a public inference-network dashboard, launchd assets, and a Cloudflare Worker forkakeya.aiWhy
Bounded KV controls resident memory but does not eliminate expensive repeated prompt prefill. Compatible Mac minis have idle unified memory that can serve as an immutable cache tier over Thunderbolt. This change turns that memory into reusable prefill state without adding any network dependency to the per-token decode path.
Live evidence
Gemma 26B MLX 4-bit, 93-token prompt, two M4 Mac minis over Thunderbolt:
Test plan
Architecture and safety
Deployment and rollback
kakeya-inference-networkWorker ownskakeya.ai/*;agent.kakeya.airemains the direct rollback originDocumentation
docs/adr/0016-distributed-prefill-kv-cache-network.mddocs/ops/distributed-prefill-kv-network.mddocs/reports/distributed-prefill-kv-mac-thunderbolt.mdREADME.mdfeature/quickstart/evidence sectionMade with Cursor