Skip to content

Roadmap question: prefill/decode disaggregation roles, now that the prefix cache pool exists? #160

Closed

Description

@JCTaz9

Now that the prefix cache pool exists (shared checkpoints with rows, claims/exports, network manager), are there plans for prefill/decode disaggregation? docs/core-design.md currently lists it as outside the design.

We tested a simulated split on two instances: publishing 100K-token prefixes on one and restoring on the other works well (0.12–0.42 s vs ~5 s cold prefill), but a cold request sent to a decode instance still has to prefill there.

Two possible steps, in increasing order of effort:

  1. --role prefill|decode admission filters, so a cache-aware gateway can route cold traffic to prefill workers and warm traffic to decode workers.
  2. Request migration: hand a live request's KV + row through the pool and continue the stream on another instance.

Benchmark numbers available on request.

Activity

  1. added
    triage:design-review
    area:caching
    area:selene
    on Nov 5, 2026
  2. added a commit that references this issue on Nov 6, 2026
  3. yatesdr commented on Nov 18, 2026

    @yatesdr
    Collaborator

    Closing: prefill/decode disaggregation is outside Flare's design. docs/core-design.md (lines 347-348) states "Disaggregated prefill ... outside this design", and request routing across instances (the proposed --role filters and request migration) is cluster orchestration, which AGENTS.md ("Contribution scope and rejection criteria") reserves for an explicit maintainer decision. Thank you for the measurements of prefix publish and restore (0.12-0.42 s against about 5 s cold prefill); they are a useful data point. To reopen, attach the benchmark and request a scope decision from the project owner, Luke Alonso.

  4. fakoli commented on Dec 5, 2026

    @fakoli

    Following @yatesdr's guidance above, here are dual-GPU prefix-cache handoff (1P1D with an external HTTP router over selene-manager) measurements and a request for a scope decision from @lukealonso on whether any supporting primitive belongs upstream.

    (Note: I closed #718 and split out the charter-aligned #455 pool_only() capture-buffer bound by itself into https://github.com/NVIDIA/hyperflare-inference/pull/742.)

    Observed Measurements (2x 96 GiB SM120 Workstation GPUs, 122 GiB Host RAM, 1M Context)

    All 1P1D runs below placed one prefill worker on GPU 0 and one decode worker on GPU 1 connected through a local selene-manager UNIX-socket DRAM pool (22 GiB total across memory + staging).

    1. JMNI-Labs/Inkling-2-Mini (1M context, 1P1D --prefix-cache-memory 8G/4G + 22 GiB Selene vs 2x TP1 stock v0.5.3 replicas):

    • Concurrent / mixed advantage: At 4K C16 (32 requests), 1P1D reached 1,516.6 tok/s aggregate (0.81s TTFO p50). At Mixed C8 (short decode requests mixed with long prompts), 1P1D reached 200.8 tok/s decode p50 (4.67 ms / 5.85 ms ITL p50/p95, 369.0 tok/s aggregate) vs 157.6 tok/s decode p50 (6.34 ms / 8.55 ms ITL) on 2x TP1.
    • Single-stream cold-prefill & host RAM tradeoffs: On uncached C1 ultra-long prompts, 1P1D paid PCIe KV copy-out and copy-in latency (960K TTFO p50: 344.84s vs 173.78s on 2x TP1), used 46.90 GiB combined container memory during the sweep vs 6.74 GiB on 2x TP1 (a later build switching prefill to bounded --prefix-cache-memory 0 and decode to 1G measured 41.77 GiB), and compared against v0.5.3 rather than main.

    2. Qwen4-35B-A3B (1M context, v0.6.0 f705086 + prefill-only/barrier + bounded pool_only() patch, --prefix-cache-memory 0/1G):

    • Under selene-manager --memory 16G --staging 6G (--embedding-table-workers 1): completed 119/119 sweep requests (102/102 capacity/mixed sweeps plus 17/17 C1 max-context ladder requests): C16 4K 32/32 (13.9s wall, 246.9 tok/s decode p50 / 250.4 tok/s mean); Mixed C8 16/16 (303.0 tok/s decode p50 / 309.9 tok/s mean, 9.42s TTFO p50, 100% prefix-cache hit); plus 102/102 multimodal image KV handoff on a 256x256 PNG (>=524K C1 handoff refused with NoWindows = 8 under 6G staging).
    • Switching selene-manager to --memory 6G --staging 16G (matching Arena power-of-two buddy sizing for >8 GiB exports) and --embedding-table-workers 4 resolved NoWindows = 0 with 100% cached tokens on max_tokens=32 probes at 524K (528,059 tokens: 32.4s TTFT, effective 16,292 prompt tok/s) and 960K (960,056 tokens: 69.2s TTFT, effective 13,866 prompt tok/s).
    • Caveat: Qwen4-35B-A3B was measured in 1P1D only and has not been A/B benchmarked against 2x TP1 on main.

    Scope Question for @lukealonso

    Given that cluster request routing stays in an external gateway outside Flare, is any narrow single-instance primitive in scope upstream? Concretely, three options seem distinct:

    1. Pool-visibility ordering primitive only: Keep docs/core-design.md's non-goal against disaggregated serving APIs intact, and consider an internal/optional Selene announce-barrier check so an external tool knows when a finished store publication has reached selene-manager without guessing sleeps.
    2. Minimal opt-in prefill-only mode: Explicitly approve updating docs/core-design.md and expose a bounded prefill-only endpoint / response contract with documented field restrictions and explicit cause distinction between "no pool attached", "not published", and "barrier timeout".
    3. Out of scope: Leave both pool-announce barriers and prefill-only handling out of tree (docs/core-design.md unchanged), and keep upstream selene contributions scoped to pool sizing and shared prefix caching.

    Discord: fakoli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cachingarea:selenetriage:design-review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions