Skip to content

how could fastembed load the local model? #549

@helxsz

Description

@helxsz

since hf connection is not stable, I pre-download all the models needed in the local environment, how could I use the api to load these models ?

embedding_model = TextEmbedding(model_name='/root/.cache/modelscope/hub/models/BAAI/bge-small-en-v1.5')

but got an error saying

Traceback (most recent call last):
  File "/usr/opt/nky-ai/chat-agent/test.py", line 11, in <module>
    embedding_model = TextEmbedding(model_name='/root/.cache/modelscope/hub/models/BAAI/bge-small-en-v1.5') 
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/miniconda3/lib/python3.12/site-packages/fastembed/text/text_embedding.py", line 126, in __init__
    raise ValueError(
ValueError: Model /root/.cache/modelscope/hub/models/BAAI/bge-small-en-v1.5 is not supported in TextEmbedding. Please check the supported models using `TextEmbedding.list_supported_models()`

any idea ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions