[Enhancement] Refactor OmniInputProcessor and related classes for improved prompt handling
- Updated OmniInputProcessor to streamline input processing, including enhanced handling of prompt embeddings and additional information. - Introduced OmniTextPrompt and OmniEmbedsInputs to support new input structures with optional metadata. - Modified input preprocessing methods to accommodate new prompt types and ensure compatibility with multimodal inputs. - Improved error handling and type checking for data parallel configurations. Signed-off-by: [Your Name] <your.email@example.com> Signed-off-by: tzhouam <tzhouam@connect.ust.hk>
This commit is contained in:
1 parent
b26a9735e6
commit
52d0122fb5
5 files changed
+172
-177
No files matched your search
@@ -1,4 +1,3 @@
|
||||
from vllm.inputs.data import SingletonPrompt
|
||||
from vllm.inputs.parse import (
|
||||
ParsedEmbedsPrompt,
|
||||
ParsedSingletonPrompt,
|
||||
@@ -7,8 +6,12 @@ from vllm.inputs.parse import (
|
||||
ParsedTokensPrompt,
|
||||
)
|
||||
|
||||
from vllm_omni.inputs.data import OmniSingletonPrompt
|
||||
|
||||
def parse_singleton_prompt_omni(prompt: SingletonPrompt) -> ParsedSingletonPrompt:
|
||||
|
||||
def parse_singleton_prompt_omni(
|
||||
prompt: OmniSingletonPrompt,
|
||||
) -> ParsedSingletonPrompt:
|
||||
"""Parse a singleton prompt into a typed parsed prompt.
|
||||
|
||||
Handles omni-specific prompt types including tokens prompts with
|
||||
|
||||
Reference in new issue
Block a user