Instructions to use nkatsitadze/georgian-e5-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use nkatsitadze/georgian-e5-small with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("nkatsitadze/georgian-e5-small") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Transformers.js
How to use nkatsitadze/georgian-e5-small with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('feature-extraction', 'nkatsitadze/georgian-e5-small'); - Notebooks
- Google Colab
- Kaggle
georgian-e5-small
A small, fast text-embedding model for Georgian (ქართული) search and retrieval. It turns a text into a 384-number vector so that texts with similar meaning get similar vectors: the core of semantic search, RAG (retrieval for LLM chatbots), FAQ matching and duplicate detection.
It is intfloat/multilingual-e5-small (118M parameters) trained to imitate much larger models on Georgian. On the Georgian retrieval tasks of MTEB it scores 77.9 nDCG@10, up from 61.5 for the original model, ahead of every other small model we tested and of multilingual-e5-large, which is 5× larger. It runs comfortably on a CPU (~100 documents/second, ~6 ms per query on a laptop), so documents can stay on your own server.
A lite version with a trimmed vocabulary (half the file size, same scores for Georgian, English and Russian) is also available.
Try it in your browser: Georgian semantic search demo (the lite model runs on your device with Transformers.js, searching 30,000 Georgian Wikipedia articles).
Usage
pip install -U sentence-transformers
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("nkatsitadze/georgian-e5-small")
queries = ["როდის დაარსდა თბილისი?"]
documents = [
"თბილისი V საუკუნის მეორე ნახევარში დააარსა იბერიის მეფემ ვახტანგ გორგასალმა.",
"ქუთაისი საქართველოს ერთ-ერთი უძველესი ქალაქია, რომელიც რიონის ნაპირზე მდებარეობს.",
]
query_vectors = model.encode(queries, prompt_name="query") # adds "query: "
document_vectors = model.encode(documents, prompt_name="document") # adds "passage: "
print(model.similarity(query_vectors, document_vectors))
# tensor([[0.7486, 0.5829]]) -> the first document answers the question
The model expects the e5 prefixes: "query: " before search queries and "passage: " before documents.
prompt_name="query" / "document" adds them for you; in other frameworks, add them to the text yourself.
Inputs longer than 512 tokens are truncated, so split long documents into passages.
JavaScript (Transformers.js) and ONNX
The repository includes ONNX weights (onnx/model.onnx in full precision and onnx/model_quantized.onnx in
8-bit), so the model also runs in the browser or Node.js with
Transformers.js:
import { pipeline } from "@huggingface/transformers";
const extractor = await pipeline("feature-extraction", "nkatsitadze/georgian-e5-small", { dtype: "fp32" }); // or "q8"
const vectors = await extractor(["query: როდის დაარსდა თბილისი?"], { pooling: "mean", normalize: true });
fp32 gives exactly the same vectors as the Python model. q8 is 4× smaller (118 MB) and scores about one
point lower (76.8 nDCG@10 with both queries and documents in 8-bit, 77.4 with 8-bit queries against
full-precision document vectors). Add the "query: " / "passage: " prefixes yourself.
Results
nDCG@10 (0-100, higher is better) on the Georgian subsets of MTEB retrieval tasks. Belebele has three directions: English question → Georgian passage, Georgian question → English passage, and Georgian → Georgian.
| model | params | avg | Belebele en→ka | Belebele ka→en | Belebele ka→ka | GeorgianFAQ | WebFAQ ka |
|---|---|---|---|---|---|---|---|
| Snowflake/snowflake-arctic-embed-l-v2.0 | 568M | 85.5 | 85.9 | 89.2 | 91.0 | 69.5 | 91.8 |
| BAAI/bge-m3 (teacher) | 568M | 85.1 | 87.6 | 89.0 | 91.1 | 67.2 | 90.7 |
| georgian-e5-small (this model) | 118M | 77.9 | 78.7 | 82.5 | 87.9 | 56.7 | 84.0 |
| georgian-e5-small-lite | 58M | 77.9 | 78.7 | 82.5 | 87.9 | 56.6 | 84.0 |
| l4sha/georgian-text-embeddings ¹ | 118M | 74.4 | 72.0 | 79.4 | 82.6 | 56.6 | 81.5 |
| intfloat/multilingual-e5-large | 560M | 73.4 | 77.5 | 87.5 | 81.8 | 45.1 | 74.9 |
| altaidevorg/bge-m3-distill-8l | 70.3 | 64.9 | 76.1 | 76.6 | 53.6 | 80.3 | |
| Vibels/georgian-e5-finetuned | 69.8 | 67.3 | 78.6 | 79.1 | 47.5 | 76.2 | |
| microsoft/harrier-oss-v1-270m | 270M | 68.9 | 64.5 | 81.2 | 73.5 | 49.1 | 76.4 |
| Qwen/Qwen3-Embedding-0.6B | 596M | 66.5 | 56.1 | 76.1 | 73.1 | 49.2 | 77.9 |
| intfloat/multilingual-e5-base | 278M | 64.1 | 61.3 | 78.9 | 75.6 | 38.7 | 66.2 |
| intfloat/multilingual-e5-small (starting point) ² | 118M | 61.5 | 57.2 | 72.8 | 67.0 | 41.4 | 69.1 |
¹ Trained on a Georgian translation of MS MARCO, whose license does not allow commercial use. ² Its best setting on Georgian (no prefixes); with the official prefixes it scores 57.3.
All models were evaluated by us with the same code (mteb 2.x), each with the prefix setting that worked best for it. Speed on a laptop CPU (6 threads, Georgian FAQ documents): this model and multilingual-e5-small index ~102 documents/s; bge-m3, Snowflake-L and e5-large ~11 documents/s (9× slower).
How it was trained
The student starts from multilingual-e5-small and learns from larger "teacher" models in two stages:
- Embedding distillation (6 epochs): on 441,624 texts (Georgian Wikipedia, Georgian web text from FineWeb-2, Georgian WebFAQ, and some English Wikipedia), the student learns to reproduce the embeddings of BAAI/bge-m3, compressed from 1024 to 384 dimensions with PCA.
- Ranking distillation (1 epoch): on ~175k Georgian question → passage pairs (mostly tbilisi-ai-lab/wiki-ka-QA, plus WebFAQ), each with 7 "hard negative" passages from other articles, the student learns to rank the passages the way a teacher does (KL divergence between score distributions), while continuing stage 1's embedding loss so it doesn't forget it. This was done twice, with two teachers: bge-m3 itself, and the cross-encoder BAAI/bge-reranker-v2-m3, which ranks Georgian passages more accurately (reranking bge-m3's results raised nDCG@10 from 85.4 to 89.8 in our test).
- Final model: the average of the two stage-2 models' weights, which scored higher than either alone on all five tasks.
Training ran on free Kaggle GPUs (2× T4). Every training text that shared an 8-word sequence with any of the 11,941 benchmark test texts was removed before training.
Limitations
- The benchmark is small, and it also guided our choices. The final recipe was picked among a handful of variants by its score on these tasks, so the numbers are slightly optimistic; expect the real gain over the best single run to be around half a point rather than exactly what the table shows.
- Still behind the large models, most of all on GeorgianFAQ (56.7 vs 67.2 for bge-m3). If you have a GPU and speed doesn't matter, bge-m3 or Snowflake-L is more accurate.
- Trained and evaluated for Georgian and English. Other languages keep whatever ability multilingual-e5-small had, but were not tested.
- Training data: wiki-ka-QA questions were generated by a language model (the dataset authors don't name it). A native speaker reviewed a sample of 50 before use and judged 82% good; the rest were mostly awkwardly phrased, not wrong. Web texts can contain the usual biases of web data.
License and credits
This model is released under the MIT license. It builds on:
| license | |
|---|---|
| intfloat/multilingual-e5-small (base model) | MIT |
| BAAI/bge-m3 (teacher) | MIT |
| BAAI/bge-reranker-v2-m3 (ranking teacher) | Apache-2.0 |
| Wikipedia (Georgian, English) | CC BY-SA 4.0 |
| FineWeb-2 (kat_Geor) | ODC-By 1.0 |
| WebFAQ (Georgian) | CC BY 4.0 |
| wiki-ka-QA by Tbilisi AI Lab | ODC-By |
Thanks to Tbilisi AI Lab for publishing wiki-ka-QA, and to the authors of e5, BGE, WebFAQ and FineWeb-2.
- Downloads last month
- 57
Model tree for nkatsitadze/georgian-e5-small
Base model
intfloat/multilingual-e5-small