Skip to content

Enable torch.compile for triton backend #1422

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 10 commits into from
Sep 14, 2024
Merged

Enable torch.compile for triton backend #1422

merged 10 commits into from
Sep 14, 2024

Conversation

merrymercy
Copy link
Contributor

@merrymercy merrymercy commented Sep 14, 2024

w/ torch.compile

python3 -m sglang.bench_latency --model meta-llama/Meta-Llama-3-8B --batch-size 1 --input 128 --output 8 --attention-backend triton --enable-torch-compile
Decode.  median latency: 0.00616 s, median throughput:    162.40 token/s

w/o torch.compile

python3 -m sglang.bench_latency --model meta-llama/Meta-Llama-3-8B --batch-size 1 --input 128 --output 8 --attention-backend triton
Decode.  median latency: 0.00704 s, median throughput:    142.05 token/s

@hnyls2002
Copy link
Collaborator

w/ torch.compile

python3 -m sglang.bench_latency --model meta-llama/Meta-Llama-3-8B --batch-size 1 --input 128 --output 8 --attention-backend triton --enable-torch-compile
Decode.  median latency: 0.00616 s, median throughput:    162.40 token/s

w/o torch.compile

python3 -m sglang.bench_latency --model meta-llama/Meta-Llama-3-8B --batch-size 1 --input 128 --output 8 --attention-backend triton
Decode.  median latency: 0.00704 s, median throughput:    142.05 token/s

The result is so impressive

@merrymercy merrymercy merged commit 9463bc1 into main Sep 14, 2024
10 checks passed
@merrymercy merrymercy deleted the triton-torch-compile branch September 14, 2024 22:38
@merrymercy merrymercy restored the triton-torch-compile branch September 15, 2024 03:07
@merrymercy merrymercy deleted the triton-torch-compile branch September 15, 2024 14:28
@merrymercy merrymercy mentioned this pull request Sep 19, 2024
3 tasks
timethink pushed a commit to timethink/sglang that referenced this pull request Mar 9, 2025
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

Successfully merging this pull request may close these issues.

3 participants