-
Notifications
You must be signed in to change notification settings - Fork 11
Add tokenizer #394
Add tokenizer #394
Changes from all commits
30a4f4d
bd27519
11d4de5
9dadae6
8edd734
a4fc498
b73c5da
7266719
38f6568
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,8 @@ | |
from transformers import PreTrainedTokenizer | ||
|
||
import vllm.envs as envs | ||
from vllm.config import DecodingConfig, EngineConfig, ModelConfig | ||
from vllm.config import (DecodingConfig, EngineConfig, LoRAConfig, ModelConfig, | ||
ParallelConfig, SchedulerConfig) | ||
from vllm.core.scheduler import SchedulerOutputs | ||
from vllm.engine.arg_utils import AsyncEngineArgs | ||
from vllm.engine.async_timeout import asyncio_timeout | ||
|
@@ -924,6 +925,14 @@ async def get_model_config(self) -> ModelConfig: | |
else: | ||
return self.engine.get_model_config() | ||
|
||
async def get_parallel_config(self) -> ParallelConfig: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can these new methods go into the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I dont think they should be in the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah yeah I see these are only on the AsyncLLMEngine, 🌶️ |
||
"""Get the parallel configuration of the vLLM engine.""" | ||
if self.engine_use_ray: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these ...a change for another day, or week There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good idea |
||
return await self.engine.get_parallel_config.remote( # type: ignore | ||
) | ||
else: | ||
return self.engine.get_parallel_config() | ||
|
||
async def get_decoding_config(self) -> DecodingConfig: | ||
"""Get the decoding configuration of the vLLM engine.""" | ||
if self.engine_use_ray: | ||
|
@@ -932,6 +941,22 @@ async def get_decoding_config(self) -> DecodingConfig: | |
else: | ||
return self.engine.get_decoding_config() | ||
|
||
async def get_scheduler_config(self) -> SchedulerConfig: | ||
"""Get the scheduling configuration of the vLLM engine.""" | ||
if self.engine_use_ray: | ||
return await self.engine.get_scheduler_config.remote( # type: ignore | ||
) | ||
else: | ||
return self.engine.get_scheduler_config() | ||
|
||
async def get_lora_config(self) -> LoRAConfig: | ||
"""Get the lora configuration of the vLLM engine.""" | ||
if self.engine_use_ray: | ||
return await self.engine.get_lora_config.remote( # type: ignore | ||
) | ||
else: | ||
return self.engine.get_lora_config() | ||
|
||
async def do_log_stats( | ||
self, | ||
scheduler_outputs: Optional[SchedulerOutputs] = None, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print!