Skip to content

Capped MTP Recurrent Planes

Rocco A edited this page Sep 14, 2026 · 2 revisions

Capped MTP recurrent planes

Integrated MTP normally allocates draft maximum + 1 target recurrent-state planes: one current/input state plus rollback states for the verification span. This feature lets a user retain fewer planes without reducing the configured draft depth.

Control and tradeoff

Use --spec-mtp-rs-planes N. Zero keeps the full default. An explicit value must be from 2 through --spec-draft-n-max + 1.

When rejection falls within the retained horizon, the server restores a directly retained plane. A deeper rejection restores the retained input boundary and deterministically replays the original full verification geometry to reconstruct the accepted boundary. The cap therefore trades persistent VRAM for replay work; it is not free compression.

The feature depends on the separate sparse recurrent snapshot capability contract. Setup fails when the model graph, memory implementation, or backend cannot provide the required selected-state behavior.

Branch implementations

Branch Implementation
beellama/main common/speculative.cpp, tools/server/server-speculative-replay.h
llama/main common/speculative.cpp, tools/server/server-speculative-replay.h
llama/dev common/speculative.cpp, tools/server/server-speculative-replay.h
moe-cache common/speculative.cpp, tools/server/server-speculative-replay.h

Design history: PR 37, cap MTP recurrent rollback planes. Normal MTP selection and acceptance controls remain documented by upstream llama.cpp.

Feature index - MTP setup

Clone this wiki locally