[Model Runner V2][Spec Decode] Add multi-layer MTP speculator (#48892)

Signed-off-by: Giancarlo Delfin <gdelfin@inferact.ai>
This commit is contained in:
Giancarlo Delfin
2026-07-30 15:54:15 -07:00
committed by GitHub
parent 7fe5312332
commit dec13a33b7
9 changed files with 1227 additions and 32 deletions
+5 -1
View File
@@ -15,6 +15,7 @@ class RequestState:
num_speculative_steps: int,
vocab_size: int,
device: torch.device,
num_prefill_lookahead: int = 1,
):
self.max_num_reqs = max_num_reqs
self.max_model_len = max_model_len
@@ -77,7 +78,10 @@ class RequestState:
)
self.next_prefill_tokens = torch.zeros(
self.max_num_reqs, dtype=torch.int32, device=device
num_prefill_lookahead,
self.max_num_reqs,
dtype=torch.int32,
device=device,
)
@property