michaelfeil / michaelfeil/infinity

Support embedding with "instructions" Again

Open
#548 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.9k
Forks
206
PR merge metrics
No merged PRs in 30d

Description

### Feature request

Hello,

First of all, thank you for developing infinity, an excellent package dedicated to inference for embedding models.

I am opening this issue to request support once again for the instructions feature discussed in issue #34.

From my understanding, to utilize the method added in [UKPLab/sentence-transformers#2439](https://github.com/UKPLab/sentence-transformers/issues/2439) within infinity, it seems necessary to pass either prompt or prompt_name at [this point](https://github.com/michaelfeil/infinity/blob/154160c8af464134103649ab1ce22406713eef5b/libs/infinity_emb/infinity_emb/infinity_server.py#L349).

Considering that the recently updated MMTEB has introduced an Instruction Retrieval evaluation category and that many models are being researched and developed as instruction-based embedding models, I believe integrating this feature into infinity would attract more users to the package.

Feel free to correct me if I’m mistaken.

### Motivation

https://github.com/michaelfeil/infinity/issues/34

### Your contribution

If you can provide a rough concept of how this feature should be integrated into infinity, I think I could submit a PR myself.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at infinity_emb/infinity_emb/infinity_server.py around line 349 and review issue #34 alongside sentence-transformers issue #2439. Trace how embedding requests reach the model and determine the integration points for prompt or prompt_name. Done means instruction-based embedding requests are supported in infinity and the behavior is covered by the relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.