vllm.model_executor.layers.mamba.checkpoint
¶
Classes:
-
MambaPrefillCheckpointBuilder–Build backend-neutral prefill checkpoint locations.
-
MambaPrefillCheckpointExporter–Store each checkpoint's pre-convolution window and recurrent state.
Functions:
-
compute_mamba_prefill_checkpoints–Per-row internal prefill checkpoint offsets and cache block columns.
MambaPrefillCheckpointBuilder
¶
Build backend-neutral prefill checkpoint locations.
Source code in vllm/model_executor/layers/mamba/checkpoint.py
MambaPrefillCheckpointExporter
dataclass
¶
Store each checkpoint's pre-convolution window and recurrent state.
The recurrent states are rows of a buffer the prefill kernel emitted;
recurrent_rows picks each checkpoint row's state out of it, and by
default row i holds checkpoint i's.
Source code in vllm/model_executor/layers/mamba/checkpoint.py
compute_mamba_prefill_checkpoints(seq_lens, query_lens, hash_block_size, mamba_block_size, checkpoint_alignment, drop_eagle_block, cache_hit_alignment_tokens)
¶
Per-row internal prefill checkpoint offsets and cache block columns.
Backends call this instead of re-deriving the rules, so they decline in
lockstep with the scheduler and MambaManager: allocating a checkpoint
block without writing it leaves the prefix cache serving uninitialized
state.
Returns:
-
list[int]–(offsets, cols): the checkpoint's offset into each row's query and -
list[int]–its block-table column.
0and-1mean the row has none.