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

Need help assigning weights to words when getting vectors!!! #2555

Open
seregadgl20-oss opened this issue Mar 24, 2024 · 1 comment
Open

Comments

@seregadgl20-oss
Copy link

Hello everyone, I need your help urgently. How can I assign weights to words or labels when obtaining vectors? For instance, consider the sentence: "apple iphone 14 pro red." When obtaining vectors, I want the words "iphone" and "14" to carry more weight compared to other words. This is so that when searching for similar models, the focus is on "iphone 14". Thank you for your assistance!

@tomaarsen
Copy link
Collaborator

Hello!

This is not possible with Sentence Transformers, at least, not without notable finetuning, etc. Increasing the weight for specific words seems more feasible with e.g. SPLADE or BM25.

  • Tom Aarsen

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