[Model Runner V2] Support Streaming Inputs (#37028)

Signed-off-by: Santino Ramos <elsantinoramos@gmail.com>
This commit is contained in:
Santino Ramos
2026-03-20 20:42:25 +00:00
committed by GitHub
parent 8bc6b5cdb0
commit 85f671b8e1
7 changed files with 263 additions and 12 deletions
+3 -2
View File
@@ -109,13 +109,14 @@ class RequestState:
self.all_token_ids.apply_write()
self.num_computed_tokens.apply_write()
def remove_request(self, req_id: str) -> None:
def remove_request(self, req_id: str) -> bool:
req_idx = self.req_id_to_index.pop(req_id, None)
if req_idx is None:
# Request not found.
return
return False
self.index_to_req_id.pop(req_idx, None)
self.free_indices.append(req_idx)
return True
def any_prefills(self, idx_mapping_np: np.ndarray) -> bool:
return np.any(