Instructions to use thenlper/gte-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use thenlper/gte-small with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("thenlper/gte-small") 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] - Inference
- Notebooks
- Google Colab
- Kaggle
Having issues using with SentenceTransformers
Hi @thenlper !
Very excited to give this model a spin, but I'm getting the following error when I try to use it via SentenceTransformers
model = SentenceTransformer("thenlper/gte-small")
results in
No sentence-transformers model found with name .../.cache/torch/sentence_transformers/thenlper_gte-small. Creating a new one with MEAN pooling.
Any suggestions for what I might be doing wrong?
Because this model is hosted by HuggingFace, it does not conform to the specifications of Sentence Transformer. Indexing the model with Sentence Transformer will generate a warning, but it does not affect the normal usage of the model. We will also make an attempt to resolve this warning.
Thank you for the quick follow up @thenlper ! I had some issues using the model as is via SentenceTransformer.
we have uploaded the missing configuration files to fix this warning. You can now retry it.
Works like a charm! Thank you @thenlper ! I can confirm the performance of the model is impressive, especially considering its size. Well done! I think we have a winner.