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

Some configuration files are missing after finetuning bge-m3 model #1326

Open
chansonzhang opened this issue Jan 10, 2025 · 1 comment
Open

Comments

@chansonzhang
Copy link

我对 bge-m3 模型进行微调 后发现一些配置文件丢失了,这些文件包括:

  1. modules.json
  2. config_sentence_transformers.json
  3. 1_Pooling/config.json

这会导致以下问题:

  1. No sentence-transformers model found with name xxx. Creating a new one with mean pooling. (c.f. issues#1238
  2. 使用 optimum-cli 导出 onnx 模型时, 导出的模型结构中会缺少最后的 sentence embedding 输出.

我通过将原始 bge-m3 模型中的上述文件拷贝到我的微调后模型目录中解决了上述问题,但是这样有两个问题:

  1. 需要手动拷贝,麻烦且易出错
  2. 导致一致性问题,如果我在拷贝这些配置文件前使用 SentenceTransformer 加载模型,默认使用的 mean pooling, 如果拷贝了配置文件后再加载会按照配置使用 CLS pooling.
@chansonzhang chansonzhang changed the title Some configuration files are missing after finetuning Some configuration files are missing after finetuning bge-m3 model Jan 10, 2025
@545999961
Copy link
Collaborator

transformers是什么版本呢

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

No branches or pull requests

2 participants