inference icon indicating copy to clipboard operation
inference copied to clipboard

embedding model bge-m3 how to set return_sparse=True ?

Open colinTmx opened this issue 1 year ago • 7 comments

Note that the issue tracker is NOT the place for general support.

colinTmx avatar Jun 25 '24 10:06 colinTmx

createing_embdding should be able to pass extra params, you can try it using Xinference Python client.

qinxuye avatar Jun 25 '24 10:06 qinxuye

createing_embdding should be able to pass extra params, you can try it using Xinference Python client.

encode() got an unexpected keyword argument 'return_sparse'. what's the keyword?

colinTmx avatar Jun 26 '24 00:06 colinTmx

This issue is stale because it has been open for 7 days with no activity.

github-actions[bot] avatar Aug 06 '24 06:08 github-actions[bot]

Hope it can be supported as soon as possible.

colinTmx avatar Aug 12 '24 00:08 colinTmx

Hope it can be supported as soon as possible.

stolennumber avatar Sep 19 '24 04:09 stolennumber

createing_embdding should be able to pass extra params, you can try it using Xinference Python client.

我查看了源代码,发现这个问题的根本是由于使用snetence_transformer进行embedding,而s_t的编码都是稠密向量(仅以bge-m3为例,该模型在官方贴中提到了这一点[https://huggingface.co/BAAI/bge-m3]),所以无法解决这个问题。目前看来解决方法之一,是更改默认的框架,为用户提供出了sentence transformer以外的其他框架。问问官方后续有这步工作吗?如果有的话那么就不必重复造轮子?

默认只使用sentence transformer image

return_sparse参数最终会放入forward方法,导致报错。 image

pengjunfeng11 avatar Nov 06 '24 11:11 pengjunfeng11

This issue is stale because it has been open for 7 days with no activity.

github-actions[bot] avatar Feb 13 '25 19:02 github-actions[bot]