Skip to content

Enable torch.compile for triton backend - #1422

Merged
merrymercy merged 10 commits into
mainfrom
triton-torch-compile
Sep 14, 2024
Merged

merrymercy merged 10 commits into
mainfrom
triton-torch-compile

Conversation

@merrymercy

@merrymercy merrymercy commented Sep 14, 2024 •

Copy link
Copy Markdown
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

@hnyls2002

Copy link
Copy Markdown
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
@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
efschu pushed a commit to efschu/htsglang that referenced this pull request Sep 16, 2026
…a instead of recomputed: (a) under windowed store reads (staging host role) a span above the prefetch budget is deferred until rows free, not sent to the recompute path; (b) --pin-ledger-arm-s default 5 GB gives P a 271k-token staging pool (was S=1 = 54,254 tokens on PP0, smaller than one 100k prompt). Tests: 1236, 1378-2b green; 1317 x_is_floored and 1068 (10) red at the base too.
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