File size: 4,853 Bytes
8599de2 4379323 8599de2 4379323 8599de2 4379323 8599de2 4379323 8599de2 4379323 8599de2 4379323 8599de2 4379323 8599de2 4379323 8599de2 4379323 8599de2 4379323 8599de2 4379323 8599de2 4379323 8599de2 4379323 8599de2 4379323 8599de2 4379323 8599de2 4379323 8599de2 4379323 8599de2 4379323 8599de2 4379323 8599de2 4379323 8599de2 4379323 8599de2 4379323 8599de2 4379323 8599de2 4379323 8599de2 4379323 8599de2 4379323 8599de2 4379323 8599de2 4379323 8599de2 4379323 8599de2 4379323 8599de2 4379323 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | ---
library_name: onnx
pipeline_tag: feature-extraction
tags:
- eidora
- eidora-model-zoo
- onnx
- onnxruntime
- embeddings
- text
license: mit
base_model: intfloat/multilingual-e5-base
---
# Multilingual E5 Base — Text Embeddings
Multilingual E5 Base represents passages from many languages in one embedding space. This EIDORA adaptation returns a normalized 768-dimensional text vector using the pretrained XLM-RoBERTa-based model.
## Recommended Use
Choose E5 when your collection includes more than one language, such as transcripts and translations that you want to explore together. It supports semantic comparison and query-to-passage retrieval, provided the required E5 input prefixes are used consistently. It does not translate the source material.
## Limitations
- Use the correct `query:` and `passage:` prefixes for retrieval; EIDORA does not add them automatically.
- Text longer than the configured 512 tokens is truncated, so long documents need to be segmented.
- Cross-language similarity varies by language, domain and transcription quality; it is not a translation-accuracy score or an emotion label.
## Input
**What you provide:** text. EIDORA tokenizes it using the tokenizer packaged with the model; the ONNX graph itself receives token IDs rather than raw characters.
| ONNX input | Type | Shape | Prepared from |
| --- | --- | --- | --- |
| `input_ids` | `int64` | `[batch, 512]` | token_ids |
| `attention_mask` | `int64` | `[batch, 512]` | attention_mask |
## Output
`embedding` is `float32` with shape `[batch, 768]`. The **768-dimensional** embedding is **L2-normalized** for **cosine similarity**. It is a representation of the tokenized text, not generated text, sentiment, or a factuality score.
## Preprocessing
EIDORA uses the packaged tokenizer in `tokenizer/`, adds special tokens, then pads and truncates on the **right** to **512 tokens** (truncation on the **right**). It passes `input_ids` and `attention_mask` as integer tensors. Longer texts need to be split into passages before encoding.
**E5 prefixes are part of the model input.** Use `query: ...` for a search question and `passage: ...` for documents. For symmetric comparisons, the upstream guidance also uses `query: ...`. The configuration supplies **no automatic prefix**, so include it in the text yourself.
## Model Source and Architecture
Multilingual E5 Base builds on XLM-RoBERTa. EIDORA mean-pools the final token features using the attention mask and L2-normalizes the resulting 768-dimensional vector.
## Training Data and Checkpoint Provenance
- **Upstream checkpoint:** [`intfloat/multilingual-e5-base`](https://huggingface.co/intfloat/multilingual-e5-base).
- **Pinned revision:** `d128750597153bb5987e10b1c3493a34e5a4502a`.
The source checkpoint is `intfloat/multilingual-e5-base`. Upstream multilingual E5 training includes multilingual contrastive pretraining and supervised fine-tuning on text pairs. The EIDORA export does not declare further training.
## Research Context
**Research paper:** [Multilingual E5 Text Embeddings: A Technical Report](https://arxiv.org/abs/2402.05672)
Wang and colleagues describe a multilingual embedding model designed for retrieval and related semantic comparison tasks. The model is relevant where collection descriptions span languages, but the intended prefix convention forms part of the model’s input contract.
## Attribution and Licensing
The upstream checkpoint and EIDORA package metadata list MIT. Attribution belongs to the multilingual E5 authors and the Microsoft UniLM project; retain the source license text when redistributing.
## References
- **Research paper:** [Multilingual E5 Text Embeddings: A Technical Report](https://arxiv.org/abs/2402.05672)
- **Source checkpoint:** [intfloat/multilingual-e5-base](https://huggingface.co/intfloat/multilingual-e5-base)
**Suggested research citation (from the packaged configuration):**
```bibtex
@misc{wang2024multilinguale5,
title={Multilingual E5 Text Embeddings: A Technical Report},
author={Liang Wang and Nan Yang and Xiaolong Huang and Linjun Yang and Rangan Majumder and Furu Wei},
year={2024},
eprint={2402.05672},
archivePrefix={arXiv}
}
```
## Package Information
- **Repository:** `EIDORA/Multilingual_E5_Base`
- **Package schema / version:** `3` / `1.0.0`
- **Modality:** `text`
- **ONNX graph(s):** `model.onnx`
- **Configuration:** `config.yaml`
- **Tokenizer assets:** `tokenizer/`
- **Declared ONNX Runtime providers:** `CUDAExecutionProvider`, `CPUExecutionProvider`, `CoreMLExecutionProvider`
Execution-provider availability depends on the user’s EIDORA installation, operating system and hardware. The declared providers are configuration options, not a guarantee of equal speed or identical hardware use. The `config.yaml` file defines the exact runtime input/output contract.
|