Sentence Similarity
sentence-transformers
Safetensors
Transformers
Polish
qwen2
text-generation
feature-extraction
custom_code
text-embeddings-inference
Instructions to use sdadas/stella-pl-retrieval with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use sdadas/stella-pl-retrieval with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("sdadas/stella-pl-retrieval", trust_remote_code=True) sentences = [ "zapytanie: Jak dożyć 100 lat?", "Trzeba zdrowo się odżywiać i uprawiać sport.", "Trzeba pić alkohol, imprezować i jeździć szybkimi autami.", "Gdy trwała kampania politycy zapewniali, że rozprawią się z zakazem niedzielnego handlu." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Transformers
How to use sdadas/stella-pl-retrieval with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("sdadas/stella-pl-retrieval", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("sdadas/stella-pl-retrieval", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download 1_Pooling/config.json from sdadas/stella-pl-retrieval: direct link, hf CLI and curl.
- Browser
- Download file 297 Bytes
-
https://huggingface.co/sdadas/stella-pl-retrieval/resolve/main/1_Pooling/config.json
- Command line
-
hf download hf://sdadas/stella-pl-retrieval/1_Pooling/config.json
-
curl -L -o config.json https://huggingface.co/sdadas/stella-pl-retrieval/resolve/main/1_Pooling/config.json
297 Bytes
| { | |
| "word_embedding_dimension": 1536, | |
| "pooling_mode_cls_token": false, | |
| "pooling_mode_mean_tokens": true, | |
| "pooling_mode_max_tokens": false, | |
| "pooling_mode_mean_sqrt_len_tokens": false, | |
| "pooling_mode_weightedmean_tokens": false, | |
| "pooling_mode_lasttoken": false, | |
| "include_prompt": true | |
| } |