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

[Kernel] Triton Configs for Fp8 Block Quantization #11589

Merged
merged 15 commits into from
Jan 30, 2025
Merged

Conversation

robertgshaw2-redhat
Copy link
Collaborator

@robertgshaw2-redhat robertgshaw2-redhat commented Dec 28, 2024

SUMMARY:

Copy link

👋 Hi! Thank you for contributing to the vLLM project.
Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

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:

  • Add ready label to the PR
  • Enable auto-merge.

🚀

@robertgshaw2-redhat robertgshaw2-redhat changed the title Add deepseek configs [Kernel] Triton Configs for Fp8 Block Quantization Dec 28, 2024
Signed-off-by: rshaw@neuralmagic.com <rshaw@neuralmagic.com>
Signed-off-by: rshaw@neuralmagic.com <rshaw@neuralmagic.com>
Signed-off-by: rshaw@neuralmagic.com <rshaw@neuralmagic.com>
Signed-off-by: rshaw@neuralmagic.com <rshaw@neuralmagic.com>
Signed-off-by: rshaw@neuralmagic.com <rshaw@neuralmagic.com>
Signed-off-by: rshaw@neuralmagic.com <rshaw@neuralmagic.com>
robertgshaw2-redhat and others added 5 commits December 28, 2024 21:03
Signed-off-by: rshaw@neuralmagic.com <rshaw@neuralmagic.com>
Signed-off-by: mgoin <michael@neuralmagic.com>
@NikolaBorisov
Copy link
Contributor

@simon-mo This PR looks good an works well.
It is missing however this code

diff --git a/setup.py b/setup.py
index 7dfcec7f..308500a3 100644
--- a/setup.py
+++ b/setup.py
@@ -603,7 +603,11 @@ if _build_custom_ops():
     ext_modules.append(CMakeExtension(name="vllm._C"))
 
 package_data = {
-    "vllm": ["py.typed", "model_executor/layers/fused_moe/configs/*.json"]
+    "vllm": [
+        "py.typed",
+        "model_executor/layers/fused_moe/configs/*.json",
+        "model_executor/layers/quantization/utils/configs/*.json"
+    ]
 }
 
 if _no_device():

Copy link
Collaborator

@tlrmchlsmth tlrmchlsmth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good once the new json files are added to package_data in setup.py

@robertgshaw2-redhat
Copy link
Collaborator Author

robertgshaw2-redhat commented Jan 30, 2025

On 8xH200:

  • pr
python3 benchmark_throughput.py --model $MODEL --tensor-parallel-size 8 --max-model-len 8192 --dataset ShareGPT_V3_unfiltered_cleaned_split.json --num-prompts 100 --trust-remote-code --tokenizer deepseek-ai/DeepSeek-R1

>> Throughput: 2.27 requests/s, 1000.55 total tokens/s, 483.31 output tokens/s
  • main
python3 benchmark_throughput.py --model $MODEL --tensor-parallel-size 8 --max-model-len 8192 --dataset ShareGPT_V3_unfiltered_cleaned_split.json --num-prompts 100 --trust-remote-code --tokenizer deepseek-ai/DeepSeek-R1

>> Throughput: 1.66 requests/s, 731.39 total tokens/s, 353.29 output tokens/s

@mergify mergify bot added the ci/build label Jan 30, 2025
Copy link
Member

@mgoin mgoin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, LGTM

@mgoin mgoin added the ready ONLY add when PR is ready to merge/full CI is needed label Jan 30, 2025
@mgoin mgoin enabled auto-merge (squash) January 30, 2025 03:28
@robertgshaw2-redhat
Copy link
Collaborator Author

robertgshaw2-redhat commented Jan 30, 2025

Mixtral looks good (performance and accuracy)

@robertgshaw2-redhat
Copy link
Collaborator Author

robertgshaw2-redhat commented Jan 30, 2025

MODEL=/data/nm/models/DeepSeek-R1

lm_eval --model vllm \
    --model_args "pretrained=$MODEL,tokenizer=deepseek-ai/DeepSeek-R1,tensor_parallel_size=8,dtype=auto,gpu_memory_utilization=0.95,trust_remote_code=True,max_model_len=16384,trust_remote_code=True" \
    --task gsm8k --batch_size 100
  • pr
vllm (pretrained=/data/nm/models/DeepSeek-R1,tokenizer=deepseek-ai/DeepSeek-R1,tensor_parallel_size=8,dtype=auto,gpu_memory_utilization=0.95,trust_remote_code=True,max_model_len=16384,trust_remote_code=True), gen_kwargs: (None), limit: None, num_fewshot: None, batch_size: 100
|Tasks|Version|     Filter     |n-shot|  Metric   |   |Value |   |Stderr|
|-----|------:|----------------|-----:|-----------|---|-----:|---|-----:|
|gsm8k|      3|flexible-extract|     5|exact_match||0.9538|±  |0.0058|
|     |       |strict-match    |     5|exact_match||0.9538|±  |0.0058|
  • main
vllm (pretrained=/data/nm/models/DeepSeek-R1,tokenizer=deepseek-ai/DeepSeek-R1,tensor_parallel_size=8,dtype=auto,gpu_memory_utilization=0.95,trust_remote_code=True,max_model_len=16384,trust_remote_code=True), gen_kwargs: (None), limit: None, num_fewshot: None, batch_size: 100
|Tasks|Version|     Filter     |n-shot|  Metric   |   |Value |   |Stderr|
|-----|------:|----------------|-----:|-----------|---|-----:|---|-----:|
|gsm8k|      3|flexible-extract|     5|exact_match||0.9462|±  |0.0062|
|     |       |strict-match    |     5|exact_match||0.9462|±  |0.0062|

@simon-mo simon-mo disabled auto-merge January 30, 2025 19:53
@simon-mo simon-mo merged commit 9b0c4ba into main Jan 30, 2025
24 of 62 checks passed
@simon-mo simon-mo deleted the add-deepseek-configs branch January 30, 2025 19:53
Isotr0py pushed a commit to Isotr0py/vllm that referenced this pull request Feb 2, 2025
Signed-off-by: rshaw@neuralmagic.com <rshaw@neuralmagic.com>
Signed-off-by: mgoin <michael@neuralmagic.com>
Co-authored-by: mgoin <michael@neuralmagic.com>
Co-authored-by: simon-mo <xmo@berkeley.edu>
Signed-off-by: Isotr0py <2037008807@qq.com>
youngkent pushed a commit to youngkent/vllm that referenced this pull request Feb 3, 2025
Signed-off-by: rshaw@neuralmagic.com <rshaw@neuralmagic.com>
Signed-off-by: mgoin <michael@neuralmagic.com>
Co-authored-by: mgoin <michael@neuralmagic.com>
Co-authored-by: simon-mo <xmo@berkeley.edu>
srikanthsrnvs pushed a commit to srikanthsrnvs/vllm that referenced this pull request Feb 3, 2025
Signed-off-by: rshaw@neuralmagic.com <rshaw@neuralmagic.com>
Signed-off-by: mgoin <michael@neuralmagic.com>
Co-authored-by: mgoin <michael@neuralmagic.com>
Co-authored-by: simon-mo <xmo@berkeley.edu>
Signed-off-by: Srikanth Srinivas <srikanth@astrum.ai>
NickLucche pushed a commit to NickLucche/vllm that referenced this pull request Feb 7, 2025
Signed-off-by: rshaw@neuralmagic.com <rshaw@neuralmagic.com>
Signed-off-by: mgoin <michael@neuralmagic.com>
Co-authored-by: mgoin <michael@neuralmagic.com>
Co-authored-by: simon-mo <xmo@berkeley.edu>
ShangmingCai pushed a commit to ShangmingCai/vllm that referenced this pull request Feb 10, 2025
Signed-off-by: rshaw@neuralmagic.com <rshaw@neuralmagic.com>
Signed-off-by: mgoin <michael@neuralmagic.com>
Co-authored-by: mgoin <michael@neuralmagic.com>
Co-authored-by: simon-mo <xmo@berkeley.edu>
GWS0428 pushed a commit to GWS0428/VARserve that referenced this pull request Feb 12, 2025
Signed-off-by: rshaw@neuralmagic.com <rshaw@neuralmagic.com>
Signed-off-by: mgoin <michael@neuralmagic.com>
Co-authored-by: mgoin <michael@neuralmagic.com>
Co-authored-by: simon-mo <xmo@berkeley.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/build ready ONLY add when PR is ready to merge/full CI is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants