Find answers from the community

Updated 9 months ago

I'm trying to figure out docker, but

At a glance

The community member is trying to set up Docker, but is encountering an error when setting up a new copy of their project using a virtual environment (venv) instead of Docker. The error is related to the Pooling module in the sentence-transformers library. The community member tried different versions of the sentence-transformers and llama-index libraries, but the issue persisted on both their VPS and local PC.

After some investigation, the community member figured out that the issue is with the embed model they are using, "avsolatorio/NoInstruct-small-Embedding-v0". They found that they need to start with the "BAAI/bge-small-en-v1.5" model during setup, and then they can switch back to the "avsolatorio/NoInstruct-small-Embedding-v0" model afterwards. The community member also noted that the "NoInstruct-small-Embedding-v0" model does not support sentence transformers.

I'm trying to figure out docker, but when I'm setting up, through not docker, but venv, a new copy of my stuff it's throwing this error
Plain Text
D:\Documents\GitHub\DockerTest\Scripts\python.exe D:\Documents\GitHub\DockerTest\core.py 
D:\Documents\GitHub\DockerTest\Lib\site-packages\huggingface_hub\file_download.py:1132: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.
  warnings.warn(
Traceback (most recent call last):
  File "D:\Documents\GitHub\DockerTest\core.py", line 4, in <module>
    from modules.utils.GPT import process_message_with_llm
  File "D:\Documents\GitHub\DockerTest\modules\utils\GPT.py", line 26, in <module>
    Settings.embed_model = HuggingFaceEmbedding(model_name="avsolatorio/NoInstruct-small-Embedding-v0")
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Documents\GitHub\DockerTest\Lib\site-packages\llama_index\embeddings\huggingface\base.py", line 86, in __init__
    self._model = SentenceTransformer(
                  ^^^^^^^^^^^^^^^^^^^^
  File "D:\Documents\GitHub\DockerTest\Lib\site-packages\sentence_transformers\SentenceTransformer.py", line 197, in __init__
    modules = self._load_sbert_model(
              ^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Documents\GitHub\DockerTest\Lib\site-packages\sentence_transformers\SentenceTransformer.py", line 1309, in _load_sbert_model
    module = module_class.load(module_path)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Documents\GitHub\DockerTest\Lib\site-packages\sentence_transformers\models\Pooling.py", line 230, in load
    return Pooling(**config)
           ^^^^^^^^^^^^^^^^^
TypeError: Pooling.__init__() got an unexpected keyword argument 'output_key'

Process finished with exit code 1

I'm assuming I may need to specify which version of SentenceTransformer I install?
i
L
6 comments
I tried different versions of sentence-transformer and of llama-index/llama-index-core/llama-index-embeddings-huggingface with nothing changing the outcome
this happens on my vps and my local pc, same error
figured it out, it's an issue with the embed model I'm using. I have to start with BAAI/bge-small-en-v1.5 during setup, and then I can switch back to avsolatorio/NoInstruct-small-Embedding-v0 after
Yah, apparently NoInstruct-small-Embedding-v0 doesn’t support sentence transformers
So setup with it, no work, but using it, it’s fine
Add a reply
Sign up and join the conversation on Discord