abtonmoy commited on
Commit
66f6df9
·
verified ·
1 Parent(s): 48a0ddb

Card: clean rebuild - single-row badges + RunPod on next row, fixed frontmatter

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