Find answers from the community

Updated 3 months ago

Huggingface


Plain Text
Traceback (most recent call last):
  File "/opt/app-root/src/llamaindex-rag-example/starter.py", line 8, in <module>
    embed_model = HuggingFaceEmbedding(model_name="Cohere/Cohere-embed-english-v3.0")
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/app-root/lib64/python3.11/site-packages/llama_index/embeddings/huggingface.py", line 82, in __init__
    model = AutoModel.from_pretrained(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/app-root/lib64/python3.11/site-packages/transformers/models/auto/auto_factory.py", line 526, in from_pretrained
    config, kwargs = AutoConfig.from_pretrained(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/app-root/lib64/python3.11/site-packages/transformers/models/auto/configuration_auto.py", line 1132, in from_pretrained
    raise ValueError(
ValueError: Unrecognized model in Cohere/Cohere-embed-english-v3.0. Should have a `model_type` key in its config.json, or contain one of the following strings in its name: ...


looks like you don't support all embeding models from the mteb leaderboard.
L
t
7 comments
Cohere did not actually release the model weights
So you can only use it over their api
sounds like you need a warning in your docs πŸ€·β€β™‚οΈ
I think this is just a symptom that anyone can upload anything to huggingface? But sure, docs could use a warning for those less familiar with huggingface
the way that https://docs.llamaindex.ai/en/stable/examples/embeddings/huggingface.html is written, the implication is that you can just pick something from the leaderboard and you're good
but there are clearly some requirements πŸ™‚
Add a reply
Sign up and join the conversation on Discord