how could fastembed load the local model?

オープン
#549 コメント 4 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 4 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
python

調査の方向性

レポートで言及されている Python TextEmbedding コンストラクターと list_supported_models() エントリーポイントから始めます。model_name のパスがどのように検証されるか、またローカルの ModelScope パスを受け入れられるかを確認します。報告されたモデルパスに対して、サポートされているローカル読み込みの動作が明確で、機能することを確認できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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 ?

主要言語
Python
スター
3.3k
フォーク
314
平均マージ
5日 7時間
マージ済み PR(30日)
23

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

qdrant/fastembed のほかの issue

qdrant/fastembed の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。