-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Add vllm_worker support for lora_modules #3534
Open
x22x22
wants to merge
4
commits into
lm-sys:main
Choose a base branch
from
x22x22:feature/vllm-worker-lora-modules-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add vllm_worker support for lora_modules #3534
x22x22
wants to merge
4
commits into
lm-sys:main
from
x22x22:feature/vllm-worker-lora-modules-support
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## usage ### start ```bash export VLLM_WORKER_MULTIPROC_METHOD=spawn CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python3 -m fastchat.serve.vllm_worker \ --model-path /data/models/Qwen/Qwen2-72B-Instruct \ --tokenizer /data/dpo/lora/b15s1/saves/Qwen2-72B-Instruct/v7.9/v7.3 \ --enable-lora \ --lora-modules m1=/data/modules/lora/adapter/m1 m2=/data/modules/lora/adapter/m2 m3=/data/modules/lora/adapter/m3 \ --model-names qwen2-72b-instruct,m1,m2,m3\ --controller http://localhost:21001 \ --host 0.0.0.0 \ --num-gpus 8 \ --port 31034 \ --limit-worker-concurrency 100 \ --worker-address http://localhost:31034 ``` ### post - example1 ```bash curl --location --request POST 'http://llm-gw.sunlinecloud.cn/v1/chat/completions' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer sk-xxx' \ --data-raw '{ "model": "m1", "stream": false, "temperature": 0.7, "top_p": 0.1, "max_tokens": 4096, "messages": [ { "role": "user", "content": "Hi?" } ] }' ``` - example2 ```bash curl --location --request POST 'http://llm-gw.sunlinecloud.cn/v1/chat/completions' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer sk-xxx' \ --data-raw '{ "model": "qwen2-72b-instruct", "stream": false, "temperature": 0.7, "top_p": 0.1, "max_tokens": 4096, "messages": [ { "role": "user", "content": "Hi?" } ] }' ```
## usage ### start ```bash export VLLM_WORKER_MULTIPROC_METHOD=spawn CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python3 -m fastchat.serve.vllm_worker \ --model-path /data/models/Qwen/Qwen2-72B-Instruct \ --tokenizer /data/dpo/lora/b15s1/saves/Qwen2-72B-Instruct/v7.9/v7.3 \ --enable-lora \ --lora-modules m1=/data/modules/lora/adapter/m1 m2=/data/modules/lora/adapter/m2 m3=/data/modules/lora/adapter/m3 \ --model-names qwen2-72b-instruct,m1,m2,m3\ --controller http://localhost:21001 \ --host 0.0.0.0 \ --num-gpus 8 \ --port 31034 \ --limit-worker-concurrency 100 \ --worker-address http://localhost:31034 ``` ### post - example1 ```bash curl --location --request POST 'http://llm-gw.sunlinecloud.cn/v1/chat/completions' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer sk-xxx' \ --data-raw '{ "model": "m1", "stream": false, "temperature": 0.7, "top_p": 0.1, "max_tokens": 4096, "messages": [ { "role": "user", "content": "Hi?" } ] }' ``` - example2 ```bash curl --location --request POST 'http://llm-gw.sunlinecloud.cn/v1/chat/completions' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer sk-xxx' \ --data-raw '{ "model": "qwen2-72b-instruct", "stream": false, "temperature": 0.7, "top_p": 0.1, "max_tokens": 4096, "messages": [ { "role": "user", "content": "Hi?" } ] }' ```
x22x22
changed the title
## Add vllm_worker support for lora_modules
Add vllm_worker support for lora_modules
Sep 27, 2024
@infwinston Hi, Could you please review this PR for me? thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
usage
start
export VLLM_WORKER_MULTIPROC_METHOD=spawn CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python3 -m fastchat.serve.vllm_worker \ --model-path /data/models/Qwen/Qwen2-72B-Instruct \ --tokenizer /data/models/Qwen/Qwen2-72B-Instruct \ --enable-lora \ --lora-modules m1=/data/modules/lora/adapter/m1 m2=/data/modules/lora/adapter/m2 m3=/data/modules/lora/adapter/m3 \ --model-names qwen2-72b-instruct,m1,m2,m3\ --controller http://localhost:21001 \ --host 0.0.0.0 \ --num-gpus 8 \ --port 31034 \ --limit-worker-concurrency 100 \ --worker-address http://localhost:31034
post
Why are these changes needed?
Related issue number (if applicable)
Checks
format.sh
to lint the changes in this PR.