mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-05-25 15:37:59 +08:00
remove
Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu>
This commit is contained in:
parent
330058f9b8
commit
82e591f7eb
@ -1,7 +1,7 @@
|
|||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from typing import Optional, Union
|
from typing import Optional
|
||||||
|
|
||||||
import numba
|
import numba
|
||||||
import numba.types as types
|
import numba.types as types
|
||||||
@ -131,16 +131,6 @@ class RequestState:
|
|||||||
needs_prompt_logprobs = sampling_params.prompt_logprobs is not None
|
needs_prompt_logprobs = sampling_params.prompt_logprobs is not None
|
||||||
self.needs_prompt_logprobs[req_idx] = needs_prompt_logprobs
|
self.needs_prompt_logprobs[req_idx] = needs_prompt_logprobs
|
||||||
|
|
||||||
def append_token_ids(
|
|
||||||
self,
|
|
||||||
req_idx: int,
|
|
||||||
token_ids: Union[list[int], np.ndarray],
|
|
||||||
) -> None:
|
|
||||||
start_idx = self.num_tokens[req_idx]
|
|
||||||
end_idx = start_idx + len(token_ids)
|
|
||||||
self.token_ids[req_idx, start_idx:end_idx] = token_ids
|
|
||||||
self.num_tokens[req_idx] = end_idx
|
|
||||||
|
|
||||||
def remove_request(self, req_id: str) -> None:
|
def remove_request(self, req_id: str) -> None:
|
||||||
req_idx = self.req_id_to_index.pop(req_id, None)
|
req_idx = self.req_id_to_index.pop(req_id, None)
|
||||||
if req_idx is None:
|
if req_idx is None:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user