Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for bge-large-zh-noinstruct and openai text-embedding-ada-002 #1119

Merged
merged 6 commits into from
Aug 23, 2023
Merged

support for bge-large-zh-noinstruct and openai text-embedding-ada-002 #1119

merged 6 commits into from
Aug 23, 2023

Conversation

zRzRzRzRzRzRzR
Copy link
Collaborator

添加了对bge-large-zh-noinstruct和text-embedding-ada-002嵌入模型的支持,并更新了配置文档

@imClumsyPanda
Copy link
Collaborator

您好,感谢您发起的PR!建议在README中也增加相关Embedding模型的信息,开发组将尽快完成代码 review。

@545999961
Copy link

@zRzRzRzRzRzRzR , 你好,我认为bge的加载方式有问题,应该这样加载:

if 'bge-' in model:
    embeddings = HuggingFaceBgeEmbeddings(model_name=embedding_model_dict[model],
                                          model_kwargs={'device': device},
                                          query_instruction="为这个句子生成表示以用于检索相关文章:")
    if model == "bge-large-zh-noinstruct":  # bge large -noinstruct embedding
        embeddings.query_instruction = ""

Copy link
Collaborator Author

@zRzRzRzRzRzRzR zRzRzRzRzRzRzR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

确实载入方式要改,已经纠错,谢谢指正

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants