From 875d970dd05e78210ec0693c296f4ed2c2ae8ff6 Mon Sep 17 00:00:00 2001 From: wanglinian Date: Wed, 7 Jan 2026 07:15:54 +0000 Subject: [PATCH] refactor(k2vl): remove unused video-chunk config params Remove temporal_merge_kernel_size, sample_fps, and timestamp_mode from K2VLConfig as they are not used by vLLM. These parameters are loaded from preprocessor_config.json via media_processor and should not be duplicated in the model config. Signed-off-by: wanglinian --- vllm/transformers_utils/configs/k2vl.py | 28 +++++-------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/vllm/transformers_utils/configs/k2vl.py b/vllm/transformers_utils/configs/k2vl.py index 43125ad50dd..34e316c55ca 100644 --- a/vllm/transformers_utils/configs/k2vl.py +++ b/vllm/transformers_utils/configs/k2vl.py @@ -4,8 +4,7 @@ K2-VL Model Configuration. This configuration supports video-chunk as an internal modality type. -A video-chunk is the smallest independently processable unit of video, -typically 4 frames per chunk (temporal_merge_kernel_size=4). +A video-chunk is the smallest independently processable unit of video. """ from transformers import DeepseekV3Config @@ -89,22 +88,15 @@ class K2VLConfig(PretrainedConfig): """K2-VL model configuration. K2-VL extends Kimi-VL with video support using video-chunks. - A video-chunk consists of multiple consecutive frames (default: 4) + A video-chunk consists of multiple consecutive frames that are processed together with temporal pooling. Args: vision_config: Configuration for the vision tower and projector. text_config: Configuration for the text model (DeepseekV3). - - Video-Chunk Parameters: - temporal_merge_kernel_size: Number of frames per video chunk. - sample_fps: Video sampling frame rate. - timestamp_mode: Format for chunk timestamps. - - Other Parameters: - ignore_index: The ignore index for the loss function. - media_placeholder_token_id: The token ID for media placeholders. - pad_token_id: The token ID for padding. + ignore_index: The ignore index for the loss function. + media_placeholder_token_id: The token ID for media placeholders. + pad_token_id: The token ID for padding. """ model_type = "k2_vl" @@ -113,11 +105,6 @@ class K2VLConfig(PretrainedConfig): self, vision_config: dict | K2VLVisionConfig | None = None, text_config: dict | DeepseekV3Config | None = None, - # Video-chunk parameters - temporal_merge_kernel_size: int = 4, - sample_fps: float = 2.0, - timestamp_mode: str = "hh:mm:ss.fff", - # Other parameters ignore_index: int = -100, media_placeholder_token_id: int = 163605, pad_token_id: int = 0, @@ -139,11 +126,6 @@ class K2VLConfig(PretrainedConfig): text_config = DeepseekV3Config(**text_config) self.text_config: DeepseekV3Config = text_config - # Video-chunk config - self.temporal_merge_kernel_size = temporal_merge_kernel_size - self.sample_fps = sample_fps - self.timestamp_mode = timestamp_mode - # Other config self.ignore_index = ignore_index self.media_placeholder_token_id = media_placeholder_token_id