bge embedding model serving problem?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 39.5k
- Forks
- 4.8k
- PR merge metrics
- No merged PRs in 30d
Description
When I use `BAAI/bge-large-zh` embedding model,I found that ModelWorker class use` sum_embeddings = torch.sum(masked_embeddings, dim=1)` compute sentence embedding from token embeddings.
https://github.com/lm-sys/FastChat/blob/bb8aae5e60bde82e5f389c097c76a1bdd4b08341/fastchat/serve/model_worker.py#L169
But in SentenceTransformer, use cls token as sentence embedding, can check [this file](https://huggingface.co/BAAI/bge-large-zh/blob/main/1_Pooling/config.json)
Is this expected behavior?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with fastchat/serve/model_worker.py at the linked line, then compare its token-pooling calculation with SentenceTransformer and the BAAI/bge-large-zh 1_Pooling/config.json. Verify whether the serving behavior is intentional for this model; done means the expected pooling behavior and any required change are clearly established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- backend, machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100