-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Add sgl_per_token_quant_fp8 #4089
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
Merged
Merged
+307
−0
Conversation
This file contains hidden or 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
18 tasks
BBuf
reviewed
Mar 6, 2025
BBuf
reviewed
Mar 6, 2025
BBuf
reviewed
Mar 7, 2025
6 tasks
aoshen524
pushed a commit
to aoshen524/sglang
that referenced
this pull request
Mar 10, 2025
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.
Motivation
Referred BBUF's Perf Improvement PR of per-tensor-quant-kernel: #3786
Achievement:
The SGL Kernel achieves an average performance improvement of approximately 5.5% across all tested configurations compared to VLLM. For larger workloads (e.g., seq_len=4096, batch_size=128), improvements reach up to 9%, demonstrating that the kernel successfully accelerates FP8 quantization for scenarios typical in model inference.
Benchmark Result:
Modifications
Add sgl_per_token_quant_fp8, followed the sgl_per_tensor_quant_fp8 PR: https://github.com/sgl-project/sglang/pull/3786/files#diff-38cb3d5ce48e039d80415c9934da1c819853855e4a2421a6b8439c357c18c5df
Checklist