Model card: v2
Browse files
README.md
CHANGED
|
@@ -5,20 +5,44 @@ library_name: coreml
|
|
| 5 |
pipeline_tag: sentence-similarity
|
| 6 |
language: [en, ru, es]
|
| 7 |
tags: [coreml, sentence-embeddings, e5, macos]
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
# multilingual-e5-small, Core ML (int8)
|
| 11 |
|
| 12 |
[intfloat/multilingual-e5-small](https://huggingface.co/intfloat/multilingual-e5-small) converted to Core ML for
|
| 13 |
-
local file search on macOS (Seklu
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
-
|
| 21 |
-
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
License: MIT, as the original model (see `LICENSE`).
|
|
|
|
| 5 |
pipeline_tag: sentence-similarity
|
| 6 |
language: [en, ru, es]
|
| 7 |
tags: [coreml, sentence-embeddings, e5, macos]
|
| 8 |
+
datasets: [miracl/miracl, castorini/mr-tydi]
|
| 9 |
---
|
| 10 |
|
| 11 |
# multilingual-e5-small, Core ML (int8)
|
| 12 |
|
| 13 |
[intfloat/multilingual-e5-small](https://huggingface.co/intfloat/multilingual-e5-small) converted to Core ML for
|
| 14 |
+
local file search on macOS (Seklu / Finder+).
|
| 15 |
+
|
| 16 |
+
## Files
|
| 17 |
+
|
| 18 |
+
Each zip holds `intfloat.multilingual-e5-small/` with:
|
| 19 |
+
- `E5Small.mlmodelc`: compiled Core ML model; inputs `input_ids`, `attention_mask` (int32, 1×16/32/64/128/256),
|
| 20 |
+
output `embedding` (384, mean-pooled and L2-normalised inside the model). macOS 15+.
|
| 21 |
+
- `vocab.tsv`: the SentencePiece Unigram vocabulary (piece TAB score, line number = id). Same as the base model.
|
| 22 |
+
|
| 23 |
+
Prefix texts with `query: ` or `passage: ` as the original model card says.
|
| 24 |
+
|
| 25 |
+
### v2: fine-tuned for cross-language search (ru / es / en)
|
| 26 |
+
|
| 27 |
+
`e5-small-coreml-v2.zip` (112,355,911 bytes, SHA-256
|
| 28 |
+
`1ef89f1d733eb6ea94e65ffc41b87b732fa49ee2bf4f302612ee27c1763cc095`).
|
| 29 |
+
|
| 30 |
+
Fine-tuned so that a query in one language finds a document in another (e.g. a Russian query, a Spanish letter).
|
| 31 |
+
Training data, all with licenses that allow commercial use:
|
| 32 |
+
- [MIRACL](https://huggingface.co/datasets/miracl/miracl) train and dev, ru / es / en (Apache-2.0)
|
| 33 |
+
- [Mr. TyDi](https://huggingface.co/datasets/castorini/mr-tydi) ru (Apache-2.0)
|
| 34 |
+
- queries and 6,000 passages translated with [OPUS-MT](https://huggingface.co/Helsinki-NLP) (Apache-2.0 / CC-BY-4.0)
|
| 35 |
+
|
| 36 |
+
86,548 (query, passage) pairs over 9 language directions, 1 epoch, batch 64, lr 1e-5, in-batch negatives, symmetric
|
| 37 |
+
InfoNCE, temperature 0.02. On a private set of 77 file-search queries over real personal documents: hit@10 33 → 46,
|
| 38 |
+
cross-language hit@10 18/58 → 31/58. Scores spread wider than the base model (top hits ~0.6-0.75 instead of ~0.85).
|
| 39 |
+
Core ML int8 vs PyTorch: cosine ≥ 0.9996.
|
| 40 |
+
|
| 41 |
+
### v1: the base model
|
| 42 |
+
|
| 43 |
+
`e5-small-coreml-v1.zip` (112,357,732 bytes, SHA-256
|
| 44 |
+
`ac5a88751994cce0844a96af3ff79bdb8dec100c3439057b176172a760f4c41a`). Same weights as the base model (int8-quantized).
|
| 45 |
+
Checked against PyTorch: cosine ≥ 0.9998 on EN/RU texts; a Swift tokenizer from `vocab.tsv` gave the same ids as
|
| 46 |
+
Hugging Face `tokenizers` on 1511 of 1511 test strings.
|
| 47 |
|
| 48 |
License: MIT, as the original model (see `LICENSE`).
|