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

Qwen2.5-0.5B-Instruct + MNN 进行文本向量化 #3111

Open
jfduma opened this issue Dec 2, 2024 · 0 comments
Open

Qwen2.5-0.5B-Instruct + MNN 进行文本向量化 #3111

jfduma opened this issue Dec 2, 2024 · 0 comments

Comments

@jfduma
Copy link

jfduma commented Dec 2, 2024

你好,我尝试使用Qwen2.5-0.5B-Instruct + MNN 进行文本向量化。【不定长度文本通过嵌入层转为固定长度向量】
我注意到llm.cpp中的Embedding类,并尝试使用这个进行文本向量化
代码运行到
auto mp = Module::load(
{"input_ids", "attention_mask", "position_ids"},
{"sentence_embeddings"}, model_path.c_str(), runtime_manager_, &module_config);
报错,似乎是因为找不到“sentence_embeddings”层。

20:33:30.302 MNNJNI E outputIndexesMap:
20:33:30.302 MNNJNI E outputs:
20:33:30.302 MNNJNI E [ sentence_embeddings ]
20:33:30.302 MNNJNI E PipelineModule:: Can't find enough output from the model, finded is:

请问应该如何解决?

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

1 participant