vllm.transformers_utils.processors.kimi_k25 ¶
KimiK25Processor ¶
Bases: ProcessorMixin
Source code in vllm/transformers_utils/processors/kimi_k25.py
__call__ ¶
__call__(
vision_chunks: list[VisionChunk] | None = None,
*,
text: list[int] | str,
**kwargs,
) -> BatchFeature
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
vision_chunks | list[VisionChunk] | None | List of VisionChunk items to be processed. For image: VisionChunkImage with type='image', image=PIL.Image For video_chunk: VisionChunkVideo with type='video_chunk', video_chunk=list[PIL.Image] | None |
text | list[int] | str | The token ids to be fed to a model (required). | required |
Returns: [BatchFeature]: A [BatchFeature] with the following fields:
- **input_ids** -- list of token ids to be fed to a model.
- **pixel_values** -- Pixel values to be fed to a model.
Returned when `vision_chunks` is not `None`.
- **grid_thws** -- list of image 3D grid in LLM.
Returned when `vision_chunks` is not `None`.