[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
@@ -10,7 +10,7 @@ import numpy as np
|
||||
import torch
|
||||
import torch.nn as nn
|
||||
from transformers import ParakeetEncoder as HFParakeetEncoder
|
||||
from transformers import PretrainedConfig
|
||||
from transformers import PreTrainedConfig
|
||||
from transformers.audio_utils import mel_filter_bank
|
||||
|
||||
from vllm.logger import init_logger
|
||||
@@ -47,7 +47,7 @@ class ParakeetProjection(nn.Module):
|
||||
class ProjectedParakeet(nn.Module):
|
||||
def __init__(
|
||||
self,
|
||||
config: PretrainedConfig,
|
||||
config: PreTrainedConfig,
|
||||
*,
|
||||
dtype: torch.dtype,
|
||||
llm_hidden_size: int,
|
||||
@@ -135,7 +135,7 @@ LOG_ZERO_GUARD_VALUE = 2**-24
|
||||
|
||||
|
||||
class ParakeetExtractor:
|
||||
def __init__(self, config: PretrainedConfig) -> None:
|
||||
def __init__(self, config: PreTrainedConfig) -> None:
|
||||
self.config = ExtractorConfig.from_hf_config(config)
|
||||
"""`config` is named *exactly* for `._get_subsampling_output_length` below"""
|
||||
self._clip_target_samples = int(
|
||||
@@ -329,6 +329,6 @@ class ParakeetExtractor:
|
||||
}
|
||||
|
||||
@staticmethod
|
||||
def audio_length(raw_config: PretrainedConfig, audio_tokens: int) -> int:
|
||||
def audio_length(raw_config: PreTrainedConfig, audio_tokens: int) -> int:
|
||||
config = ExtractorConfig.from_hf_config(raw_config)
|
||||
return int(audio_tokens * config.subsampling_factor * config.hop_length)
|
||||
|
||||
Reference in New Issue
Block a user