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

How would one go about running embedding as a service using something like vLLM? #2

Open
sungkim11 opened this issue Feb 18, 2024 · 5 comments

Comments

@sungkim11
Copy link

I would like to run embedding as a service using something like vLLM on a Docker container on different host. How would one go about doing this?

@Muennighoff
Copy link
Contributor

I think it should be easy to serve GritLM using vLLM or similar and providing access to its embedding capability / its language modeling capability or both in one single model / endpoint. But I'm not sure about the details of vllm etc.

@creatorrr
Copy link

would we just need to get the last hidden states for the embed token and return it from vllm at inference time?

@Muennighoff
Copy link
Contributor

the last hidden state for the entire seq to be embedded & then mean pool it

@GeraldWu23
Copy link

vllm seems to support encode method(which we need for embedding model) after vllm 0.4.3. But I am running into some issues. When I run gritlm on unified mode, vllm doesnt seem to consider gritlm an embedding model and doesnt allow it to call encode() func(according to this issue vllm-project/vllm#6015), and I get the error
File "/miniconda/envs/dg_venv/lib/python3.10/site-packages/vllm/model_executor/sampling_metadata.py", line 116, in prepare ) = _prepare_seq_groups(seq_group_metadata_list, seq_lens, query_lens, File "/miniconda/envs/dg_venv/lib/python3.10/site-packages/vllm/model_executor/sampling_metadata.py", line 208, in _prepare_seq_groups if sampling_params.seed is not None: AttributeError: 'NoneType' object has no attribute 'seed'

anyone has the same problem / is working on embedding model with vllm?

@zhuxiaohai
Copy link

I would like to run embedding as a service using something like vLLM on a Docker container on different host. How would one go about doing this?

have you solved the problem

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

5 participants