Sentence Similarity
sentence-transformers
PyTorch
TensorFlow
Rust
ONNX
Safetensors
Transformers
English
bert
feature-extraction
Inference Endpoints
5 papers

1 validation error for HuggingFaceHub

#59
by Suraj-Patil - opened

Getting error when trying to load the model. I want to perform sentence similarity. I am running it using Langchain-HuggingFaceHub on google colab, but it is giving me error as below:

"""
ValidationError: 1 validation error for HuggingFaceHub
root
Got invalid task sentence-similarity, currently only dict_keys(['translation', 'summarization', 'conversational', 'text-generation', 'text2text-generation']) are supported (type=value_error)
"""

For reference here is the code.

from langchain.llms import HuggingFaceHub
import os
os.environ['HUGGINGFACEHUB_API_TOKEN'] = ' '
model= HuggingFaceHub(repo_id="sentence-transformers/all-MiniLM-L6-v2",model_kwargs={"temperature": 0.5, "max_length": 64,"max_new_tokens":512})

Please help..!!!
Thanks in Advance

Sentence Transformers org

Hello!

This model is not an LLM, but an embedding model instead. You should use HuggingFaceEmbeddings instead.

  • Tom Aarsen

Thank You.
Is there any model which can be used for multilingual Sentence similarity ?

Thank you soo much.

Suraj-Patil changed discussion status to closed

Sign up or log in to comment