You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The fixed recurrent/SSM state is roughly another 160 MiB before convolution state, metadata, and MTP-specific state. Exact sizes must be measured from runtime export rather than assumed from this estimate.
At ideal line rate, a roughly 420 MiB 32K-context state takes approximately:
3.5 seconds over 1 Gb/s;
350 ms over 10 Gb/s;
140 ms over 25 Gb/s; or
90 ms over 40 Gb/s.
Streaming append-only KV pages while later prompt chunks compute can hide most of the bulk transfer. The final recurrent snapshot, MTP state/bookkeeping, import, and commit remain on the uncovered handoff tail.
The current binary protocol is not sufficient as the production transport:
StateImport and StateExport message kinds still exist, but skippy-server rejects them;
MAX_STAGE_STATE_IMPORT_BYTES is 512 MiB;
useful Nemotron contexts can exceed that limit; and
a monolithic Vec<u8> export/import adds allocation and critical-path latency.
Do not simply re-enable the old messages.
Architecture
Roles
Introduce additive phase-role capabilities:
prefill;
decode; and
prefill+decode.
A node may advertise more than one role. Older nodes ignore these optional capabilities and are never selected for a disaggregated topology.
Supported topology shapes
1. Full-prefill to full-decode
Initial correctness implementation:
M3 full target prefill ──► M1 full target decode
Both machines load compatible package revisions. The M1 additionally owns the active MTP/suffix generation path.
2. Split-prefill to collapsed decode
Generalized form:
Prefill stage 0 ─┐
Prefill stage 1 ─┼──► state ranges streamed to decode owner
Prefill stage N ─┘
Each prefill stage exports only the state for its owned layer range. The decode worker may own the complete model and import those ranges into one decode session.
This allows an existing Skippy layer pipeline to compute prefill while avoiding that pipeline during subsequent decode.
The first implementation should prove full-prefill/full-decode before adding split-prefill/collapsed-decode.
Streaming handoff
Attention KV
Attention KV is append-only during prefill and should stream by token page:
Prefill a bounded prompt chunk.
Export completed KV pages for that token range.
Begin sending those pages immediately.
Continue computing the next prompt chunk while transfer proceeds.
Import pages into an uncommitted decoder session as they arrive.
Each chunk is identified by:
handoff id;
package/manifest identity;
state schema version;
layer range;
token range;
KV codec and dtype;
sequence position configuration;
payload length;
checksum; and
final/non-final marker.
Use dedicated backpressured QUIC streams. Do not require a network round trip for every KV page.
Recurrent state
Recurrent/SSM state is overwritten as the prompt advances. Sending a full snapshot after every prompt chunk would waste bandwidth.
For the first implementation:
stream attention KV incrementally;
export and transfer one final recurrent/SSM snapshot after the last prompt chunk; and
import it before handoff commit.
Investigate recurrent deltas only if the final snapshot remains a material uncovered tail.
MTP state
Native MTP consumes target hidden rows and maintains its own context/session bookkeeping. The design must inventory whether Nemotron's MTP context:
shares all required memory with the target context;
has independent attention KV;
requires a separate state export/import; or
can be deterministically reprised from a bounded final hidden-state payload.
Do not enable MTP immediately after handoff until exact equivalence has been proven.
Possible implementations:
Prefiller loads and primes MTPv2, then transfers target and MTP state.
Decoder receives the required hidden-state stream and primes its MTP context concurrently.
Decoder initially runs target-only while a bounded MTP reprime completes.
Option 3 is acceptable only as an explicitly measured fallback; it must not silently report MTP as active.
Suffix N-gram
Dan's suffix N-gram proposer requires no model-state transfer. Send the committed request token history with the handoff and construct its request-local exact-suffix index on the decoder.
History must remain request-local and contain only prompt and target-committed tokens.
Atomic ownership transfer
Use a two-phase handoff:
Coordinator creates a handoff_id.
Decoder reserves an uncommitted session and returns transfer credit.
Prefiller streams state components.
Prefiller sends a final manifest containing component hashes and logical state.
Decoder validates and imports every required component.
Decoder performs an exact continuation probe where required.
Decoder returns CommitAck.
Coordinator changes request affinity to the decoder.
Prefiller may release transient state.
The decoder must never generate from a partially imported session.
The prefiller retains state until commit acknowledgement so that connection loss can retry or safely fall back.
Prefix-cache interaction
The prefill worker should perform exact-prefix lookup before computing missing prompt chunks.
On a prefix-cache hit:
restore the cached target state;
compute only the uncached suffix;
stream restored/new pages using the same handoff contract; and
report cached versus newly computed state separately.
For hybrid families, prefix reuse must include attention KV plus recurrent state. KV-only reuse remains invalid.
The decoder may retain imported state for request affinity, but the design must not introduce a standalone KV server. State remains owned by Skippy runtimes and Mesh routing.
Placement and eligibility
Disaggregation must be cost-based, not always enabled.
both peers advertise the required state schema and role capabilities;
package and tokenizer identities match;
the link has recent bandwidth and RTT measurements;
estimated state fits decoder memory;
estimated handoff beats recompute or the best non-disaggregated topology; and
the relevant family has exact state-handoff certification.
Bandwidth should dominate bulk-transfer eligibility. RTT still matters for reservation, final commit, cancellation, and first-token latency.
When the link degrades, stop admitting new disaggregated requests and fall back to a supported local or layer-split topology. Do not migrate an active decoder session without another exact handoff.
Scheduler relationship
This issue owns:
cross-role placement;
exact state schema;
streaming handoff transport;
atomic ownership transfer;
cost-based routing; and
disaggregation correctness/economics.
#1416 owns iteration-level scheduling and concurrency within each worker.
A single-request correctness prototype can precede #1416. Production multi-request cutover requires #1416 or an equivalent scheduler so that:
the prefiller can queue/chunk multiple prompts;
the decoder can continuously batch active sessions;
prefill and decode overlap without one runtime lock serializing both; and
KV pressure is handled through admission rather than allocation failure.
Protocol compatibility
Mesh protocol additions must be additive:
optional phase-role capability advertisement;
optional exact-state schema/codec capabilities;
new dedicated handoff stream type;
versioned state-component headers; and
explicit unsupported-capability fallback.
Never route a disaggregated request through an older peer lacking the capability. Existing mixed-version layer serving must remain functional.
The Skippy native ABI should add only the state streaming/chunking primitives required for exact export/import. Bump the Skippy ABI version and Rust mirror together for any new symbols.
Security and privacy
Transferred state can encode private prompt content.
Requirements:
transfer only across authenticated mesh peers;
retain QUIC transport encryption;
bind payload identity to the request and destination;
enforce request/tenant isolation;
do not log tokens, state contents, or content-derived hashes;
do not persist transferred state by default;
bound retained source state and erase it after commit/abort; and
reject replayed, cross-model, cross-session, or cross-tenant handoffs.
Telemetry
Emit per handoff:
source and destination role;
prompt tokens;
cache-hit and newly computed tokens;
bytes by state component;
export, queue, wire, import, and commit time;
amount of transfer overlapped with prefill;
uncovered handoff-tail time;
measured bandwidth and RTT;
retry/fallback reason;
target and MTP state readiness;
first-token delay after prefill; and
end-to-end TTFT/TPOT/goodput.
Do not include prompt content or stable content fingerprints.
Correctness gates
Use and extend skippy-correctness state-handoff.
For Nemotron-H, compare local continuation with remote-import continuation across:
prompt lengths: 1K, 8K, 32K, 64K;
cold and prefix-cache-assisted prefill;
target-only decode;
MTP-only decode;
MTP plus suffix N-gram;
cancellation during transfer;
connection loss before commit;
duplicate/replayed chunks; and
mismatched model, tokenizer, state schema, dtype, and layer range.
Deterministic next-token/logit and generated-token output must match the non-disaggregated target.
Add representative gates for dense KV, ISWA, and recurrent/hybrid families before making the mode generic.
Performance matrix
Compare:
M3 all-in-one.
M1 all-in-one.
Existing M1/M3 layer split.
M3 full prefill to M1 full decode.
Split-prefill to M1 collapsed decode.
Disaggregation with exact-prefix cache.
Disaggregation with MTP.
Disaggregation with MTP plus suffix N-gram.
Sweep:
prompt lengths;
output lengths;
concurrency;
prefix hit rates;
link bandwidth: 1/10/25/40/100 Gb/s;
RTT and packet loss;
prefill chunk/page sizes; and
MTP/suffix proposal settings.
Primary metric: goodput at fixed TTFT and TPOT SLOs.
Also report single-request latency. Disaggregation must not be advertised as universally faster if its benefit exists only with long prompts or concurrent phase overlap.
Cutover gate
Enable automatic disaggregated placement only when:
exact continuation parity passes;
no partially imported state can generate;
overload queues or falls back rather than producing an allocation failure;
the cost model rejects unsuitable links and short prompts;
an eligible high-bandwidth topology beats the best non-disaggregated baseline on goodput at the target SLO;
state-transfer memory remains bounded under concurrency;
MTP and suffix attribution remains correct after handoff; and
link failure produces a safe retry, recompute, or fail-closed response.
Goal
Add a phase-disaggregated Mesh serving mode in which prefill and decode may run on different machines or topologies:
Initial lab target:
This is phase disaggregation, not ordinary layer splitting.
Motivation
Current layer splitting distributes every decode token across the stage pipeline. That retains a network dependency on every generated token.
Phase disaggregation instead pays one prompt-state transfer:
Once the handoff commits, decode is local to the M1. This can:
It will not necessarily improve a single short request. The topology must only be selected when measured state-transfer economics predict a benefit.
Key constraint: this is hybrid state, not just KV
Nemotron 3 Super contains:
An exact handoff must include every state component required for continuation:
A KV-only handoff is not correct for Nemotron-H.
State-transfer economics
For Nemotron Super with F16 KV:
Approximate attention-KV payloads:
The fixed recurrent/SSM state is roughly another 160 MiB before convolution state, metadata, and MTP-specific state. Exact sizes must be measured from runtime export rather than assumed from this estimate.
At ideal line rate, a roughly 420 MiB 32K-context state takes approximately:
Streaming append-only KV pages while later prompt chunks compute can hide most of the bulk transfer. The final recurrent snapshot, MTP state/bookkeeping, import, and commit remain on the uncovered handoff tail.
The current binary protocol is not sufficient as the production transport:
StateImportandStateExportmessage kinds still exist, butskippy-serverrejects them;MAX_STAGE_STATE_IMPORT_BYTESis 512 MiB;Vec<u8>export/import adds allocation and critical-path latency.Do not simply re-enable the old messages.
Architecture
Roles
Introduce additive phase-role capabilities:
prefill;decode; andprefill+decode.A node may advertise more than one role. Older nodes ignore these optional capabilities and are never selected for a disaggregated topology.
Supported topology shapes
1. Full-prefill to full-decode
Initial correctness implementation:
Both machines load compatible package revisions. The M1 additionally owns the active MTP/suffix generation path.
2. Split-prefill to collapsed decode
Generalized form:
Each prefill stage exports only the state for its owned layer range. The decode worker may own the complete model and import those ranges into one decode session.
This allows an existing Skippy layer pipeline to compute prefill while avoiding that pipeline during subsequent decode.
The first implementation should prove full-prefill/full-decode before adding split-prefill/collapsed-decode.
Streaming handoff
Attention KV
Attention KV is append-only during prefill and should stream by token page:
Each chunk is identified by:
Use dedicated backpressured QUIC streams. Do not require a network round trip for every KV page.
Recurrent state
Recurrent/SSM state is overwritten as the prompt advances. Sending a full snapshot after every prompt chunk would waste bandwidth.
For the first implementation:
Investigate recurrent deltas only if the final snapshot remains a material uncovered tail.
MTP state
Native MTP consumes target hidden rows and maintains its own context/session bookkeeping. The design must inventory whether Nemotron's MTP context:
Do not enable MTP immediately after handoff until exact equivalence has been proven.
Possible implementations:
Option 3 is acceptable only as an explicitly measured fallback; it must not silently report MTP as active.
Suffix N-gram
Dan's suffix N-gram proposer requires no model-state transfer. Send the committed request token history with the handoff and construct its request-local exact-suffix index on the decoder.
History must remain request-local and contain only prompt and target-committed tokens.
Atomic ownership transfer
Use a two-phase handoff:
handoff_id.CommitAck.The decoder must never generate from a partially imported session.
The prefiller retains state until commit acknowledgement so that connection loss can retry or safely fall back.
Prefix-cache interaction
The prefill worker should perform exact-prefix lookup before computing missing prompt chunks.
On a prefix-cache hit:
For hybrid families, prefix reuse must include attention KV plus recurrent state. KV-only reuse remains invalid.
The decoder may retain imported state for request affinity, but the design must not introduce a standalone KV server. State remains owned by Skippy runtimes and Mesh routing.
Placement and eligibility
Disaggregation must be cost-based, not always enabled.
The planner should estimate:
Select a disaggregated topology only when:
Bandwidth should dominate bulk-transfer eligibility. RTT still matters for reservation, final commit, cancellation, and first-token latency.
When the link degrades, stop admitting new disaggregated requests and fall back to a supported local or layer-split topology. Do not migrate an active decoder session without another exact handoff.
Scheduler relationship
This issue owns:
#1416 owns iteration-level scheduling and concurrency within each worker.
A single-request correctness prototype can precede #1416. Production multi-request cutover requires #1416 or an equivalent scheduler so that:
Protocol compatibility
Mesh protocol additions must be additive:
Never route a disaggregated request through an older peer lacking the capability. Existing mixed-version layer serving must remain functional.
The Skippy native ABI should add only the state streaming/chunking primitives required for exact export/import. Bump the Skippy ABI version and Rust mirror together for any new symbols.
Security and privacy
Transferred state can encode private prompt content.
Requirements:
Telemetry
Emit per handoff:
Do not include prompt content or stable content fingerprints.
Correctness gates
Use and extend
skippy-correctness state-handoff.For Nemotron-H, compare local continuation with remote-import continuation across:
Deterministic next-token/logit and generated-token output must match the non-disaggregated target.
Add representative gates for dense KV, ISWA, and recurrent/hybrid families before making the mode generic.
Performance matrix
Compare:
Sweep:
Primary metric: goodput at fixed TTFT and TPOT SLOs.
Also report single-request latency. Disaggregation must not be advertised as universally faster if its benefit exists only with long prompts or concurrent phase overlap.
Cutover gate
Enable automatic disaggregated placement only when:
Implementation tasks
Non-goals
Dependencies and references
crates/skippy-runtime/src/kv_pages.rscrates/skippy-correctnessstate-handoff harnessdocs/skippy/SUFFIX_NGRAM_PROPOSER.md