Organize code (rename, movement) (#953)

This commit is contained in:
Liangsheng Yin
2024-08-06 20:50:32 -07:00
committed by GitHub
parent ad56e68495
commit 87e8c090e9
29 changed files with 304 additions and 289 deletions

View File

@@ -50,8 +50,9 @@ import torch
import torch.distributed as dist
from sglang.srt.hf_transformers_utils import get_tokenizer
from sglang.srt.managers.schedule_batch import Batch, ForwardMode, Req
from sglang.srt.managers.schedule_batch import Req, ScheduleBatch
from sglang.srt.model_config import ModelConfig
from sglang.srt.model_executor.forward_batch_info import ForwardMode
from sglang.srt.model_executor.model_runner import ModelRunner
from sglang.srt.sampling_params import SamplingParams
from sglang.srt.server_args import ServerArgs
@@ -188,7 +189,7 @@ def prepare_synthetic_inputs_for_latency_test(batch_size, input_len):
def extend(reqs, model_runner):
batch = Batch.init_new(
batch = ScheduleBatch.init_new(
reqs=reqs,
req_to_token_pool=model_runner.req_to_token_pool,
token_to_kv_pool=model_runner.token_to_kv_pool,