This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
forked from vllm-project/vllm
-
Notifications
You must be signed in to change notification settings - Fork 10
Add tokenizer #394
Merged
robertgshaw2-redhat
merged 9 commits into
isolate-oai-server-process
from
add-tokenizer
Jul 31, 2024
Merged
Add tokenizer #394
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
30a4f4d
pass configs
robertgshaw2-redhat bd27519
almost there
robertgshaw2-redhat 11d4de5
formatted
robertgshaw2-redhat 9dadae6
comment
robertgshaw2-redhat 8edd734
better comment
robertgshaw2-redhat a4fc498
another typo
robertgshaw2-redhat b73c5da
fix provate method
robertgshaw2-redhat 7266719
fix provate method
robertgshaw2-redhat 38f6568
fixed plumbing
robertgshaw2-redhat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
"""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, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
can these new methods go into the
VLLMBackend
protocol as well?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.
I dont think they should be in the
protocol
because the Protocol does not have to implement these + most of the time the Protocol will not implement theseThere 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.
ah yeah I see these are only on the AsyncLLMEngine, 🌶️