Instructions to use dicta-il/neodictabert-bilingual-embed with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use dicta-il/neodictabert-bilingual-embed with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("dicta-il/neodictabert-bilingual-embed", trust_remote_code=True) 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] - Notebooks
- Google Colab
- Kaggle
NeoDictaBERT-bilingual: Pushing the Frontier of BERT models in Hebrew
SentenceTransformer based on dicta-il/neodictabert-bilingual
This is a sentence-transformers model finetuned from dicta-il/neodictabert-bilingual on the he dataset. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
This model achieved #10 on the private phase of the Hebrew Semantic Retrieval National Challenge.
Usage
Direct Usage (Sentence Transformers)
First install the Sentence Transformers library:
pip install -U sentence-transformers
Then you can load this model and run inference.
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("dicta-il/neodictabert-bilingual-embed", trust_remote_code=True)
# Run inference
queries = [
"query: מתכון למיונז ביתי (חלמון, שמן, חרדל, לימון) + הוראות הכנה",
]
documents = [
"מיונז ביתי. מרכיבים: חלמון בטמפרטורת החדר, חרדל דיז'ון, מיץ לימון/חומץ, מלח, שמן ניטרלי. הכנה: טורפים חלמון+חרדל+מלח+לימון, מזלפים שמן בהדרגה תוך טריפה עד להסמכה (אמולסיה).",
"ים המלח. עובדות: זהו המקום הנמוך ביותר על פני היבשה, המליחות בו גבוהה בהרבה מהאוקיינוס ולכן אנשים צפים בקלות. בוץ עשיר במינרלים משמש גם לקוסמטיקה.",
"כתב יתדות. היסטוריה: מסופוטמיה/שומר, חריתה בלוחות טיט בעזרת קנה. התפתח מאידיאוגרמות לייצוג פונטי והאפשר ניהול ביורוקרטי ושימור חוקים וידע.",
"פסטה ברוטב עגבניות. מרכיבים: פסטה, עגבניות, שום, שמן זית, מלח. הכנה: מבשלים פסטה ומכינים רוטב עגבניות.",
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 768] [3, 768]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[ 0.2235, 0.0164, 0.0822, -0.0282]])
Citation
If you use NeoDictaBERT in your research, please cite NeoDictaBERT: Pushing the Frontier of BERT models for Hebrew
BibTeX:
@misc{shmidman2025neodictabertpushingfrontierbert,
title={NeoDictaBERT: Pushing the Frontier of BERT models for Hebrew},
author={Shaltiel Shmidman and Avi Shmidman and Moshe Koppel},
year={2025},
eprint={2510.20386},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2510.20386},
}
License
This work is licensed under a Creative Commons Attribution 4.0 International License.
- Downloads last month
- 4,157
Model tree for dicta-il/neodictabert-bilingual-embed
Base model
dicta-il/neodictabert-bilingual