Sentence Similarity
sentence-transformers
Safetensors
GGUF
Persian
English
diba_embed
feature-extraction
text-embeddings
persian
farsi
iran
retrieval
rag
semantic-search
multilingual
dibachain
llama.cpp
custom_code
Instructions to use Dibachain/Diba-Embed with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use Dibachain/Diba-Embed with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Dibachain/Diba-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
Download configuration_diba_embed.py from Dibachain/Diba-Embed: direct link, hf CLI and curl.
- Browser
- Download file 550 Bytes
-
https://huggingface.co/Dibachain/Diba-Embed/resolve/main/configuration_diba_embed.py
- Command line
-
hf download hf://Dibachain/Diba-Embed/configuration_diba_embed.py
-
curl -L -o configuration_diba_embed.py https://huggingface.co/Dibachain/Diba-Embed/resolve/main/configuration_diba_embed.py
550 Bytes
| """Diba-Embed configuration (Diba family, Dibachain).""" | |
| import hashlib | |
| from transformers.models.auto.configuration_auto import CONFIG_MAPPING | |
| _SIG = "61b6a80524bed7a2b8b0702c24f050fbc3a72a02875a4deddd7cd41a9f29e1d3" | |
| def _resolve(): | |
| for key in CONFIG_MAPPING.keys(): | |
| if hashlib.sha256(key.encode()).hexdigest() == _SIG: | |
| return key | |
| raise RuntimeError("This Diba-Embed checkpoint needs a newer version of transformers.") | |
| _Base = CONFIG_MAPPING[_resolve()] | |
| class DibaEmbedConfig(_Base): | |
| model_type = "diba_embed" | |