加载中…
加载中…
A small, fast, Dutch-only sentence embedding model distilled from all-MiniLM-L6-v2.
It produces 384-dimensional embeddings in the same vector space as the English teacher model, enabling cross-lingual search and retrieval between Dutch and English.
| Property | Value |
|---|---|
| Architecture | BertModel (6 layers, 384 hidden) + Mean Pooling |
| Parameters | 22.5M |
| Vocabulary | 30,000 Dutch WordPiece tokens |
| Embedding dimension | 384 |
| Max sequence length | 128 |
| Model size | ~86 MB |
| Language | Dutch (nl) |
| License | Apache 2.0 |
A new WordPiece tokenizer (30k vocab) was trained from scratch on Dutch text from the parallel training corpora. This gives proper tokenization of Dutch compound words (e.g. "stofzuiger", "aanrechtblad", "vaatwastabletten") instead of fragmenting them into many subword pieces.
The student reuses the same MiniLM-L6 transformer architecture (6 layers, 384 hidden size). All transformer layer weights were copied directly from the English teacher. The embedding layer was re-initialized for the new Dutch vocabulary, with shared tokens (punctuation, numbers, overlapping subwords) copied from the teacher.
The student was trained to mimic the teacher's sentence embeddings using MSE loss on parallel English-Dutch sentence pairs. The teacher encodes the English sentence, and the student learns to produce the same embedding from the Dutch translation.
| Dataset | Source |
|---|---|
| Europarl | European Parliament proceedings |
| TED Talks | TED talk transcripts |
| OpenSubtitles | Movie/TV subtitles |
| Tatoeba | Community-translated sentences |
| WikiTitles | Wikipedia article titles |
Spearman/Pearson correlation with human similarity judgments on 1,379 Dutch sentence pairs:
| Model | Spearman | Pearson |
|---|---|---|
| all-MiniLM-L6-v2 (teacher, English) | 0.5546 | 0.5474 |
| dutch-minilm-l6-v2 (student, Dutch) | 0.7508 | 0.7540 |
Spearman/Pearson on 250 Dutch-English sentence pairs:
| Model | Spearman | Pearson |
|---|---|---|
| all-MiniLM-L6-v2 (teacher) | 0.2900 | 0.3272 |
| dutch-minilm-l6-v2 (student) | 0.7929 | 0.7954 |
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("MarkSelles/dutch-minilm-l6-v2")
sentences = [
"De kat zit op de mat.",
"Een poes ligt op het kleed.",
"De auto rijdt over de snelweg.",
]
embeddings = model.encode(sentences)
print(embeddings.shape) # (3, 384)
Since the Dutch student produces embeddings in the same vector space as the English teacher, you can use both models together for cross-lingual retrieval:
from sentence_transformers import SentenceTransformer
from sentence_transformers.util import cos_sim
# Dutch queries
dutch_model = SentenceTransformer("MarkSelles/dutch-minilm-l6-v2")
query_emb = dutch_model.encode(["draadloze koptelefoon"])
# English product catalog
english_model = SentenceTransformer("sentence-transformers/all-MiniLM-L6-v2")
product_embs = english_model.encode([
"Wireless Bluetooth headphones with noise cancelling",
"Wired USB-C earbuds",
"Portable speaker",
])
similarities = cos_sim(query_emb, product_embs)
print(similarities)
If you use this model, please cite the original teacher model:
@inproceedings{reimers-2020-multilingual-sentence-bert,
title = "Making Monolingual Sentence Embeddings Multilingual using Knowledge Distillation",
author = "Reimers, Nils and Gurevych, Iryna",
booktitle = "Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing",
year = "2020",
url = "https://arxiv.org/abs/2004.09813",
}