[Feature] Add VidCom2 video token pruning (#47750)
Signed-off-by: Benedikt Falk <bfalk@nvidia.com>
This commit is contained in:
@@ -41,6 +41,7 @@ if TYPE_CHECKING:
|
||||
SpeechToTextParams,
|
||||
VllmConfig,
|
||||
)
|
||||
from vllm.config.multimodal import VideoPruningMethod
|
||||
from vllm.inputs import PromptType, TokensPrompt
|
||||
from vllm.lora.model_manager import LoRAModelManager
|
||||
from vllm.model_executor.layers.fused_moe import MoERunner
|
||||
@@ -424,6 +425,13 @@ class SupportsMultiModalPruning(Protocol):
|
||||
|
||||
supports_multimodal_pruning: ClassVar[Literal[True]] = True
|
||||
|
||||
supported_video_pruning_methods: ClassVar[tuple["VideoPruningMethod", ...]] = (
|
||||
"evs",
|
||||
)
|
||||
"""Video pruning methods (as reported by
|
||||
`MultiModalConfig.get_video_pruning_spec`) implemented by this model.
|
||||
Models supporting methods beyond EVS should override this."""
|
||||
|
||||
def recompute_mrope_positions(
|
||||
self,
|
||||
input_ids: list[int] | torch.Tensor,
|
||||
|
||||
Reference in New Issue
Block a user