Sentence Similarity
sentence-transformers
Safetensors
PEFT
English
text-embeddings
retrieval
web-search
news
Instructions to use desearch/Desearch-Embedding-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use desearch/Desearch-Embedding-4B with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("desearch/Desearch-Embedding-4B") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - PEFT
How to use desearch/Desearch-Embedding-4B with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Download 1_Pooling/config.json from desearch/Desearch-Embedding-4B: direct link, hf CLI and curl.
- Browser
- Download file 96 Bytes
-
https://huggingface.co/desearch/Desearch-Embedding-4B/resolve/main/1_Pooling/config.json
- Command line
-
hf download hf://desearch/Desearch-Embedding-4B/1_Pooling/config.json
-
curl -L -o config.json https://huggingface.co/desearch/Desearch-Embedding-4B/resolve/main/1_Pooling/config.json
96 Bytes
| { | |
| "embedding_dimension": 2560, | |
| "pooling_mode": "lasttoken", | |
| "include_prompt": true | |
| } |