/ Модель

Характеристики

Лицензия
Apache 2.0
Библиотека
codon
Опубликована
9 сен 2026

Whisper-Tiny-Encoder

ЭмбеддингиТекст → embedding
0скачиваний за 30 дней0лайковвеса обновлены9 сен 2026

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

Энкодер Whisper Tiny для извлечения признаков из аудио в пайплайнах codon, без самостоятельной транскрипции речи.

CodonProject подготовил encoder-only вариант аудиоэнкодера openai/whisper-tiny: веса преобразованы к соглашениям именования библиотеки codon и сохранены в формате safetensors в fp16. Это двунаправленный Transformer-энкодер Whisper с pre-LN, 8,21 млн параметров и размерностью скрытого представления 384; он извлекает признаки из аудио для последующей обработки другими компонентами. Модель рассчитана на вход в виде mel-спектрограмм и выдаёт последовательность векторов признаков с частотой 50 токенов в секунду.

Энкодер предназначен для построения аудиопайплайнов и передачи речевых признаков последующим моделям, например с усредняющим downsampling. Самостоятельно распознавать речь и выдавать текст он не может: декодер и токенизатор отсутствуют. Whisper обрабатывает окна длительностью до 30 секунд; короткие записи требуется дополнить до 3000 mel-кадров, а энкодер не поддерживает потоковую обработку из-за двунаправленного внимания.

Веса скопированы из openai/whisper-tiny, переименованы и сохранены в fp16; README сообщает о проверке совпадения реализации с официальным Transformers-энкодером. Для запуска требуется codon-model версии 0.0.7b8. Лицензия — Apache-2.0.

Сценарии применения

  • извлечение признаков речи из mel-спектрограмм
  • подготовка аудиовекторов для последующей языковой модели
  • построение пайплайна распознавания речи с отдельным декодером

Ограничения

Модель содержит только энкодер и не может транскрибировать аудио без отдельного декодера и токенизатора. Она не поддерживает потоковую обработку; короткие записи нужно дополнять до 3000 mel-кадров, а запуск непосредственно в fp16 может давать численное отклонение около 6e-2.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Бенчмарки пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь рядом с другими моделями теста

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Эмбеддинги» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы по шкале 0–100.

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Whisper-Tiny Audio Encoder (codon format)

Encoder-only weights of openai/whisper-tiny, re-keyed into the naming convention used by the codon library so they can be loaded into codon.block.model.WhisperTinyAudioEncoder with a single call.

This is a feature extractor, not a speech-to-text model: the decoder and the tokenizer are intentionally not included, so it cannot transcribe audio on its own.

Files

FileSizeTensorsDescription
whisper_tiny_encoder.safetensors15.7 MB67Encoder weights, fp16, codon key convention

Model details

ArchitectureWhisper encoder (pre-LN Transformer, bidirectional self-attention)
Parameters8,208,384 (8.21M)
d_model384
Encoder layers4
Attention heads6 (head dim 64)
FFN dim1536, GELU
Mel bins80
Max positions1500
Output[B, T/2, 384] for input mel [B, 80, T]
Precisionfp16 (upcast to fp32 on load for fp32 execution)
LicenseApache-2.0

Requirements

pip install codon-model==0.0.7b8

Source: CodonProject/codon-model

Usage

import torch
from codon.block.model import WhisperTinyAudioEncoder

encoder = WhisperTinyAudioEncoder(pool_stride=1)
encoder.load('whisper_tiny_encoder.safetensors', strict=True)
encoder = encoder.float()               # weights are fp16; upcast for fp32 execution
encoder.eval()

mel = torch.randn(1, 80, 3000)          # 30 s of log-mel @ 100 Hz
with torch.no_grad():
    hidden, _ = encoder(mel)
print(hidden.shape)                     # torch.Size([1, 1500, 384])

Half-precision execution is also supported — just call .half() and feed a half-precision mel instead (expect a larger numerical drift, ~6e-2, since the arithmetic itself runs in fp16):

Loading straight from this repository:

encoder = WhisperTinyAudioEncoder().from_remote()

Downsampling for LLM consumption

The raw encoder emits one token per 20 ms (50 tokens/s), which is usually far too dense for a language model. pool_stride appends a non-overlapping average pool after the encoder (weights are unaffected):

encoder = WhisperTinyAudioEncoder(pool_stride=8)
encoder = encoder.float()
with torch.no_grad():
    hidden, _ = encoder(torch.randn(1, 80, 3000))
print(hidden.shape)                     # torch.Size([1, 187, 384]) -> 6.25 tokens/s

Tensor naming

Keys follow the codon convention (proj_* for projections). The full layout:

conv1.weight                      (384, 80, 3)
conv1.bias                        (384,)
conv2.weight                      (384, 384, 3)
conv2.bias                        (384,)
embed_positions.weight            (1500, 384)
layers.{0..3}.attn_norm.weight    (384,)
layers.{0..3}.attn_norm.bias      (384,)
layers.{0..3}.attn.proj_q.weight  (384, 384)
layers.{0..3}.attn.proj_q.bias    (384,)
layers.{0..3}.attn.proj_k.weight  (384, 384)     # no bias
layers.{0..3}.attn.proj_v.weight  (384, 384)
layers.{0..3}.attn.proj_v.bias    (384,)
layers.{0..3}.attn.proj_o.weight  (384, 384)
layers.{0..3}.attn.proj_o.bias    (384,)
layers.{0..3}.fn_norm.weight      (384,)
layers.{0..3}.fn_norm.bias        (384,)
layers.{0..3}.mlp.proj_fc1.weight (1536, 384)
layers.{0..3}.mlp.proj_fc1.bias   (1536,)
layers.{0..3}.mlp.proj_fc2.weight (384, 1536)
layers.{0..3}.mlp.proj_fc2.bias   (384,)
norm.weight                       (384,)
norm.bias                         (384,)

Note that proj_k has no bias — this mirrors the original Whisper design (its k_proj is the only projection without a bias in both the encoder and the decoder). The positional table uses Whisper's own layout: weight[:, :192] holds sine values and weight[:, 192:] holds cosine values for inv_freq = exp(-log(10000) * arange(192) / 192).

Provenance and verification

Weights are copied from openai/whisper-tiny (model.encoder.*), renamed, and saved as fp16. No values were modified: converting the fp32 export to fp16 and back to fp32 is bit-exact element-wise, i.e. the source values already only carried fp16 precision (max absolute weight magnitude is ~16, well inside fp16 range).

The codon implementation was verified against the official transformers implementation (WhisperModel(...).encoder) with both models loading the same checkpoint (upcast to fp32) and consuming the same input:

mel lengthoutput shapemax abs difference
3000[2, 1500, 384]5.9e-05
1000 (padded)[2, 500, 384]3.9e-05
512 (padded)[2, 256, 384]2.2e-05

Differences are at fp32 rounding level, not implementation differences.

Limitations

  • Encoder only. No decoder, no vocabulary, no tokenizer — cannot produce text.
  • Fixed 30 s input. Whisper pads every input to 3000 mel frames. Short clips must be zero-padded to 3000 and the padded output frames discarded; the padded region does influence the valid region through convolution and LayerNorm, so it is not equivalent to running the encoder on a shorter input.
  • Not causal / not streaming. The encoder is bidirectional and stateless, so it cannot be used for incremental streaming without recomputing a full window.
  • Precision. Tensors are stored as fp16. The fp32 -> fp16 -> fp32 round trip is element-wise exact, so no information was lost relative to the source export, and running the model in fp32 after upcasting reproduces the fp32 reference exactly. Native fp16 execution (model.half()) is supported but introduces the usual half-precision drift (~6e-2 on this model).

Citation

If you use these weights, please cite the original work:

@misc{radford2022whisper,
  doi = {10.48550/ARXIV.2212.04356},
  url = {https://arxiv.org/abs/2212.04356},
  author = {Radford, Alec and Kim, Jong Wook and Xu, Tao and Brockman, Greg and McLeavey, Christine and Sutskever, Ilya},
  title = {Robust Speech Recognition via Large-Scale Weak Supervision},
  publisher = {arXiv},
  year = {2022},
  copyright = {arXiv.org perpetual, non-exclusive license}
}

Acknowledgements

Original model by OpenAI. This repository only re-keys the encoder weights for use with codon.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · codon

Можно запустить

Подбираем GPU…

Ревизия весов
6a72adb

0 моделей