Skip to content

vllm.model_executor.layers.mamba.checkpoint

Classes:

Functions:

MambaPrefillCheckpointBuilder

Build backend-neutral prefill checkpoint locations from scheduler plan.

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. Layers with only a conv state pass no recurrent buffers. token_indices maps the rows' tokens, laid out by cu_seqlens, to their rows of raw_qkv.

align_mamba_prefill_checkpoints(checkpoints, req_ids)

Map scheduler prefill checkpoints from req_id to batch row index.