abtonmoy commited on
Commit
3f05159
·
verified ·
1 Parent(s): f998e1d

Card: fix line endings (clean LF; restore YAML frontmatter parsing)

Browse files
Files changed (1) hide show
  1. README.md +538 -269
README.md CHANGED
@@ -1,269 +1,538 @@
1
- ---
2
- license: cc-by-nc-4.0
3
- language:
4
- - en
5
- pipeline_tag: feature-extraction
6
- tags:
7
- - embeddings
8
- - multimodal
9
- - audio
10
- - retrieval
11
- - matryoshka
12
- - qwen3-vl
13
- - adapters
14
- base_model: Qwen/Qwen3-VL-Embedding-2B
15
- ---
16
-
17
- <p align="center">
18
- <img src="assets/fusion-embedding-2-banner.png" alt="Fusion Embedding 2 (2B-Preview) — Eximius Labs" width="100%">
19
- </p>
20
-
21
- # fusion-embedding-2-2b-preview
22
-
23
- <div align="center">
24
-
25
- [![Python](https://img.shields.io/badge/python-3.11+-blue.svg)](https://github.com/Eximius-Labs/fusion-embedding)
26
- [![PyTorch](https://img.shields.io/badge/PyTorch-2.x-ee4c2c.svg)](https://github.com/Eximius-Labs/fusion-embedding)
27
- [![Weights](https://img.shields.io/badge/weights-CC--BY--NC--4.0-green.svg)](#license)
28
- [![Status](https://img.shields.io/badge/status-research%20preview%20v0.3-orange.svg)](#)
29
- [![Paper](https://img.shields.io/badge/paper-arXiv%3A2607.18666-b31b1b.svg)](https://arxiv.org/abs/2607.18666)
30
- [![Code](https://img.shields.io/badge/code-GitHub-black.svg)](https://github.com/Eximius-Labs/fusion-embedding)
31
- [![Deploy on RunPod](https://api.runpod.io/badge/Eximius-Labs/fusion-embedding)](https://www.runpod.io/console/hub/Eximius-Labs/fusion-embedding)
32
-
33
- </div>
34
-
35
- `fusion-embedding-2-2b-preview` is the second generation of Eximius Labs' unified
36
- multimodal embedding models: **text, images, video, and audio in one vector space**.
37
- Audio is added to a byte-frozen vision-language base through modality-gated deep
38
- adapters, so gaining audio never changes a single existing text, image, or video
39
- vector. For the first-generation architecture see
40
- [fusion-embedding-1-2b-preview](https://huggingface.co/EximiusLabs/fusion-embedding-1-2b-preview)
41
- (that line is final at v0.3).
42
-
43
- [GitHub](https://github.com/Eximius-Labs/fusion-embedding) | Technical report: [arXiv:2607.18666](https://arxiv.org/abs/2607.18666)
44
-
45
- ## Model Overview
46
-
47
- <p align="center">
48
- <img src="assets/fe2_model_overview.png" alt="fusion-embedding-2 architecture: frozen Qwen3-VL-Embedding base with modality-gated adapters inside; frozen audio tower and trained FusionResampler on the audio branch; one shared embedding space" width="820px">
49
- </p>
50
-
51
- `fusion-embedding-2-2b-preview` embeds all four modalities on a
52
- [Qwen3-VL-Embedding-2B](https://huggingface.co/Qwen/Qwen3-VL-Embedding-2B) base that is
53
- **byte-identical to its original release**: its text, image, and video behaviour, and
54
- its benchmark scores, carry over exactly. Audio is added by training 60.6M parameters
55
- (about 2.3% of the stack): a perceiver-resampler that maps frozen
56
- [Qwen2.5-Omni](https://huggingface.co/Qwen/Qwen2.5-Omni-7B) audio-tower features into
57
- the base's input space, plus **28 gated adapters** (44.2M) that give the frozen
58
- language model in-layer capacity for audio. The adapters run only while audio is being
59
- encoded; every other forward pass returns the frozen layers' output untouched, so the
60
- invariance is bitwise, not approximate. Adding audio never invalidates an index you
61
- have already built.
62
-
63
- This v0.3 release ships two revisions of the same model. The default is tuned for
64
- audio-text retrieval; a keyword-tuned revision is available for spoken-command use.
65
-
66
- ## Versions in this release
67
-
68
- | Revision | Use it for | AudioCaps a2t R@10 | SpeechCommands |
69
- | --- | --- | --- | --- |
70
- | **`v0.3-preview`** (default) | general audio-text retrieval, RAG, clustering | **0.785** | 0.894 |
71
- | `v0.3-kw-preview` | spoken-keyword and command retrieval | 0.749 | **0.929** |
72
-
73
- The default (`v0.3-preview`) is the recommended model for almost all use. The
74
- keyword-tuned revision trades audio-text retrieval quality for higher zero-shot
75
- keyword-spotting accuracy; use it only when spoken-command matching is the priority,
76
- and use the default otherwise.
77
-
78
- ## Highlights (v0.3-preview)
79
-
80
- | Feature | Value |
81
- | --- | --- |
82
- | Parameters | ~2.06B frozen base + 640M frozen audio tower; **60.6M trained** |
83
- | Modalities | text, image, video, audio |
84
- | AudioCaps 883 (audio-to-text) | R@1 0.333 · R@5 0.646 · R@10 **0.785** · mAP@10 0.255 |
85
- | AudioCaps 883 (text-to-audio) | R@1 0.297 · R@5 0.653 · R@10 0.782 · mAP@10 0.445 |
86
- | MAEB(audio-only), 19 tasks | mean **0.454**; leads the board on IEMOCAP speaker-gender (0.938) |
87
- | Non-audio preservation | text, image, video outputs bit-for-bit the base model's |
88
- | Embedding dimension | 2048 (Matryoshka: 64, 128, 256, 512, 1024, 1536, 2048) |
89
- | Base model | Qwen/Qwen3-VL-Embedding-2B (byte-frozen) |
90
- | Audio tower | Qwen/Qwen2.5-Omni-7B audio encoder (frozen) |
91
-
92
- ## Evaluation
93
-
94
- <details open>
95
- <summary>AudioCaps retrieval (883-clip test, min-rank over references)</summary>
96
-
97
- | Model | a2t R@10 | t2a R@10 |
98
- | --- | --- | --- |
99
- | fusion-embedding-2 v0.2 | 0.743 | 0.775 |
100
- | **v0.3-preview** | **0.785** | 0.782 |
101
- | v0.3-kw-preview | 0.749 | 0.771 |
102
-
103
- The v0.3 default improves audio-to-text retrieval by 4.2 points over v0.2.
104
-
105
- </details>
106
-
107
- <details>
108
- <summary>MAEB(audio-only), full 19-task board — v0.3-preview</summary>
109
-
110
- Mean 0.4536. Scores are the main metric per task.
111
-
112
- | Task | Score |
113
- | --- | --- |
114
- | IEMOCAPGender | 0.938 |
115
- | BeijingOpera | 0.924 |
116
- | NMSQAPairClassification | 0.794 |
117
- | GTZANAudioReranking | 0.717 |
118
- | JamAltArtistA2ARetrieval | 0.687 |
119
- | GTZANGenre | 0.644 |
120
- | VoxPopuliLanguageID | 0.616 |
121
- | MInDS14 | 0.578 |
122
- | CREMADPairClassification | 0.543 |
123
- | MridinghamTonic | 0.540 |
124
- | VoxPopuliAccentPairClassification | 0.509 |
125
- | CREMA_D | 0.277 |
126
- | VoxCelebSA | 0.273 |
127
- | BirdCLEF | 0.184 |
128
- | CommonLanguageAgeDetection | 0.171 |
129
- | SIBFLEURS | 0.115 |
130
- | VoxPopuliGenderClustering | 0.079 |
131
- | VehicleSoundClustering | 0.025 |
132
- | CREMA_DClustering | 0.006 |
133
-
134
- IEMOCAP speaker-gender classification is the strongest cell relative to the field.
135
- Clustering tasks are the weakest and are a target for the next release.
136
-
137
- </details>
138
-
139
- <details>
140
- <summary>Non-audio preservation and other modalities</summary>
141
-
142
- Text, image, and video outputs are bit-for-bit identical to the frozen
143
- Qwen3-VL-Embedding-2B base (the adapter gate is closed on those inputs). Their
144
- benchmark scores are therefore the base model's own, unchanged by anything added for
145
- audio. Audio-to-image retrieval is emergent: the model is trained on audio-text pairs
146
- only, with no audio-image supervision.
147
-
148
- </details>
149
-
150
- ## Notes and limitations
151
-
152
- - **Emotion recognition regressed** relative to v0.2. On RAVDESS zero-shot emotion the
153
- score is 0.21 (v0.2: 0.35). The v0.3 training mix improved spoken-content
154
- understanding at the cost of vocal-prosody sensitivity. If speech-emotion is central
155
- to your use, evaluate before adopting.
156
- - One evaluation cell, `CommonLanguageAgeDetection`, derives from Common Voice, which is
157
- part of the training data. It scores low (0.171) and does not inflate the reported
158
- mean, but the potential overlap is noted for completeness.
159
- - These are research previews under CC-BY-NC-4.0.
160
-
161
- ## Usage
162
-
163
- <details>
164
- <summary>Requirements</summary>
165
-
166
- - `fusion_embedding` package: `pip install git+https://github.com/Eximius-Labs/fusion-embedding`
167
- - `transformers>=4.46`, `torch` (CUDA), `torchvision`, `pillow`, `soundfile`, `librosa`
168
- - ~14 GB GPU memory at bf16
169
-
170
- </details>
171
-
172
- <details open>
173
- <summary>via <code>inference.py</code> (this repository)</summary>
174
-
175
- ```python
176
- from inference import FusionEmbedder
177
-
178
- fe = FusionEmbedder.from_pretrained(
179
- "EximiusLabs/fusion-embedding-2-2b-preview",
180
- revision="v0.3-preview", # default, retrieval-tuned
181
- # revision="v0.3-kw-preview", # keyword-tuned alternative
182
- )
183
-
184
- a = fe.embed_audio("dog.wav") # audio file or (array, sr=...)
185
- t = fe.embed_text("a dog barks") # uses the base's native chat template
186
- i = fe.embed_image("dog.jpg") # PIL image or path
187
-
188
- print((a @ t).item(), (a @ i).item()) # cosine similarities in the shared space
189
-
190
- # Matryoshka: pass dim= for smaller embeddings (64..2048)
191
- t_small = fe.embed_text("a dog barks", dim=256)
192
- ```
193
-
194
- The checkpoint contains the gated adapters and the loader refuses to run without them.
195
- All inputs use the base model's chat-template format; embedding quality is sensitive to
196
- this formatting, so use the templates provided by `FusionEmbedder`.
197
-
198
- </details>
199
-
200
- <details>
201
- <summary>Cross-modal ranking tip</summary>
202
-
203
- When ranking a gallery of one modality against queries of another, per-modality
204
- mean-centering of the gallery improves cross-modal recall:
205
-
206
- ```python
207
- gallery = FusionEmbedder.center(gallery_embeddings)
208
- ```
209
-
210
- </details>
211
-
212
- ## Changelog
213
-
214
- - **v0.3-preview** (default): retrieval-tuned flagship. AudioCaps a2t R@10 0.785
215
- (+0.042 over v0.2); MAEB(audio-only) mean 0.454; leads IEMOCAP speaker-gender.
216
- RAVDESS emotion regressed to 0.21.
217
- - **v0.3-kw-preview**: keyword-tuned revision. SpeechCommands zero-shot 0.929;
218
- AudioCaps a2t R@10 0.749.
219
- - **v0.2-preview**: AudioCaps 2.0 fine-tune. a2t R@10 0.743.
220
- - **v0.1-preview**: first modality-gated-adapter release.
221
-
222
- ## Deploy on RunPod
223
-
224
- [![Deploy on RunPod](https://api.runpod.io/badge/Eximius-Labs/fusion-embedding)](https://www.runpod.io/console/hub/Eximius-Labs/fusion-embedding)
225
-
226
- One-click deploy the endpoint from the
227
- [RunPod Hub](https://www.runpod.io/console/hub/Eximius-Labs/fusion-embedding) (serverless,
228
- scales to zero when idle). Once it is running, call it:
229
-
230
- ```bash
231
- curl -s https://api.runpod.ai/v2/<ENDPOINT_ID>/runsync -H "Authorization: Bearer $RUNPOD_API_KEY" -H "Content-Type: application/json" -d '{"input": {"text": "a dog on a beach"}}'
232
- ```
233
-
234
- The endpoint embeds all four modalities. Swap `text` for `image`, `video`, or `audio`
235
- (the value is an https URL, a data URI, or base64). Audio needs the audio tower, so set
236
- `FE2_ENABLE_AUDIO=1` on the endpoint and use a 24 GB or larger GPU. Returns 1024-d
237
- embeddings; add `"dim": 512` to truncate.
238
-
239
- ## License
240
-
241
- Weights (all revisions): **CC-BY-NC-4.0** (research preview). The code is Apache-2.0.
242
- The frozen base and audio tower retain their original licenses.
243
-
244
- ## Citation
245
-
246
- Model:
247
-
248
- ```bibtex
249
- @software{fusion_embedding_2_2026,
250
- title = {Fusion Embedding 2: Modality-Gated Deep Adapters for a
251
- Unified Text, Image, Video, and Audio Embedding Space},
252
- author = {Tonmoy, Abdul Basit},
253
- year = {2026},
254
- url = {https://huggingface.co/EximiusLabs/fusion-embedding-2-2b-preview}
255
- }
256
- ```
257
-
258
- Technical report:
259
-
260
- ```bibtex
261
- @article{tonmoy2026fusion,
262
- title = {Fusion Embedding: A Unified Embedding Space for Text, Image,
263
- Video, and Audio},
264
- author = {Tonmoy, Abdul Basit and Hoque, Kazi Fardinul and
265
- Arham, Md. Shahrier Islam and Luthra, Arman},
266
- journal = {arXiv preprint arXiv:2607.18666},
267
- year = {2026}
268
- }
269
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+
3
+ license: cc-by-nc-4.0
4
+
5
+ language:
6
+
7
+ - en
8
+
9
+ pipeline_tag: feature-extraction
10
+
11
+ tags:
12
+
13
+ - embeddings
14
+
15
+ - multimodal
16
+
17
+ - audio
18
+
19
+ - retrieval
20
+
21
+ - matryoshka
22
+
23
+ - qwen3-vl
24
+
25
+ - adapters
26
+
27
+ base_model: Qwen/Qwen3-VL-Embedding-2B
28
+
29
+ ---
30
+
31
+
32
+
33
+ <p align="center">
34
+
35
+ <img src="assets/fusion-embedding-2-banner.png" alt="Fusion Embedding 2 (2B-Preview) Eximius Labs" width="100%">
36
+
37
+ </p>
38
+
39
+
40
+
41
+ # fusion-embedding-2-2b-preview
42
+
43
+
44
+
45
+ <div align="center">
46
+
47
+
48
+
49
+ [![Python](https://img.shields.io/badge/python-3.11+-blue.svg)](https://github.com/Eximius-Labs/fusion-embedding)
50
+
51
+ [![PyTorch](https://img.shields.io/badge/PyTorch-2.x-ee4c2c.svg)](https://github.com/Eximius-Labs/fusion-embedding)
52
+
53
+ [![Weights](https://img.shields.io/badge/weights-CC--BY--NC--4.0-green.svg)](#license)
54
+
55
+ [![Status](https://img.shields.io/badge/status-research%20preview%20v0.3-orange.svg)](#)
56
+
57
+ [![Paper](https://img.shields.io/badge/paper-arXiv%3A2607.18666-b31b1b.svg)](https://arxiv.org/abs/2607.18666)
58
+
59
+ [![Code](https://img.shields.io/badge/code-GitHub-black.svg)](https://github.com/Eximius-Labs/fusion-embedding)
60
+
61
+ [![Deploy on RunPod](https://api.runpod.io/badge/Eximius-Labs/fusion-embedding)](https://www.runpod.io/console/hub/Eximius-Labs/fusion-embedding)
62
+
63
+
64
+
65
+ </div>
66
+
67
+
68
+
69
+ `fusion-embedding-2-2b-preview` is the second generation of Eximius Labs' unified
70
+
71
+ multimodal embedding models: **text, images, video, and audio in one vector space**.
72
+
73
+ Audio is added to a byte-frozen vision-language base through modality-gated deep
74
+
75
+ adapters, so gaining audio never changes a single existing text, image, or video
76
+
77
+ vector. For the first-generation architecture see
78
+
79
+ [fusion-embedding-1-2b-preview](https://huggingface.co/EximiusLabs/fusion-embedding-1-2b-preview)
80
+
81
+ (that line is final at v0.3).
82
+
83
+
84
+
85
+ [GitHub](https://github.com/Eximius-Labs/fusion-embedding) | Technical report: [arXiv:2607.18666](https://arxiv.org/abs/2607.18666)
86
+
87
+
88
+
89
+ ## Model Overview
90
+
91
+
92
+
93
+ <p align="center">
94
+
95
+ <img src="assets/fe2_model_overview.png" alt="fusion-embedding-2 architecture: frozen Qwen3-VL-Embedding base with modality-gated adapters inside; frozen audio tower and trained FusionResampler on the audio branch; one shared embedding space" width="820px">
96
+
97
+ </p>
98
+
99
+
100
+
101
+ `fusion-embedding-2-2b-preview` embeds all four modalities on a
102
+
103
+ [Qwen3-VL-Embedding-2B](https://huggingface.co/Qwen/Qwen3-VL-Embedding-2B) base that is
104
+
105
+ **byte-identical to its original release**: its text, image, and video behaviour, and
106
+
107
+ its benchmark scores, carry over exactly. Audio is added by training 60.6M parameters
108
+
109
+ (about 2.3% of the stack): a perceiver-resampler that maps frozen
110
+
111
+ [Qwen2.5-Omni](https://huggingface.co/Qwen/Qwen2.5-Omni-7B) audio-tower features into
112
+
113
+ the base's input space, plus **28 gated adapters** (44.2M) that give the frozen
114
+
115
+ language model in-layer capacity for audio. The adapters run only while audio is being
116
+
117
+ encoded; every other forward pass returns the frozen layers' output untouched, so the
118
+
119
+ invariance is bitwise, not approximate. Adding audio never invalidates an index you
120
+
121
+ have already built.
122
+
123
+
124
+
125
+ This v0.3 release ships two revisions of the same model. The default is tuned for
126
+
127
+ audio-text retrieval; a keyword-tuned revision is available for spoken-command use.
128
+
129
+
130
+
131
+ ## Versions in this release
132
+
133
+
134
+
135
+ | Revision | Use it for | AudioCaps a2t R@10 | SpeechCommands |
136
+
137
+ | --- | --- | --- | --- |
138
+
139
+ | **`v0.3-preview`** (default) | general audio-text retrieval, RAG, clustering | **0.785** | 0.894 |
140
+
141
+ | `v0.3-kw-preview` | spoken-keyword and command retrieval | 0.749 | **0.929** |
142
+
143
+
144
+
145
+ The default (`v0.3-preview`) is the recommended model for almost all use. The
146
+
147
+ keyword-tuned revision trades audio-text retrieval quality for higher zero-shot
148
+
149
+ keyword-spotting accuracy; use it only when spoken-command matching is the priority,
150
+
151
+ and use the default otherwise.
152
+
153
+
154
+
155
+ ## Highlights (v0.3-preview)
156
+
157
+
158
+
159
+ | Feature | Value |
160
+
161
+ | --- | --- |
162
+
163
+ | Parameters | ~2.06B frozen base + 640M frozen audio tower; **60.6M trained** |
164
+
165
+ | Modalities | text, image, video, audio |
166
+
167
+ | AudioCaps 883 (audio-to-text) | R@1 0.333 · R@5 0.646 · R@10 **0.785** · mAP@10 0.255 |
168
+
169
+ | AudioCaps 883 (text-to-audio) | R@1 0.297 · R@5 0.653 · R@10 0.782 · mAP@10 0.445 |
170
+
171
+ | MAEB(audio-only), 19 tasks | mean **0.454**; leads the board on IEMOCAP speaker-gender (0.938) |
172
+
173
+ | Non-audio preservation | text, image, video outputs bit-for-bit the base model's |
174
+
175
+ | Embedding dimension | 2048 (Matryoshka: 64, 128, 256, 512, 1024, 1536, 2048) |
176
+
177
+ | Base model | Qwen/Qwen3-VL-Embedding-2B (byte-frozen) |
178
+
179
+ | Audio tower | Qwen/Qwen2.5-Omni-7B audio encoder (frozen) |
180
+
181
+
182
+
183
+ ## Evaluation
184
+
185
+
186
+
187
+ <details open>
188
+
189
+ <summary>AudioCaps retrieval (883-clip test, min-rank over references)</summary>
190
+
191
+
192
+
193
+ | Model | a2t R@10 | t2a R@10 |
194
+
195
+ | --- | --- | --- |
196
+
197
+ | fusion-embedding-2 v0.2 | 0.743 | 0.775 |
198
+
199
+ | **v0.3-preview** | **0.785** | 0.782 |
200
+
201
+ | v0.3-kw-preview | 0.749 | 0.771 |
202
+
203
+
204
+
205
+ The v0.3 default improves audio-to-text retrieval by 4.2 points over v0.2.
206
+
207
+
208
+
209
+ </details>
210
+
211
+
212
+
213
+ <details>
214
+
215
+ <summary>MAEB(audio-only), full 19-task board v0.3-preview</summary>
216
+
217
+
218
+
219
+ Mean 0.4536. Scores are the main metric per task.
220
+
221
+
222
+
223
+ | Task | Score |
224
+
225
+ | --- | --- |
226
+
227
+ | IEMOCAPGender | 0.938 |
228
+
229
+ | BeijingOpera | 0.924 |
230
+
231
+ | NMSQAPairClassification | 0.794 |
232
+
233
+ | GTZANAudioReranking | 0.717 |
234
+
235
+ | JamAltArtistA2ARetrieval | 0.687 |
236
+
237
+ | GTZANGenre | 0.644 |
238
+
239
+ | VoxPopuliLanguageID | 0.616 |
240
+
241
+ | MInDS14 | 0.578 |
242
+
243
+ | CREMADPairClassification | 0.543 |
244
+
245
+ | MridinghamTonic | 0.540 |
246
+
247
+ | VoxPopuliAccentPairClassification | 0.509 |
248
+
249
+ | CREMA_D | 0.277 |
250
+
251
+ | VoxCelebSA | 0.273 |
252
+
253
+ | BirdCLEF | 0.184 |
254
+
255
+ | CommonLanguageAgeDetection | 0.171 |
256
+
257
+ | SIBFLEURS | 0.115 |
258
+
259
+ | VoxPopuliGenderClustering | 0.079 |
260
+
261
+ | VehicleSoundClustering | 0.025 |
262
+
263
+ | CREMA_DClustering | 0.006 |
264
+
265
+
266
+
267
+ IEMOCAP speaker-gender classification is the strongest cell relative to the field.
268
+
269
+ Clustering tasks are the weakest and are a target for the next release.
270
+
271
+
272
+
273
+ </details>
274
+
275
+
276
+
277
+ <details>
278
+
279
+ <summary>Non-audio preservation and other modalities</summary>
280
+
281
+
282
+
283
+ Text, image, and video outputs are bit-for-bit identical to the frozen
284
+
285
+ Qwen3-VL-Embedding-2B base (the adapter gate is closed on those inputs). Their
286
+
287
+ benchmark scores are therefore the base model's own, unchanged by anything added for
288
+
289
+ audio. Audio-to-image retrieval is emergent: the model is trained on audio-text pairs
290
+
291
+ only, with no audio-image supervision.
292
+
293
+
294
+
295
+ </details>
296
+
297
+
298
+
299
+ ## Notes and limitations
300
+
301
+
302
+
303
+ - **Emotion recognition regressed** relative to v0.2. On RAVDESS zero-shot emotion the
304
+
305
+ score is 0.21 (v0.2: 0.35). The v0.3 training mix improved spoken-content
306
+
307
+ understanding at the cost of vocal-prosody sensitivity. If speech-emotion is central
308
+
309
+ to your use, evaluate before adopting.
310
+
311
+ - One evaluation cell, `CommonLanguageAgeDetection`, derives from Common Voice, which is
312
+
313
+ part of the training data. It scores low (0.171) and does not inflate the reported
314
+
315
+ mean, but the potential overlap is noted for completeness.
316
+
317
+ - These are research previews under CC-BY-NC-4.0.
318
+
319
+
320
+
321
+ ## Usage
322
+
323
+
324
+
325
+ <details>
326
+
327
+ <summary>Requirements</summary>
328
+
329
+
330
+
331
+ - `fusion_embedding` package: `pip install git+https://github.com/Eximius-Labs/fusion-embedding`
332
+
333
+ - `transformers>=4.46`, `torch` (CUDA), `torchvision`, `pillow`, `soundfile`, `librosa`
334
+
335
+ - ~14 GB GPU memory at bf16
336
+
337
+
338
+
339
+ </details>
340
+
341
+
342
+
343
+ <details open>
344
+
345
+ <summary>via <code>inference.py</code> (this repository)</summary>
346
+
347
+
348
+
349
+ ```python
350
+
351
+ from inference import FusionEmbedder
352
+
353
+
354
+
355
+ fe = FusionEmbedder.from_pretrained(
356
+
357
+ "EximiusLabs/fusion-embedding-2-2b-preview",
358
+
359
+ revision="v0.3-preview", # default, retrieval-tuned
360
+
361
+ # revision="v0.3-kw-preview", # keyword-tuned alternative
362
+
363
+ )
364
+
365
+
366
+
367
+ a = fe.embed_audio("dog.wav") # audio file or (array, sr=...)
368
+
369
+ t = fe.embed_text("a dog barks") # uses the base's native chat template
370
+
371
+ i = fe.embed_image("dog.jpg") # PIL image or path
372
+
373
+
374
+
375
+ print((a @ t).item(), (a @ i).item()) # cosine similarities in the shared space
376
+
377
+
378
+
379
+ # Matryoshka: pass dim= for smaller embeddings (64..2048)
380
+
381
+ t_small = fe.embed_text("a dog barks", dim=256)
382
+
383
+ ```
384
+
385
+
386
+
387
+ The checkpoint contains the gated adapters and the loader refuses to run without them.
388
+
389
+ All inputs use the base model's chat-template format; embedding quality is sensitive to
390
+
391
+ this formatting, so use the templates provided by `FusionEmbedder`.
392
+
393
+
394
+
395
+ </details>
396
+
397
+
398
+
399
+ <details>
400
+
401
+ <summary>Cross-modal ranking tip</summary>
402
+
403
+
404
+
405
+ When ranking a gallery of one modality against queries of another, per-modality
406
+
407
+ mean-centering of the gallery improves cross-modal recall:
408
+
409
+
410
+
411
+ ```python
412
+
413
+ gallery = FusionEmbedder.center(gallery_embeddings)
414
+
415
+ ```
416
+
417
+
418
+
419
+ </details>
420
+
421
+
422
+
423
+ ## Changelog
424
+
425
+
426
+
427
+ - **v0.3-preview** (default): retrieval-tuned flagship. AudioCaps a2t R@10 0.785
428
+
429
+ (+0.042 over v0.2); MAEB(audio-only) mean 0.454; leads IEMOCAP speaker-gender.
430
+
431
+ RAVDESS emotion regressed to 0.21.
432
+
433
+ - **v0.3-kw-preview**: keyword-tuned revision. SpeechCommands zero-shot 0.929;
434
+
435
+ AudioCaps a2t R@10 0.749.
436
+
437
+ - **v0.2-preview**: AudioCaps 2.0 fine-tune. a2t R@10 0.743.
438
+
439
+ - **v0.1-preview**: first modality-gated-adapter release.
440
+
441
+
442
+
443
+ ## Deploy on RunPod
444
+
445
+
446
+
447
+ [![Deploy on RunPod](https://api.runpod.io/badge/Eximius-Labs/fusion-embedding)](https://www.runpod.io/console/hub/Eximius-Labs/fusion-embedding)
448
+
449
+
450
+
451
+ One-click deploy the endpoint from the
452
+
453
+ [RunPod Hub](https://www.runpod.io/console/hub/Eximius-Labs/fusion-embedding) (serverless,
454
+
455
+ scales to zero when idle). Once it is running, call it:
456
+
457
+
458
+
459
+ ```bash
460
+
461
+ curl -s https://api.runpod.ai/v2/<ENDPOINT_ID>/runsync -H "Authorization: Bearer $RUNPOD_API_KEY" -H "Content-Type: application/json" -d '{"input": {"text": "a dog on a beach"}}'
462
+
463
+ ```
464
+
465
+
466
+
467
+ The endpoint embeds all four modalities. Swap `text` for `image`, `video`, or `audio`
468
+
469
+ (the value is an https URL, a data URI, or base64). Audio needs the audio tower, so set
470
+
471
+ `FE2_ENABLE_AUDIO=1` on the endpoint and use a 24 GB or larger GPU. Returns 1024-d
472
+
473
+ embeddings; add `"dim": 512` to truncate.
474
+
475
+
476
+
477
+ ## License
478
+
479
+
480
+
481
+ Weights (all revisions): **CC-BY-NC-4.0** (research preview). The code is Apache-2.0.
482
+
483
+ The frozen base and audio tower retain their original licenses.
484
+
485
+
486
+
487
+ ## Citation
488
+
489
+
490
+
491
+ Model:
492
+
493
+
494
+
495
+ ```bibtex
496
+
497
+ @software{fusion_embedding_2_2026,
498
+
499
+ title = {Fusion Embedding 2: Modality-Gated Deep Adapters for a
500
+
501
+ Unified Text, Image, Video, and Audio Embedding Space},
502
+
503
+ author = {Tonmoy, Abdul Basit},
504
+
505
+ year = {2026},
506
+
507
+ url = {https://huggingface.co/EximiusLabs/fusion-embedding-2-2b-preview}
508
+
509
+ }
510
+
511
+ ```
512
+
513
+
514
+
515
+ Technical report:
516
+
517
+
518
+
519
+ ```bibtex
520
+
521
+ @article{tonmoy2026fusion,
522
+
523
+ title = {Fusion Embedding: A Unified Embedding Space for Text, Image,
524
+
525
+ Video, and Audio},
526
+
527
+ author = {Tonmoy, Abdul Basit and Hoque, Kazi Fardinul and
528
+
529
+ Arham, Md. Shahrier Islam and Luthra, Arman},
530
+
531
+ journal = {arXiv preprint arXiv:2607.18666},
532
+
533
+ year = {2026}
534
+
535
+ }
536
+
537
+ ```
538
+