[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:
Harry Mellor
2026-09-24 14:14:10 +00:00
committed by GitHub
co-authored by Claude Opus 5.5
parent 484c211fe8
commit d881812500
218 changed files with 869 additions and 813 deletions
@@ -7,7 +7,7 @@ from collections.abc import Iterable
import torch
import torch.nn as nn
from transformers import PretrainedConfig
from transformers import PreTrainedConfig
from vllm.config import VllmConfig
from vllm.model_executor.layers.layernorm import RMSNorm
@@ -30,7 +30,7 @@ from .utils import maybe_prefix
class LongCatMultiTokenPredictorLayer(nn.Module):
def __init__(
self,
config: PretrainedConfig,
config: PreTrainedConfig,
prefix: str,
vllm_config: VllmConfig,
quant_config: QuantizationConfig | None = None,
@@ -353,7 +353,7 @@ class LongCatFlashMTP(nn.Module):
return name
def get_spec_layer_idx_from_weight_name(
self, config: PretrainedConfig, weight_name: str
self, config: PreTrainedConfig, weight_name: str
) -> int | None:
if "model.mtp" in weight_name:
return config.num_hidden_layers * 2