Instructions to use radlab/polish-sts-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use radlab/polish-sts-v2 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("radlab/polish-sts-v2") 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] - Transformers
How to use radlab/polish-sts-v2 with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("radlab/polish-sts-v2") model = AutoModel.from_pretrained("radlab/polish-sts-v2") - Notebooks
- Google Colab
- Kaggle
Is this model private?
While trying to use this model through sentence-transformers as well as huggingface. I am getting below errors respectively -
"Repository Not Found for url: https://huggingface.co/api/models/sentence-transformers/polish-roberta-large-v2-sts.
Please make sure you specified the correct repo_id and repo_type.
If you are trying to access a private or gated repo, make sure you are authenticated."
"OSError: polish-roberta-large-v2-sts is not a local folder and is not a valid model identifier listed on 'https://huggingface.co/models'
If this is a private repository, make sure to pass a token having permission to this repo with use_auth_token or log in with huggingface-cli login and pass use_auth_token=True."
I have logged in with my token to HuggingFace using notebook_login() method. However, I am still facing the same issue. Thus, I want to know if this model is private and a normal user like me can not access it?
Hi,
No, this model isn't private, it's public. I made a mistake in the model example usage.
I just updated the model description, proper model path is:
tokenizer = AutoTokenizer.from_pretrained('radlab/polish-roberta-large-v2-sts')model = AutoModel.from_pretrained('radlab/polish-roberta-large-v2-sts')model = SentenceTransformer('radlab/polish-roberta-large-v2-sts')
Hi,
Thanks for your response.
It's working now.