-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
[misc] benchmark_throughput : Add LoRA #11267
[misc] benchmark_throughput : Add LoRA #11267
Conversation
Signed-off-by: Varun Sundar Rabindranath <[email protected]>
Signed-off-by: Varun Sundar Rabindranath <[email protected]>
Signed-off-by: Varun Sundar Rabindranath <[email protected]>
👋 Hi! Thank you for contributing to the vLLM project. Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can do one of these:
🚀 |
Signed-off-by: Varun Sundar Rabindranath <[email protected]>
Signed-off-by: Varun Sundar Rabindranath <[email protected]>
Signed-off-by: Varun Sundar Rabindranath <[email protected]>
benchmarks/benchmark_throughput.py
Outdated
# LoRA | ||
parser.add_argument("--lora-path", | ||
type=str, | ||
default='yard1/llama-2-7b-sql-lora-test') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not recommended to use default
, as LoRA is strongly coupled bound to the model. We also need to add help
to describe this arg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are correct. I have removed the default 👍 Thanks !
request_tokenizer = tokenizer | ||
if args.enable_lora: | ||
lora_request, request_tokenizer = get_random_lora_request(args) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are too many LoRA weights that don't include tokenizer files, which leads to request_tokenizer
being None. We need to consider this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch ! Added a fallback to use the base tokenizer.
Signed-off-by: Varun Sundar Rabindranath <[email protected]>
Signed-off-by: Varun Sundar Rabindranath <[email protected]>
Signed-off-by: Varun Sundar Rabindranath <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall lgtm, thanks
Signed-off-by: Varun Sundar Rabindranath <[email protected]> Co-authored-by: Varun Sundar Rabindranath <[email protected]>
Update benchmark_throughput.py to support LoRA benchmarking.
Examples:
Machine : 1xA100
python3 benchmarks/benchmark_throughput.py --model meta-llama/Llama-2-7b-hf --backend vllm --dataset ./ShareGPT_V3_unfiltered_cleaned_split.json --num-prompts 1000
Throughput: 11.45 requests/s, 5509.93 total tokens/s, 2693.62 output tokens/s
python3 benchmarks/benchmark_throughput.py --model meta-llama/Llama-2-7b-hf --backend vllm --dataset ./ShareGPT_V3_unfiltered_cleaned_split.json --num-prompts ${num_prompts} --max-loras 1 --max-lora-rank 8 --enable-lora --lora-path "yard1/llama-2-7b-sql-lora-test"
Throughput: 7.60 requests/s, 3656.98 total tokens/s, 1787.78 output tokens/s
python3 benchmarks/benchmark_throughput.py --model meta-llama/Llama-2-7b-hf --backend vllm --dataset ./ShareGPT_V3_unfiltered_cleaned_split.json --num-prompts ${num_prompts} --max-loras 4 --max-lora-rank 8 --enable-lora --lora-path "yard1/llama-2-7b-sql-lora-test"
Throughput: 7.61 requests/s, 3664.67 total tokens/s, 1791.53 output tokens/s
python3 benchmarks/benchmark_throughput.py --model meta-llama/Llama-2-7b-hf --backend vllm --dataset ./ShareGPT_V3_unfiltered_cleaned_split.json --num-prompts ${num_prompts} --async-engine
Throughput: 11.31 requests/s, 5441.21 total tokens/s, 2660.02 output tokens/s
python3 benchmarks/benchmark_throughput.py --model meta-llama/Llama-2-7b-hf --backend vllm --dataset ./ShareGPT_V3_unfiltered_cleaned_split.json --num-prompts ${num_prompts} --async-engine --max-loras 1 --max-lora-rank 8 --enable-lora --lora-path "yard1/llama-2-7b-sql-lora-test"
Throughput: 7.59 requests/s, 3654.39 total tokens/s, 1786.51 output tokens/s
python3 benchmarks/benchmark_throughput.py --model meta-llama/Llama-2-7b-hf --backend vllm --dataset ./ShareGPT_V3_unfiltered_cleaned_split.json --num-prompts ${num_prompts} --async-engine --max-loras 4 --max-lora-rank 8 --enable-lora --lora-path "yard1/llama-2-7b-sql-lora-test"
Throughput: 7.55 requests/s, 3634.68 total tokens/s, 1776.87 output tokens/s
cc @mgoin @robertgshaw2-neuralmagic @jeejeelee