Langchain-Chatchat
Langchain-Chatchat copied to clipboard
[BUG] 创建知识库时报错 / embeddings_api.py[line:40] - ERROR: Pooling.__init__() got an unexpected keyword argument 'pooling_mode_weightedmean_tokens'
问题描述 / Problem Description 使用"SFR-Embedding-Mistral"Embedding模型在创建知识库时报错,报错内容如下:
INFO: 127.0.0.1:46066 - "POST /llm_model/list_config_models HTTP/1.1" 200 OK 2024-04-24 10:59:50,455 - _client.py[line:1013] - INFO: HTTP Request: POST http://127.0.0.1:7861/llm_model/list_config_models "HTTP/1.1 200 OK"
data: None json: {'knowledge_base_name': 'Test_CCS', 'vector_store_type': 'faiss', 'embed_model': 'SFR-Embedding-Mistral'} 2024-04-24 11:00:15,409 - faiss_cache.py[line:94] - INFO: loading vector store in 'Test_CCS/vector_store/SFR-Embedding-Mistral' from disk. 2024-04-24 11:00:15,410 - SentenceTransformer.py[line:66] - INFO: Load pretrained SentenceTransformer: /home/dtbupd/AI/Model/Embedding/SFR-Embedding-Mistral Loading checkpoint shards: 100%|████████████████████████████████████████████████████████████████████████████| 3/3 [00:06<00:00, 2.31s/it] 2024-04-24 11:00:23,709 - embeddings_api.py[line:40] - ERROR: Pooling.init() got an unexpected keyword argument 'pooling_mode_weightedmean_tokens' 2024-04-24 11:00:25,889 - kb_api.py[line:34] - ERROR: TypeError: 创建知识库出错: loop of ufunc does not support argument 0 of type NoneType which has no callable conjugate method INFO: 127.0.0.1:48092 - "POST /knowledge_base/create_knowledge_base HTTP/1.1" 200 OK
附加信息 / Additional Information
这是不支持大体量的Embedding模型吗?其他m3e,bge的Embedding模型创建时没问题。
The error message "Pooling.init() got an unexpected keyword argument 'pooling_mode_weightedmean_tokens'" indicates a mismatch between the provided arguments and the expected parameters of the Pooling
class during its initialization. This suggests that the Pooling
class does not recognize pooling_mode_weightedmean_tokens
as a valid argument. This issue is likely due to an API change or a configuration error rather than the size of the "SFR-Embedding-Mistral" model.
To address this issue, check the configuration of the "SFR-Embedding-Mistral" model and the instantiation process of the Pooling
class to identify any potential problems that could lead to this error. If possible, consider using a different model or version to determine if the issue is specific to the "SFR-Embedding-Mistral" model.
Details
Sources
- server/knowledge_base/kb_cache/faiss_cache.py
- configs/model_config.py.example
- server/knowledge_base/kb_cache/base.py
About Dosu This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
To continue the conversation, mention @dosu.