Feature Extraction
Transformers
Safetensors
sentence-transformers
multilingual
Portuguese
embedding_gemma2
embedding
sentence-similarity
multimodal-embedding
image-feature-extraction
video-feature-extraction
pt-br
brazilian-portuguese
embeddinggemma
Instructions to use HRB25/embeddinggemma-2-sem-audio with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HRB25/embeddinggemma-2-sem-audio with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="HRB25/embeddinggemma-2-sem-audio")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModel processor = AutoProcessor.from_pretrained("HRB25/embeddinggemma-2-sem-audio") model = AutoModel.from_pretrained("HRB25/embeddinggemma-2-sem-audio", device_map="auto") - sentence-transformers
How to use HRB25/embeddinggemma-2-sem-audio with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("HRB25/embeddinggemma-2-sem-audio") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
EmbeddingGemma 2 sem encoder de áudio
Browse files- .gitattributes +2 -7
- 1_Pooling/config.json +5 -0
- 2_Normalize/config.json +4 -0
- README.md +152 -0
- chat_template.jinja +1 -0
- config.json +137 -0
- config_sentence_transformers.json +38 -0
- model.safetensors +3 -0
- modules.json +20 -0
- preprocessor_config.json +21 -0
- processor_config.json +78 -0
- sentence_bert_config.json +23 -0
- tokenizer.json +3 -0
- tokenizer.model +3 -0
- tokenizer_config.json +57 -0
.gitattributes
CHANGED
|
@@ -17,19 +17,14 @@
|
|
| 17 |
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
-
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
-
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
-
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
-
|
| 27 |
-
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
-
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
-
*
|
|
|
|
| 17 |
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
*.pb filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
| 20 |
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 21 |
*.pth filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 22 |
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.tar.gz filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
| 24 |
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 25 |
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 26 |
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 27 |
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 28 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 29 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
1_Pooling/config.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"embedding_dimension": 768,
|
| 3 |
+
"pooling_mode": "mean",
|
| 4 |
+
"include_prompt": true
|
| 5 |
+
}
|
2_Normalize/config.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"module_input_name": "sentence_embedding",
|
| 3 |
+
"module_output_name": "sentence_embedding"
|
| 4 |
+
}
|
README.md
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- multilingual
|
| 4 |
+
- pt
|
| 5 |
+
license: apache-2.0
|
| 6 |
+
library_name: transformers
|
| 7 |
+
pipeline_tag: feature-extraction
|
| 8 |
+
base_model: google/embeddinggemma-2
|
| 9 |
+
tags:
|
| 10 |
+
- embedding
|
| 11 |
+
- feature-extraction
|
| 12 |
+
- sentence-transformers
|
| 13 |
+
- sentence-similarity
|
| 14 |
+
- multimodal-embedding
|
| 15 |
+
- image-feature-extraction
|
| 16 |
+
- video-feature-extraction
|
| 17 |
+
- pt-br
|
| 18 |
+
- brazilian-portuguese
|
| 19 |
+
- embeddinggemma
|
| 20 |
+
---
|
| 21 |
+
|
| 22 |
+
# EmbeddingGemma 2 sem encoder de áudio
|
| 23 |
+
|
| 24 |
+
<div align="center" style="line-height: 1.4;">
|
| 25 |
+
<a href="https://huggingface.co/google/embeddinggemma-2" style="margin: 2px;">
|
| 26 |
+
<img alt="Modelo base" src="https://img.shields.io/badge/Base-google%2Fembeddinggemma--2-8b5cf6" style="display: inline-block; vertical-align: middle;"/>
|
| 27 |
+
</a>
|
| 28 |
+
<img alt="Parâmetros" src="https://img.shields.io/badge/Par%C3%A2metros-439M-6366f1" style="display: inline-block; vertical-align: middle;"/>
|
| 29 |
+
<img alt="Tamanho" src="https://img.shields.io/badge/Tamanho-878%20MB-10b981" style="display: inline-block; vertical-align: middle;"/>
|
| 30 |
+
<img alt="Licença" src="https://img.shields.io/badge/Licen%C3%A7a-Apache%202.0-f59e0b" style="display: inline-block; vertical-align: middle;"/>
|
| 31 |
+
</div>
|
| 32 |
+
|
| 33 |
+
<br>
|
| 34 |
+
|
| 35 |
+
**Esta é uma cópia do `google/embeddinggemma-2` sem o encoder de áudio.** Os pesos de texto e de imagem (e vídeo) são idênticos aos do modelo original. Só foram removidos os tensores de áudio, o que reduz o modelo de **744M para 439M de parâmetros** e o arquivo de **1,49 GB para 878 MB**.
|
| 36 |
+
|
| 37 |
+
[Visão geral ↓](#visão-geral) · [Como usar ↓](#como-usar) · [O que foi removido ↓](#o-que-foi-removido) · [Verificação ↓](#verificação) · [Licença ↓](#licença)
|
| 38 |
+
|
| 39 |
+
<br>
|
| 40 |
+
|
| 41 |
+
# Visão geral
|
| 42 |
+
|
| 43 |
+
### Descrição
|
| 44 |
+
|
| 45 |
+
O EmbeddingGemma 2 é um modelo de embeddings multimodal da Google DeepMind. Ele leva texto (incluindo código), imagens, vídeo e áudio para um único espaço vetorial de 768 dimensões. Este repositório mantém tudo isso, menos o áudio: quem só precisa de texto, imagem e vídeo carrega menos peso na memória e baixa menos dados.
|
| 46 |
+
|
| 47 |
+
Este repositório não tem treino nem ajuste fino. É o mesmo checkpoint, com menos módulos. Para detalhes de arquitetura, benchmarks e dados de treino, leia o [cartão do modelo original](https://huggingface.co/google/embeddinggemma-2).
|
| 48 |
+
|
| 49 |
+
### Resumo
|
| 50 |
+
|
| 51 |
+
| | |
|
| 52 |
+
|:---|:---|
|
| 53 |
+
| **Modelo base** | [`google/embeddinggemma-2`](https://huggingface.co/google/embeddinggemma-2) |
|
| 54 |
+
| **Parâmetros** | 438.760.448 (original: 744.371.512 no arquivo, 744.371.488 carregado) |
|
| 55 |
+
| **Arquivo `model.safetensors`** | 877.599.816 bytes (original: 1.488.915.288 bytes) |
|
| 56 |
+
| **Precisão dos pesos** | bfloat16 |
|
| 57 |
+
| **Modalidades** | Texto, imagem e vídeo |
|
| 58 |
+
| **Dimensão de saída** | 768 (MRL: 512, 256 e 128) |
|
| 59 |
+
| **Janela de contexto** | 8.192 tokens |
|
| 60 |
+
| **Pooling** | Média, seguida de normalização L2 |
|
| 61 |
+
| **Idiomas** | Mais de 100, incluindo português |
|
| 62 |
+
| **Licença** | Apache 2.0, a mesma do modelo base |
|
| 63 |
+
|
| 64 |
+
<br>
|
| 65 |
+
|
| 66 |
+
# Como usar
|
| 67 |
+
|
| 68 |
+
```bash
|
| 69 |
+
pip install -U sentence-transformers transformers torchvision
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
```python
|
| 73 |
+
from sentence_transformers import SentenceTransformer
|
| 74 |
+
|
| 75 |
+
model = SentenceTransformer("HRB25/embeddinggemma-2-sem-audio")
|
| 76 |
+
|
| 77 |
+
consulta = "O que causa a aurora boreal?"
|
| 78 |
+
documento = "A aurora boreal é causada por partículas carregadas vindas do Sol."
|
| 79 |
+
|
| 80 |
+
q = model.encode(consulta, prompt_name="SearchQuery")
|
| 81 |
+
d = model.encode(documento, prompt_name="Document")
|
| 82 |
+
print(model.similarity(q, d))
|
| 83 |
+
```
|
| 84 |
+
|
| 85 |
+
Os prefixos de tarefa (`SearchQuery`, `Document`, `SentenceSimilarity`, `Clustering` e outros) funcionam como no modelo original, e valem só para texto. Para embeddings menores, use `truncate_dim=512`, `256` ou `128` com `normalize_embeddings=True`.
|
| 86 |
+
|
| 87 |
+
Este repositório é privado. Para carregar, entre com `hf auth login` usando uma conta com acesso.
|
| 88 |
+
|
| 89 |
+
### Aviso sobre áudio
|
| 90 |
+
|
| 91 |
+
`config.json` não tem `audio_config` e `modules.json`/`sentence_bert_config.json` não listam a modalidade de áudio, então o modelo não aceita entrada de áudio. Os arquivos `preprocessor_config.json` e a seção `feature_extractor` do `processor_config.json` foram mantidos de propósito: eles não têm pesos e o `EmbeddingGemma2Processor` exige esses arquivos para carregar. Os tokens especiais de áudio continuam no tokenizador, para o vocabulário ficar igual ao original.
|
| 92 |
+
|
| 93 |
+
<br>
|
| 94 |
+
|
| 95 |
+
# O que foi removido
|
| 96 |
+
|
| 97 |
+
Foram retirados 752 tensores, somando 305.611.520 parâmetros:
|
| 98 |
+
|
| 99 |
+
| Prefixo dos tensores | Conteúdo |
|
| 100 |
+
|:---|:---|
|
| 101 |
+
| `audio_tower.layers.0` a `audio_tower.layers.11` | 12 camadas do encoder de áudio, 62 tensores cada |
|
| 102 |
+
| `audio_tower.output_proj.*` | Projeção de saída (1024 para 1536) |
|
| 103 |
+
| `audio_tower.subsample_conv_projection.*` | Subamostragem convolucional e projeção de entrada |
|
| 104 |
+
| `embed_audio.embedding_projection.weight` | Projeção do áudio para o espaço de 768 dimensões |
|
| 105 |
+
|
| 106 |
+
Ficaram 624 tensores: `language_model.*` (texto), `vision_tower.*` e `embed_vision.*` (imagem e vídeo).
|
| 107 |
+
|
| 108 |
+
| | Original | Sem áudio |
|
| 109 |
+
|:---|---:|---:|
|
| 110 |
+
| Tensores | 1.376 | 624 |
|
| 111 |
+
| Parâmetros (arquivo) | 744.371.512 | 438.760.472 |
|
| 112 |
+
| `model.safetensors` | 1.488.915.288 B | 877.599.816 B |
|
| 113 |
+
|
| 114 |
+
Mudanças nos arquivos de configuração:
|
| 115 |
+
|
| 116 |
+
- `config.json`: removida a chave `audio_config`.
|
| 117 |
+
- `processor_config.json`: removidas `audio_ms_per_token` e `audio_seq_length`. A seção `feature_extractor` foi mantida.
|
| 118 |
+
- `sentence_bert_config.json`: removida a modalidade `audio` de `modality_config`.
|
| 119 |
+
- Tokenizador, `modules.json`, `1_Pooling`, `2_Normalize`, `config_sentence_transformers.json` e `chat_template.jinja`: copiados sem alteração.
|
| 120 |
+
|
| 121 |
+
<br>
|
| 122 |
+
|
| 123 |
+
# Verificação
|
| 124 |
+
|
| 125 |
+
Cinco frases em português do Brasil, com `prompt_name="SentenceSimilarity"`, em float32 na CPU, embeddings normalizados. A similaridade de cosseno entre o modelo sem áudio e o original completo ficou em **1,0000** nas cinco frases, com diferença máxima absoluta de 1,9e-6 por dimensão (ruído de ponto flutuante). Uma imagem de teste também deu cosseno 1,0000 contra o original.
|
| 126 |
+
|
| 127 |
+
O modelo também carrega com `transformers.AutoModel` (`EmbeddingGemma2Model`), sem tensores faltando ou sobrando.
|
| 128 |
+
|
| 129 |
+
<br>
|
| 130 |
+
|
| 131 |
+
# Limitações
|
| 132 |
+
|
| 133 |
+
- Não aceita áudio. Para embeddings de áudio, use o [modelo original](https://huggingface.co/google/embeddinggemma-2).
|
| 134 |
+
- Todas as limitações do modelo base continuam valendo: desempenho desigual entre idiomas, sensibilidade ao prefixo de tarefa e viés herdado dos dados de treino.
|
| 135 |
+
- Não foi feita avaliação própria em benchmarks. Os números do cartão original valem para texto e imagem, porque esses pesos não mudaram.
|
| 136 |
+
|
| 137 |
+
<br>
|
| 138 |
+
|
| 139 |
+
# Licença
|
| 140 |
+
|
| 141 |
+
Os pesos e arquivos derivados seguem a licença do modelo base, **Apache 2.0**, conforme o [cartão de `google/embeddinggemma-2`](https://huggingface.co/google/embeddinggemma-2). O uso também deve respeitar as políticas de uso aceitável e os avisos da Google para a família Gemma. Esta cópia não é afiliada à Google nem endossada por ela, e os créditos do modelo pertencem à Google DeepMind.
|
| 142 |
+
|
| 143 |
+
# Citação
|
| 144 |
+
|
| 145 |
+
Cite o relatório técnico original:
|
| 146 |
+
|
| 147 |
+
```
|
| 148 |
+
EmbeddingGemma 2, Google DeepMind, 2026.
|
| 149 |
+
https://arxiv.org/abs/2610.37364
|
| 150 |
+
```
|
| 151 |
+
|
| 152 |
+
Modelo base: https://huggingface.co/google/embeddinggemma-2
|
chat_template.jinja
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{%- for msg in messages if msg.get('role') == 'system' -%}{%- if msg.get('content') is string -%}{{ msg['content'] }}{%- else -%}{%- for item in msg['content'] if item.get('type') == 'text' -%}{{ item['text'] }}{%- endfor -%}{%- endif -%}{%- endfor -%}{%- for msg in messages if msg.get('role') != 'system' -%}{%- if msg.get('content') is string -%}{{ msg['content'] }}{%- else -%}{%- set existing_text = msg['content'] | selectattr('type', 'equalto', 'text') | map(attribute='text') | join -%}{%- set has_manual_placeholders = ('<|image|>' in existing_text) or ('<|video|>' in existing_text) or ('<|audio|>' in existing_text) -%}{%- for item in msg['content'] -%}{%- if item.get('type') == 'text' -%}{{ item['text'] }}{%- elif not has_manual_placeholders and item.get('type') == 'image' -%}<|image|>{%- elif not has_manual_placeholders and item.get('type') == 'video' -%}<|video|>{%- elif not has_manual_placeholders and item.get('type') == 'audio' -%}<|audio|>{%- endif -%}{%- endfor -%}{%- endif -%}{%- endfor -%}
|
config.json
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"EmbeddingGemma2Model"
|
| 4 |
+
],
|
| 5 |
+
"audio_token_id": 258881,
|
| 6 |
+
"boa_token_id": 256000,
|
| 7 |
+
"boi_token_id": 255999,
|
| 8 |
+
"dtype": "bfloat16",
|
| 9 |
+
"eoa_token_index": 258883,
|
| 10 |
+
"eoi_token_id": 258882,
|
| 11 |
+
"image_token_id": 258880,
|
| 12 |
+
"initializer_range": 0.02,
|
| 13 |
+
"model_type": "embedding_gemma2",
|
| 14 |
+
"text_config": {
|
| 15 |
+
"attention_bias": false,
|
| 16 |
+
"attention_dropout": 0.0,
|
| 17 |
+
"bos_token_id": 2,
|
| 18 |
+
"dtype": "bfloat16",
|
| 19 |
+
"embedding_dim": 768,
|
| 20 |
+
"eos_token_id": 1,
|
| 21 |
+
"head_dim": 256,
|
| 22 |
+
"hidden_activation": "gelu_pytorch_tanh",
|
| 23 |
+
"hidden_size": 512,
|
| 24 |
+
"hidden_size_per_layer_input": 512,
|
| 25 |
+
"initializer_range": 0.02,
|
| 26 |
+
"intermediate_size": 2048,
|
| 27 |
+
"layer_types": [
|
| 28 |
+
"sliding_attention",
|
| 29 |
+
"sliding_attention",
|
| 30 |
+
"sliding_attention",
|
| 31 |
+
"sliding_attention",
|
| 32 |
+
"sliding_attention",
|
| 33 |
+
"full_attention",
|
| 34 |
+
"sliding_attention",
|
| 35 |
+
"sliding_attention",
|
| 36 |
+
"sliding_attention",
|
| 37 |
+
"sliding_attention",
|
| 38 |
+
"sliding_attention",
|
| 39 |
+
"full_attention",
|
| 40 |
+
"sliding_attention",
|
| 41 |
+
"sliding_attention",
|
| 42 |
+
"sliding_attention",
|
| 43 |
+
"sliding_attention",
|
| 44 |
+
"sliding_attention",
|
| 45 |
+
"full_attention",
|
| 46 |
+
"sliding_attention",
|
| 47 |
+
"sliding_attention",
|
| 48 |
+
"sliding_attention",
|
| 49 |
+
"sliding_attention",
|
| 50 |
+
"sliding_attention",
|
| 51 |
+
"full_attention"
|
| 52 |
+
],
|
| 53 |
+
"max_position_embeddings": 262144,
|
| 54 |
+
"model_type": "embedding_gemma2_text",
|
| 55 |
+
"num_attention_heads": 4,
|
| 56 |
+
"num_hidden_layers": 24,
|
| 57 |
+
"num_key_value_heads": 2,
|
| 58 |
+
"pad_token_id": 0,
|
| 59 |
+
"per_layer_config": {
|
| 60 |
+
"05": {
|
| 61 |
+
"head_dim": 512,
|
| 62 |
+
"num_key_value_heads": 1
|
| 63 |
+
},
|
| 64 |
+
"11": {
|
| 65 |
+
"head_dim": 512,
|
| 66 |
+
"num_key_value_heads": 1
|
| 67 |
+
},
|
| 68 |
+
"17": {
|
| 69 |
+
"head_dim": 512,
|
| 70 |
+
"num_key_value_heads": 1
|
| 71 |
+
},
|
| 72 |
+
"23": {
|
| 73 |
+
"head_dim": 512,
|
| 74 |
+
"num_key_value_heads": 1
|
| 75 |
+
}
|
| 76 |
+
},
|
| 77 |
+
"rms_norm_eps": 1e-06,
|
| 78 |
+
"rope_parameters": {
|
| 79 |
+
"full_attention": {
|
| 80 |
+
"rope_theta": 1000000.0,
|
| 81 |
+
"rope_type": "default"
|
| 82 |
+
},
|
| 83 |
+
"sliding_attention": {
|
| 84 |
+
"rope_theta": 10000.0,
|
| 85 |
+
"rope_type": "default"
|
| 86 |
+
}
|
| 87 |
+
},
|
| 88 |
+
"sliding_window": 512,
|
| 89 |
+
"vocab_size": 262144
|
| 90 |
+
},
|
| 91 |
+
"transformers_version": "5.18.0.dev0",
|
| 92 |
+
"video_token_id": 258884,
|
| 93 |
+
"vision_config": {
|
| 94 |
+
"_name_or_path": "",
|
| 95 |
+
"architectures": null,
|
| 96 |
+
"attention_bias": false,
|
| 97 |
+
"attention_dropout": 0.0,
|
| 98 |
+
"chunk_size_feed_forward": 0,
|
| 99 |
+
"default_output_length": 280,
|
| 100 |
+
"dtype": "bfloat16",
|
| 101 |
+
"global_head_dim": 64,
|
| 102 |
+
"head_dim": 64,
|
| 103 |
+
"hidden_activation": "gelu_pytorch_tanh",
|
| 104 |
+
"hidden_size": 768,
|
| 105 |
+
"id2label": {
|
| 106 |
+
"0": "LABEL_0",
|
| 107 |
+
"1": "LABEL_1"
|
| 108 |
+
},
|
| 109 |
+
"initializer_range": 0.02,
|
| 110 |
+
"intermediate_size": 3072,
|
| 111 |
+
"is_encoder_decoder": false,
|
| 112 |
+
"label2id": {
|
| 113 |
+
"LABEL_0": 0,
|
| 114 |
+
"LABEL_1": 1
|
| 115 |
+
},
|
| 116 |
+
"max_position_embeddings": 131072,
|
| 117 |
+
"model_type": "gemma4_vision",
|
| 118 |
+
"num_attention_heads": 12,
|
| 119 |
+
"num_hidden_layers": 16,
|
| 120 |
+
"num_key_value_heads": 12,
|
| 121 |
+
"output_attentions": false,
|
| 122 |
+
"output_hidden_states": false,
|
| 123 |
+
"patch_size": 16,
|
| 124 |
+
"pooling_kernel_size": 3,
|
| 125 |
+
"position_embedding_size": 10240,
|
| 126 |
+
"problem_type": null,
|
| 127 |
+
"return_dict": true,
|
| 128 |
+
"rms_norm_eps": 1e-06,
|
| 129 |
+
"rope_parameters": {
|
| 130 |
+
"rope_theta": 100.0,
|
| 131 |
+
"rope_type": "axial"
|
| 132 |
+
},
|
| 133 |
+
"standardize": false,
|
| 134 |
+
"use_clipped_linears": false
|
| 135 |
+
},
|
| 136 |
+
"vision_soft_tokens_per_image": 280
|
| 137 |
+
}
|
config_sentence_transformers.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"__version__": {
|
| 3 |
+
"pytorch": "2.14.0+cu130",
|
| 4 |
+
"sentence_transformers": "6.1.0",
|
| 5 |
+
"transformers": "5.18.0.dev0"
|
| 6 |
+
},
|
| 7 |
+
"default_prompt_name": null,
|
| 8 |
+
"model_type": "SentenceTransformer",
|
| 9 |
+
"prompts": {
|
| 10 |
+
"BitextMining": "task: search result | query: ",
|
| 11 |
+
"Classification": "task: classification | query: ",
|
| 12 |
+
"Clustering": "task: clustering | query: ",
|
| 13 |
+
"CodeRetrieval": "task: code retrieval | query: ",
|
| 14 |
+
"Document": "title: none | text: ",
|
| 15 |
+
"FactChecking": "task: fact checking | query: ",
|
| 16 |
+
"InstructionRetrieval": "task: code retrieval | query: ",
|
| 17 |
+
"MultilabelClassification": "task: classification | query: ",
|
| 18 |
+
"PairClassification": "task: sentence similarity | query: ",
|
| 19 |
+
"QuestionAnswering": "task: question answering | query: ",
|
| 20 |
+
"Reranking": "task: search result | query: ",
|
| 21 |
+
"Retrieval": "task: search result | query: ",
|
| 22 |
+
"Retrieval-document": "title: none | text: ",
|
| 23 |
+
"Retrieval-query": "task: search result | query: ",
|
| 24 |
+
"STS": "task: sentence similarity | query: ",
|
| 25 |
+
"SearchQuery": "task: search result | query: ",
|
| 26 |
+
"SentenceSimilarity": "task: sentence similarity | query: ",
|
| 27 |
+
"Summarization": "task: sentence similarity | query: ",
|
| 28 |
+
"document": "title: none | text: ",
|
| 29 |
+
"query": "task: search result | query: "
|
| 30 |
+
},
|
| 31 |
+
"requirements": {
|
| 32 |
+
"sentence-transformers": {
|
| 33 |
+
"reason": "Older versions ignore the order of multimodal dict inputs and cannot put several images or texts into a single embedding.",
|
| 34 |
+
"specifier": ">=6.1.0"
|
| 35 |
+
}
|
| 36 |
+
},
|
| 37 |
+
"similarity_fn_name": "cosine"
|
| 38 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6c843bbde1f3eb588142c1f622ad31c84a33ae493a11c19ae29b13c6f7170742
|
| 3 |
+
size 877599816
|
modules.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"idx": 0,
|
| 4 |
+
"name": "0",
|
| 5 |
+
"path": "",
|
| 6 |
+
"type": "sentence_transformers.base.modules.transformer.Transformer"
|
| 7 |
+
},
|
| 8 |
+
{
|
| 9 |
+
"idx": 1,
|
| 10 |
+
"name": "1",
|
| 11 |
+
"path": "1_Pooling",
|
| 12 |
+
"type": "sentence_transformers.sentence_transformer.modules.pooling.Pooling"
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"idx": 2,
|
| 16 |
+
"name": "2",
|
| 17 |
+
"path": "2_Normalize",
|
| 18 |
+
"type": "sentence_transformers.base.modules.normalize.Normalize"
|
| 19 |
+
}
|
| 20 |
+
]
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"dither": 0.0,
|
| 3 |
+
"feature_extractor_type": "Gemma4AudioFeatureExtractor",
|
| 4 |
+
"feature_size": 128,
|
| 5 |
+
"fft_length": 512,
|
| 6 |
+
"fft_overdrive": false,
|
| 7 |
+
"frame_length": 320,
|
| 8 |
+
"hop_length": 160,
|
| 9 |
+
"input_scale_factor": 1.0,
|
| 10 |
+
"max_frequency": 8000.0,
|
| 11 |
+
"mel_floor": 0.001,
|
| 12 |
+
"min_frequency": 0.0,
|
| 13 |
+
"padding_side": "right",
|
| 14 |
+
"padding_value": 0.0,
|
| 15 |
+
"per_bin_mean": null,
|
| 16 |
+
"per_bin_stddev": null,
|
| 17 |
+
"preemphasis": 0.0,
|
| 18 |
+
"preemphasis_htk_flavor": true,
|
| 19 |
+
"return_attention_mask": true,
|
| 20 |
+
"sampling_rate": 16000
|
| 21 |
+
}
|
processor_config.json
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"audio_ms_per_token": 40,
|
| 3 |
+
"audio_seq_length": 280,
|
| 4 |
+
"feature_extractor": {
|
| 5 |
+
"dither": 0.0,
|
| 6 |
+
"feature_extractor_type": "Gemma4AudioFeatureExtractor",
|
| 7 |
+
"feature_size": 128,
|
| 8 |
+
"fft_length": 512,
|
| 9 |
+
"fft_overdrive": false,
|
| 10 |
+
"frame_length": 320,
|
| 11 |
+
"hop_length": 160,
|
| 12 |
+
"input_scale_factor": 1.0,
|
| 13 |
+
"max_frequency": 8000.0,
|
| 14 |
+
"mel_floor": 0.001,
|
| 15 |
+
"min_frequency": 0.0,
|
| 16 |
+
"padding_side": "right",
|
| 17 |
+
"padding_value": 0.0,
|
| 18 |
+
"per_bin_mean": null,
|
| 19 |
+
"per_bin_stddev": null,
|
| 20 |
+
"preemphasis": 0.0,
|
| 21 |
+
"preemphasis_htk_flavor": true,
|
| 22 |
+
"return_attention_mask": true,
|
| 23 |
+
"sampling_rate": 16000
|
| 24 |
+
},
|
| 25 |
+
"image_processor": {
|
| 26 |
+
"do_convert_rgb": true,
|
| 27 |
+
"do_normalize": false,
|
| 28 |
+
"do_rescale": true,
|
| 29 |
+
"do_resize": true,
|
| 30 |
+
"image_mean": [
|
| 31 |
+
0.0,
|
| 32 |
+
0.0,
|
| 33 |
+
0.0
|
| 34 |
+
],
|
| 35 |
+
"image_processor_type": "Gemma4ImageProcessor",
|
| 36 |
+
"image_seq_length": 280,
|
| 37 |
+
"image_std": [
|
| 38 |
+
1.0,
|
| 39 |
+
1.0,
|
| 40 |
+
1.0
|
| 41 |
+
],
|
| 42 |
+
"max_soft_tokens": 280,
|
| 43 |
+
"patch_size": 16,
|
| 44 |
+
"pooling_kernel_size": 3,
|
| 45 |
+
"resample": 3,
|
| 46 |
+
"rescale_factor": 0.00392156862745098
|
| 47 |
+
},
|
| 48 |
+
"image_seq_length": 280,
|
| 49 |
+
"processor_class": "EmbeddingGemma2Processor",
|
| 50 |
+
"video_processor": {
|
| 51 |
+
"add_timestamps": false,
|
| 52 |
+
"do_convert_rgb": true,
|
| 53 |
+
"do_normalize": false,
|
| 54 |
+
"do_rescale": true,
|
| 55 |
+
"do_resize": true,
|
| 56 |
+
"do_sample_frames": true,
|
| 57 |
+
"fps": 1,
|
| 58 |
+
"image_mean": [
|
| 59 |
+
0.0,
|
| 60 |
+
0.0,
|
| 61 |
+
0.0
|
| 62 |
+
],
|
| 63 |
+
"image_std": [
|
| 64 |
+
1.0,
|
| 65 |
+
1.0,
|
| 66 |
+
1.0
|
| 67 |
+
],
|
| 68 |
+
"max_frames": 32,
|
| 69 |
+
"max_soft_tokens": 140,
|
| 70 |
+
"overflow_strategy": "uniform",
|
| 71 |
+
"patch_size": 16,
|
| 72 |
+
"pooling_kernel_size": 3,
|
| 73 |
+
"resample": 3,
|
| 74 |
+
"rescale_factor": 0.00392156862745098,
|
| 75 |
+
"return_metadata": false,
|
| 76 |
+
"video_processor_type": "EmbeddingGemma2VideoProcessor"
|
| 77 |
+
}
|
| 78 |
+
}
|
sentence_bert_config.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"transformer_task": "feature-extraction",
|
| 3 |
+
"modality_config": {
|
| 4 |
+
"text": {
|
| 5 |
+
"method": "forward",
|
| 6 |
+
"method_output_name": "last_hidden_state"
|
| 7 |
+
},
|
| 8 |
+
"image": {
|
| 9 |
+
"method": "forward",
|
| 10 |
+
"method_output_name": "last_hidden_state"
|
| 11 |
+
},
|
| 12 |
+
"video": {
|
| 13 |
+
"method": "forward",
|
| 14 |
+
"method_output_name": "last_hidden_state"
|
| 15 |
+
},
|
| 16 |
+
"message": {
|
| 17 |
+
"method": "forward",
|
| 18 |
+
"method_output_name": "last_hidden_state",
|
| 19 |
+
"format": "structured"
|
| 20 |
+
}
|
| 21 |
+
},
|
| 22 |
+
"module_output_name": "token_embeddings"
|
| 23 |
+
}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4d777ef5bdc1aa36227abdfb77c3e49e7b9c892d16e1b6bda41c393504828be4
|
| 3 |
+
size 32170510
|
tokenizer.model
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e594c8a90eb08d8bda498ff4747977dc827ae0c3c56b5c0d41a605a22d02ef03
|
| 3 |
+
size 4689013
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"audio_token": "<|audio|>",
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"boa_token": "<|audio>",
|
| 5 |
+
"boi_token": "<|image>",
|
| 6 |
+
"bos_token": "<bos>",
|
| 7 |
+
"eoa_token": "<audio|>",
|
| 8 |
+
"eoc_token": "<channel|>",
|
| 9 |
+
"eoi_token": "<image|>",
|
| 10 |
+
"eos_token": "<eos>",
|
| 11 |
+
"eot_token": "<turn|>",
|
| 12 |
+
"escape_token": "<|\"|>",
|
| 13 |
+
"etc_token": "<tool_call|>",
|
| 14 |
+
"etd_token": "<tool|>",
|
| 15 |
+
"etr_token": "<tool_response|>",
|
| 16 |
+
"extra_special_tokens": [
|
| 17 |
+
"<|video|>"
|
| 18 |
+
],
|
| 19 |
+
"image_token": "<|image|>",
|
| 20 |
+
"is_local": true,
|
| 21 |
+
"local_files_only": false,
|
| 22 |
+
"mask_token": "<mask>",
|
| 23 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 24 |
+
"model_specific_special_tokens": {
|
| 25 |
+
"audio_token": "<|audio|>",
|
| 26 |
+
"boa_token": "<|audio>",
|
| 27 |
+
"boi_token": "<|image>",
|
| 28 |
+
"eoa_token": "<audio|>",
|
| 29 |
+
"eoc_token": "<channel|>",
|
| 30 |
+
"eoi_token": "<image|>",
|
| 31 |
+
"eot_token": "<turn|>",
|
| 32 |
+
"escape_token": "<|\"|>",
|
| 33 |
+
"etc_token": "<tool_call|>",
|
| 34 |
+
"etd_token": "<tool|>",
|
| 35 |
+
"etr_token": "<tool_response|>",
|
| 36 |
+
"image_token": "<|image|>",
|
| 37 |
+
"soc_token": "<|channel>",
|
| 38 |
+
"sot_token": "<|turn>",
|
| 39 |
+
"stc_token": "<|tool_call>",
|
| 40 |
+
"std_token": "<|tool>",
|
| 41 |
+
"str_token": "<|tool_response>",
|
| 42 |
+
"think_token": "<|think|>",
|
| 43 |
+
"video_token": "<|video|>"
|
| 44 |
+
},
|
| 45 |
+
"pad_token": "<pad>",
|
| 46 |
+
"padding_side": "right",
|
| 47 |
+
"processor_class": "EmbeddingGemma2Processor",
|
| 48 |
+
"soc_token": "<|channel>",
|
| 49 |
+
"sot_token": "<|turn>",
|
| 50 |
+
"stc_token": "<|tool_call>",
|
| 51 |
+
"std_token": "<|tool>",
|
| 52 |
+
"str_token": "<|tool_response>",
|
| 53 |
+
"think_token": "<|think|>",
|
| 54 |
+
"tokenizer_class": "GemmaTokenizer",
|
| 55 |
+
"unk_token": "<unk>",
|
| 56 |
+
"video_token": "<|video|>"
|
| 57 |
+
}
|