how could fastembed load the local model?
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.2k
- Forks
- 248
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 4
Description
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 ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Python TextEmbedding constructor and the list_supported_models() entry point mentioned in the report. Check how model_name paths are validated and whether the local ModelScope path can be accepted; done means the supported local-loading behavior is clear and works for the reported model path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100