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]
How to use sdadas/stella-pl-retrieval with Transformers:
# 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)
The community tab is the place to discuss and collaborate with the HF community!