Skip to content

End-to-end validation, parity, benchmarks, and docs #126

Closed

Description

@inureyes

Context

Final integration checkpoint that proves the unified store is correct, measures its payoff on Apple Silicon, and brings the docs in line.

Phase 0 note (ADR 0001, #117): the #117 microbench (examples/page_gather_microbench.rs) measures the attention sub-step only, so its overhead figures (~15-67% single-sequence, higher under batching) dilute at the model level where attention is a fraction of each decode token. End-to-end benchmarks here must measure model-level decode throughput (examples/profile_paged_decode_kernel.rs gives the paged-vs-dense model-level comparison) and must include concurrent / batched-decode scenarios, since Phase 0 found batch amplifies the gather cost far more than context length. See docs/adr/0001-paged-attention-gather-vs-fused-kernel.md.

Tasks

  • Correctness tests: concurrent shared-prefix requests, COW divergence, eviction under block pressure, fragmented block tables, and trim/rewind across shared blocks.
  • Parity vs the dense backend, and vs mlx-lm where applicable.
  • Benchmarks: memory saved per concurrent shared prefix, decode throughput delta vs the dense backend, and prefill tokens avoided. Update docs/model_tests*.md.
  • Docs: add a unified-cache section to docs/turbo-kv-cache.md and docs/en/prompt_cache.md; update docs/CONTINUOUS_BATCHING.md; remove the "Paged backend adopt/donate disabled" note from the prompt-cache Limitations section.

Acceptance criteria

  • All correctness tests pass on Apple Silicon.
  • Benchmark numbers and docs merged.
  • The prompt-cache "Limitations" note about paged adopt is removed because it no longer holds.

Dependencies

Blocked by Phases 4, 5, 6, and the coverage/distributed sub-issues.

Part of #116

Activity

  1. added this to the 0.2.0 milestone on May 27, 2026
  2. added
    status:backlog
    type:test
    area:docs
    on May 27, 2026
  3. inureyes commented on Jun 9, 2026

    @inureyes
    MemberAuthor

    Progress update (B2 complete, B3 next)

    B2 — disaggregated serving role: DONE + merged. The serving-role KV handoff mechanism is now live at the BatchScheduler level, with the hot run() loop untouched.

    • B2a (feat: disaggregated serving-mode plumbing and coordinator skeleton #188): --node-role → ServingMode plumbing through the provider ladder to the worker, plus the ServingCoordinator skeleton (transport seam).
    • B2b (feat: serving-role KV handoff scheduler entries (B2b) #189): the serving-role scheduler entry points — prefill_request_for_handoff (reuse execute_full_prefill, then extract), ingest_handoff_as_active (reconstruct + register a live decode sequence), decode_handoff_until_idle. The serde frame now carries the prefill node's first token (generated_tokens).
    • B2c: in-crate real-model parity (BatchScheduler is pub(crate)). On qwen3-0.6b-4bit: prefill-role extract → ServingCoordinator over MockTransport → decode-role ingest → decode is byte-identical to a single-node scheduler run (16 tokens).

    B3 — live deployment: planned, next.

    • B3a: run_prefill_role / run_decode_role loops on the coordinator + the worker serving-mode flip (a non-hybrid --node-role spawns a role coordinator + tokio runtime), verified in-process over a localhost TcpTransport pair.
    • B3b: real two-process deployment — TcpTransport bind/connect from --prefill-peers / --decode-peers, RequestRouter client routing (Router-mediated), StreamBridge first-token + decode-token merge, with a two-process E2E.
    • B3c: throughput bench + docs, then closes this issue.

    Decisions: routing topology = Router-mediated; verification = in-process (bounded) first, then full two-process.

  4. added a commit that references this issue on Jun 9, 2026
    c2386c6
  5. self-assigned this
    on Aug 31, 2026
  6. added
    status:done
    priority:high
    and removed
    status:backlog
    on Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:docspriority:highstatus:donetype:test

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions