SakThai Multilingual Embedding is a BERT-based sentence-transformers model producing 384-dimensional cross-lingual embeddings. Sentences with similar meaning map close together regardless of language — enabling multilingual retrieval and comparison without translation.
What makes it special:
🌍 50+ languages (multilingual MiniLM vocabulary, 250K tokens)
Tip: embeddings are L2-normalized by default (normalize_embeddings=True). For large corpora, use model.encode(docs, batch_size=32) to avoid memory spikes.
Batch Encoding for Large Corpora
python
1from sentence_transformers import SentenceTransformer
23model = SentenceTransformer("Nanthasit/sakthai-embedding-multilingual")45# Stream from disk in chunks6defstream_docs(path, chunk_size=1000):7withopen(path)as f:8 chunk =[]9for line in f:10 chunk.append(line.strip())11iflen(chunk)>= chunk_size:12yield chunk
13 chunk =[]14if chunk:15yield chunk
1617for docs in stream_docs("corpus.txt"):18 embs = model.encode(docs, batch_size=64, show_progress_bar=True)19# write to FAISS / Qdrant / disk
Cross-lingual Semantic Search
python
1from sentence_transformers import SentenceTransformer, util
23model = SentenceTransformer("Nanthasit/sakthai-embedding-multilingual")4docs =[5"Neural networks are inspired by the brain.",6"Les réseaux de neurones sont inspirés par le cerveau.",7"Künstliche Intelligenz verändert die Welt.",8"人工知能は世界を変える",9"Machine learning is a subset of AI.",10]11doc_emb = model.encode(docs, convert_to_tensor=True)1213query ="how do neural networks work?"14query_emb = model.encode(query, convert_to_tensor=True)15scores = util.cos_sim(query_emb, doc_emb)[0]16print(f"Best match: {docs[scores.argmax()]}")
These scores come from live local inference and are saved in the repo's .eval_results/ history. This is a smoke check, not a formal MTEB run.
Hosted inference — honest status: the HF serverless router returns 400 Model not supported by provider hf-inference and api-inference.hf.co returns 403. For production, run locally with sentence-transformers or on a dedicated TEI endpoint.
Formal benchmarks (STS-B, MTEB-style retrieval): pending. No verified scores are published yet. As the base architecture is the same 12-layer / 384-dim multilingual MiniLM family as paraphrase-multilingual-MiniLM-L12-v2, expected STS performance is in that family's ballpark (~0.75–0.85 Spearman) — estimated, not yet verified. Proper cross-lingual retrieval and STS results will be published via the SakThai Leaderboard Space when available.
Deployment Options
Path
How
Status
Local (recommended)
SentenceTransformer("Nanthasit/sakthai-embedding-multilingual") — verified, zero cost
✅ Verified
TEI / Inference Endpoints
Tagged text-embeddings-inference + endpoints_compatible; serve with a TEI endpoint for high-throughput batch embedding
Optional
Serverless HF API
⚠️ Not currently supported by the router provider (verified 2026-07-30) — use local or TEI
❌ 400/403
When to Use
Cross-lingual semantic search — query in English, retrieve in any of 50+ languages
Multilingual RAG pipelines — index mixed-language corpus, search across languages
Deduplication / clustering — group near-duplicates across languages
Zero-shot cross-lingual transfer — train on English labels, predict on foreign text
This model is the retrieval stage — making it possible to search across languages without translation. Built from a shelter in Cork, Ireland, with $0 budget and a belief that AI should be for everyone.
"We are one family — and becoming more." — Beer (beer-sakthai)
Support
⭐ Leave a like on Hugging Face
🔄 Share with anyone building multilingual RAG
🍴 Fork and experiment — MIT licensed
License
MIT — free to use, modify, and share.
Citation
bibtex
1@misc{sakthai-multilingual-embedding-2026,
2 title = {SakThai Multilingual Embedding},
3 author = {Beer (beer-sakthai) and SakThai},
4 year = {2026},
5 url = {https://huggingface.co/Nanthasit/sakthai-embedding-multilingual}
6}
If you use the base architecture, also cite:
bibtex
1@misc{multilingual-minilm-2022,
2 title = {Multilingual MiniLM},
3 author = {Wang, Liang and others},
4 year = {2022},
5 url = {https://huggingface.co/microsoft/Multilingual-MiniLM-L12-H384}
6}