Module high_speed_swap

Module high_speed_swap 

Source
Expand description

2026-09-25: HighSpeedSwap, the high-speed-swap orchestrator. It writes KV blocks to per-layer files (offload_block*) and streams a sequence’s blocks back through a scratch pool into tiled attention (attend_layer*), using the predictor, the file backend and the eviction policy. It also keeps the disk block ids and the per-thread slot (install_local, with_local) through which model code reaches it.

Owner: metrale-storage high-speed swap. Invariants:

  • alloc_disk_block_id reuses ids from free_list before it issues a new id, and never issues one at or above max_blocks_per_layer.

Re-exports§

pub use crate::model_dims::ModelDims;

Structs§

HighSpeedSwap
HighSpeedSwapDiagnostic

Functions§

install_local
2026-09-25: Build an orchestrator and install it on the current thread, dropping any earlier one. On a build error the earlier one stays.
local_installed
2026-09-25: Whether this thread has an installed orchestrator.
with_local
2026-09-25: Run f on this thread’s orchestrator; None when none is installed.