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

请问本模型支持句子向量吗? #27

Open
fishfree opened this issue Dec 5, 2024 · 3 comments
Open

请问本模型支持句子向量吗? #27

fishfree opened this issue Dec 5, 2024 · 3 comments

Comments

@fishfree
Copy link

fishfree commented Dec 5, 2024

就像流行的sentence-bert那样?

@Ethan-yt
Copy link
Owner

Ethan-yt commented Dec 9, 2024

可以的,只是代码需要做一些修改。可以用所有hidden的平均作为句向量。

@fishfree
Copy link
Author

可以的,只是代码需要做一些修改。可以用所有hidden的平均作为句向量。

谢谢你!平均向量这个是所有huggingface transformers大语言模型都支持的吧?如果不是专门训练出来的句向量,取hidden层的average效果恐怕不好吧?

@Ethan-yt
Copy link
Owner

可以的,只是代码需要做一些修改。可以用所有hidden的平均作为句向量。

谢谢你!平均向量这个是所有huggingface transformers大语言模型都支持的吧?如果不是专门训练出来的句向量,取hidden层的average效果恐怕不好吧?

关于效果我没有对比过其他模型,不过你可以试一下。

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