/ Модель

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

Лицензия
Gemma
Базовая модель
embeddinggemma-2
Библиотека
sentence-transformers
Опубликована
24 окт 2026

embeddinggemma-2-nullspace-audio

ЭмбеддингиТекст → embedding4 профессии

Модель создаёт 768-мерные эмбеддинги аудио для поиска и сравнения записей, добавляя акустические признаки к эмбеддингам Google EmbeddingGemma 2.

0скачиваний за 30 дней9лайковвеса обновлены2 ноя 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки7

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

  • SIBFLEURS

    main_score

    Результат

    0,1957

    Общий результат 0,4273Общий результат 0,3921Общий результат 0,3818
    MTEB

    Публичная таблицадругая ревизия

  • CommonVoiceMini21T2ARetrieval

    main_score

    Результат

    0,9

    Общий результат 0,985Общий результат 0,985Общий результат 0,975
    MTEB

    Публичная таблицадругая ревизия

  • UrbanSound8KT2ARetrieval

    main_score

    Результат

    0,0049

    MTEB

    Публичная таблицадругая ревизия

  • GoogleSVQT2ARetrieval

    main_score

    Результат

    0,8762

    Общий результат 0,8537
    MTEB

    Публичная таблицадругая ревизия

  • GoogleSVQA2TRetrieval

    main_score

    Результат

    0,9623

    Общий результат 0,9023Общий результат 0,9023
    MTEB

    Публичная таблицадругая ревизия

  • FleursT2ARetrieval

    main_score

    Результат

    1

    Общий результат 0,9971Общий результат 0,9971Общий результат 0,9934
    MTEB

    Публичная таблицадругая ревизия

  • GigaSpeechT2ARetrieval

    main_score

    Результат

    0,8196

    MTEB

    Публичная таблицадругая ревизия

Что умеет модель

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

BrunoHays разработал аудиоверсию Google EmbeddingGemma 2 для получения эмбеддингов аудиозаписей. Замороженные веса базовой модели не изменены: к аудиотракту добавлена замороженная 256-мерная голова, которая извлекает признаки из слоёв 2 и 6 аудиокодировщика Conformer, преобразует их с помощью PCA и добавляет в ортогональное подпространство итогового 768-мерного эмбеддинга. Благодаря этому аудиопризнаки усиливаются, а текстовые эмбеддинги и сходство текстовых пар не меняются.

Модель предназначена для аудиопоиска, сопоставления записей и анализа сходства, в том числе для задач классификации речи, эмоций, голосовых характеристик, музыки и звуковых событий. По README, в аудиобенчмарке MAEB она показала высокие результаты, однако улучшения зависят от задачи и часть проверенных аудиозадач ухудшилась. Для аудио требуется полный вектор размерности 768; усечение до меньшей размерности не поддерживается. Веса и PCA-состояния заморожены, повторного обучения не выполняется. Лицензия — Gemma.

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

  • поиск похожих аудиозаписей
  • сопоставление аудиоклипов по содержанию
  • кластеризация голосов по тембру и характеристикам
  • анализ эмоциональных характеристик речи
  • поиск музыкальных фрагментов по сходству
  • сравнение звуковых событий и окружающих звуков

Ограничения

Некоторые аудиозадачи могут ухудшаться; результаты бенчмарков могут быть оптимистичны, поскольку конфигурацию выбирали с учётом тестовых оценок. Для аудио необходимы все 768 измерений эмбеддинга; усечение размерности не поддерживается.

Для каких профессий подходит4

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

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

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

Открыть на Hugging Face

BrunoHays/embeddinggemma-2-nullspace-audio

BrunoHays/embeddinggemma-2-nullspace-audio is google/embeddinggemma-2 with no change to the frozen weights, plus a frozen 256-dimensional null-space head that only acts on audio inputs.

  • Text, image and video inputs: identical to google/embeddinggemma-2 (same code path, same outputs).
  • Audio inputs: the base 768d embedding is shifted along 256 directions that the text embedding space never uses (the null space of the terminal projection). The shift is computed from two frozen Conformer intermediate layers through a PCA projection fitted only on external, non-benchmark audio.
  • No training. The head has no trainable parameters at inference time. Its frozen tensors are in nullspace_audio_head.safetensors (2.37 MB).

Architecture

For an audio clip, with the frozen audio tower of google/embeddinggemma-2:

  1. Pool two Conformer layers over time (masked):
    • X₁ = [μ₂ ; σ₂] (2048d) from layer 2 (mean and std, then L2-normalised)
    • X₂ = μ₆ (1024d) from layer 6 (mean, then L2-normalised)
  2. Project each block with its frozen PCA state (soft-whitened, fitted on external corpora):
    z_k = normalize((X_k - m_k) @ P_k) / (s_k + ε),   for k in {1, 2},  P_k shape: [d_k, 128]
    
    where s_k = σ_k^(1/2) is the stored (already square-rooted) scale and ε = 10⁻⁵.
  3. Combine the two 128d blocks into a unit 256d vector:
    z   = normalize([√0.5 · z_1  ;  √0.5 · z_2])      shape: [256]
    
  4. Inject into the base embedding v_base (768d, L2-normalised by the model) with γ = 1.0:
    v_final = normalize(v_base + γ · (z @ U_⊥^T))     shape: [768]
    
    where U_⊥ has shape [768, 256] with U_⊥^T @ U_⊥ = I.

Why Layers 2 (mean+std) and 6 (mean)

Consistent with layer-wise analyses of speech encoders (Pasad et al., 2021; Bouziane, Mdhaffar & Estève, 2026), different acoustic and paralinguistic attributes peak at different depths inside the 12-layer Conformer audio tower before the final text-aligned layers filter them out:

  • Layer 2 (mean + std, 2048d → 128d): Early layers peak on speaker gender, timbre, pitch, and acoustic texture (VoxPopuliGenderClustering, IEMOCAPGender, MridinghamTonic). Including frame-level standard deviation (std) at Layer 2 captures temporal pitch and formant modulation.
  • Layer 6 (mean, 1024d → 128d): Middle layers peak on vocal emotion (CREMA_D doubles from 19.7% at the final output to 39.5% at Layer 6). At middle and deeper layers, mean pooling alone outperforms mean + std because frame variance becomes noisy after L2 normalisation.

Why the null space

U_⊥ spans the orthogonal complement of the column space of the model's terminal projection W (768 × 512). Text embeddings lie in col(W), so they are orthogonal to U_⊥. The injection therefore does not move text embeddings, and it cannot change text-to-text similarities. Its effect is limited to audio embeddings, and cross-modal rankings move only slightly (see the MSEB section).

Because the 256 null-space directions are spread across all 768 coordinates and no retraining is done, audio embeddings must be used at the full 768d (Matryoshka truncation to 512/256/128 is not supported).

Zero-leakage PCA construction (Protocol A)

The PCA states are fitted only on 350 clips from each of four external corpora, with no MAEB or MSEB audio:

  • ylacombe/expresso (speech)
  • agkphysics/AudioSet (audio events)
  • lewtun/music_genres (music)
  • ashraq/esc50 (environmental sounds)

Clips are at most 10 s. The per-domain statistics are combined with balanced weights, then soft whitening (σ⁻¹/²) is applied on the same eigenbasis.

Usage

Run the standalone script with uv (installs dependencies automatically):

uv run https://huggingface.co/BrunoHays/embeddinggemma-2-nullspace-audio/resolve/main/embeddinggemma2_nullspace.py

Or from a local checkout:

uv run embeddinggemma2_nullspace.py
import numpy as np
from embeddinggemma2_nullspace import EmbeddingGemma2NullSpaceWrapper

model = EmbeddingGemma2NullSpaceWrapper()
audio_emb = model.encode_audio([np.zeros(16000, dtype=np.float32)])  # or ["speech.wav"]
text_emb = model.encode_text(["hello world"])
print(audio_emb.shape, text_emb.shape)  # (1, 768) (1, 768)

encode_audio accepts .wav file paths, 1D numpy/torch waveforms (16 kHz), (array, sr) tuples, or {"array": ..., "sampling_rate": ...} dicts.

With mteb (see MTEB PR #5775):

import mteb

model = mteb.get_model("BrunoHays/embeddinggemma-2-nullspace-audio")

The base checkpoint is loaded from google/embeddinggemma-2 at revision 914f7f89142e33e77833254d9c9b90c3cef7303b. Accepting the Gemma terms on the base model is required.

MAEB results (30 tasks)

On the MTEB Leaderboard (General Purpose -> Audio), the model reaches Rank #1 (Borda and Mean Task) on both MAEB(v1, audio-only) (jumping from #26 to #1 across 70 audio models) and full 30-task MAEB(v1) (jumping from #16 to #1):

BenchmarkModelParamsDimRank (Borda)Mean (Task)Mean (TaskType)
MAEB(v1, audio-only) (19 tasks)BrunoHays/embeddinggemma-2-nullspace-audio577M768#154.8263.76
MAEB(v1, audio-only)Qwen/Qwen2-Audio-7B8.40B4096#250.9949.26
MAEB(v1, audio-only)openai/whisper-medium769M1024#348.4250.71
MAEB(v1, audio-only)LCO-Embedding/LCO-Embedding-Omni-7B8.93B3584#451.5456.15
MAEB(v1, audio-only)google/embeddinggemma-2 (base)577M768#2647.7948.86
MAEB(v1) (all 30 tasks)BrunoHays/embeddinggemma-2-nullspace-audio577M768#154.40 (55.09 raw)55.96
MAEB(v1)Haon-Chen/e5-omni-7B8.93B3584#252.4557.12
MAEB(v1)LCO-Embedding/LCO-Embedding-Omni-7B8.93B3584#353.5457.06
MAEB(v1)google/embeddinggemma-2 (base)577M768#1649.31 (49.95 raw)48.02

"Mean (Task)" on MAEB(v1) evaluates FSD2019Kaggle on the curated subset per the MTEB benchmark definition (54.40% vs 49.31% base). "Raw" averages all subsets (55.09% vs 49.95% measured base).

Coverage: all 30 MAEB tasks were measured for this configuration. FleursT2ARetrieval (102 languages) and CommonVoiceMini21T2ARetrieval (117 languages) were run per language and macro-averaged over languages.

Per-task scores

Taskgoogle/embeddinggemma-2 (Published)google/embeddinggemma-2 (Measured Base 768d)Null-space (γ = 1.0)
IEMOCAPGender66.4066.3885.77
VoxPopuliGenderClustering0.050.0563.09
CREMA_D19.7319.7040.16
CREMA_DClustering0.510.514.93
GTZANGenre57.6057.7071.50
BeijingOpera80.9481.7993.63
MridinghamTonic31.4031.5039.53
BirdCLEF15.2015.0020.50
CommonLanguageAgeDetection17.5120.0919.46
CREMADPairClassification52.5352.5157.31
VoxPopuliAccentPairClassification51.7051.7159.82
VehicleSoundClustering7.507.7514.67
FSD2019Kaggle38.7538.7556.26
JamAltArtistA2ARetrieval55.3855.2093.82
GTZANAudioReranking66.4666.3875.82
NMSQAPairClassification98.1498.1478.67
MInDS1487.7197.6388.34
SIBFLEURS54.6557.1921.30
VoxPopuliLanguageID99.6099.6097.00
VoxCelebSA44.9745.1735.40
SpokenSQuADT2ARetrieval69.3369.3369.33
ClothoT2ARetrieval10.7210.6710.67
MACST2ARetrieval6.626.876.87
UrbanSound8KT2ARetrieval0.470.490.49
GigaSpeechT2ARetrieval81.9781.9781.96
FleursT2ARetrieval97.8599.7799.73
CommonVoiceMini21T2ARetrieval93.2593.0893.08
JamAltLyricA2TRetrieval61.5162.7862.89
RavdessZeroshot13.9613.8913.82
SpeechCommandsZeroshotv0.0296.9196.8896.86
30-Task Macro Average (raw)49.3149.9555.09

Where it helps and where it hurts

The macro gain comes mainly from audio-to-audio and gender/emotion/genre tasks. Several tasks lose accuracy. The largest losses at γ = 1.0 are NMSQAPairClassification (−19.5 pp), SIBFLEURS (−35.9 pp), MInDS14 (−9.3 pp) and VoxCelebSA (−9.8 pp). Check these tasks before using the model where they matter.

MSEB results (Google SVQ, 26 locales)

Macro mean over 26 locales of google/svq (test split). Evaluated with the same head config, using mteb/svq. Measured in this pipeline; no other MSEB tasks were run.

TaskConfighit_rate_at_5mrr_at_10ndcg_at_10
SVQ A2Tbase (no head)0.940020.498910.61696
SVQ A2Tγ = 1.00.940610.498100.61635
SVQ T2Abase (no head)0.912630.501780.61661
SVQ T2Aγ = 1.00.912600.501790.61662

The head moves retrieval scores by at most about 0.3 points on audio-to-text and about 0.05 points on text-to-audio. The effect is far smaller than the MAEB changes above.

Limitations

  • Selection bias. The PCA construction is leak-free, but the choice of mode (ext_soft_whiten) and γ was made by looking at test scores across a small grid. Treat the MAEB numbers as optimistic. γ = 1.0 is the largest value tested for this mode, so the optimum may lie beyond it.
  • Full 768d required. Because there is no retraining, audio embeddings require all 768 dimensions and do not support Matryoshka truncation.
  • Single-run numbers. All 30 MAEB and 2 MSEB tasks were measured in this pipeline. The two multilingual T2A tasks were run per language; their scores are macro means over 102 and 117 languages.
  • Mixed effects. Some audio tasks regress (see above). Do not assume the gain transfers to every audio task.
  • Audio batching. In the audio path, clips are encoded in dataset order without SentenceTransformer's length sorting, so results can differ from the base model by about 10⁻³ per coordinate (bf16 padding effects).

License

Gemma license, inherited from google/embeddinggemma-2. Check the Gemma terms before redistributing.

Citation

If you use this model, please cite the base model:

@misc{vera2025embeddinggemmapowerfullightweighttext,
      title={EmbeddingGemma: Powerful and Lightweight Text Representations},
      author={Vera, Henrique Schechter and others},
      year={2025},
      eprint={2509.20354},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2509.20354},
}

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

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

GPU в ailist

Универсальный рантайм · sentence-transformers

Нельзя запустить

В репозитории нет config.json: не понять архитектуру модели.

Ревизия весов
4e54c68

0 моделей