[Chore] Use Transformers v5 names and drop redundant processor use_fast (#58550)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
484c211fe8
commit
d881812500
@@ -26,7 +26,7 @@ import torch
|
||||
import torch.nn as nn
|
||||
from torch import Tensor
|
||||
from torch.nn.functional import gumbel_softmax, pad, softmax
|
||||
from transformers import BatchFeature, PretrainedConfig
|
||||
from transformers import BatchFeature, PreTrainedConfig
|
||||
|
||||
from vllm.config import VllmConfig
|
||||
from vllm.config.multimodal import MultiModalDummyOptions
|
||||
@@ -93,7 +93,7 @@ def st_argmax(y_soft: torch.Tensor, dim: int): # straight-through softmax
|
||||
class VisualTokenizer(torch.nn.Module):
|
||||
def __init__(
|
||||
self,
|
||||
config: PretrainedConfig,
|
||||
config: PreTrainedConfig,
|
||||
quant_config: QuantizationConfig | None = None,
|
||||
prefix: str = "",
|
||||
):
|
||||
@@ -120,7 +120,7 @@ class VisualTokenizer(torch.nn.Module):
|
||||
|
||||
def _init_backbone(
|
||||
self,
|
||||
config: PretrainedConfig,
|
||||
config: PreTrainedConfig,
|
||||
quant_config: QuantizationConfig | None = None,
|
||||
prefix: str = "",
|
||||
) -> nn.Module:
|
||||
@@ -419,7 +419,7 @@ class Ovis(nn.Module, SupportsMultiModal, SupportsPP):
|
||||
config = vllm_config.model_config.hf_config
|
||||
quant_config = vllm_config.quant_config
|
||||
|
||||
self.config: PretrainedConfig = config
|
||||
self.config: PreTrainedConfig = config
|
||||
|
||||
with self._mark_language_model(vllm_config):
|
||||
self.llm = init_vllm_registered_model(
|
||||
|
||||
Reference in New Issue
Block a user