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.
Summary:
adds support for gemlite kernels
Test Plan:
python3 -m sglang.bench_one_batch --model meta-llama/Meta-Llama-3-8B --batch-size 1 --input 1024 --output 512 --json-model-override-args '{"architectures": ["TorchNativeLlamaForCausalLM"]}' --torchao-config gemlite-32-4-64 --dtype float16 --disable-cuda-graph
python3 -m sglang.bench_one_batch --model meta-llama/Meta-Llama-3-8B --batch-size 32 --input 1024 --output 512 --json-model-override-args '{"architectures": ["TorchNativeLlamaForCausalLM"]}' --torchao-config gemlite-32-4-64 --dtype float16 --disable-cuda-graph
python3 -m sglang.bench_one_batch --model meta-llama/Meta-Llama-3-8B --batch-size 1 --input 1024 --output 512 --json-model-override-args '{"architectures": ["TorchNativeLlamaForCausalLM"]}' --enable-torch-compile --torchao-config gemlite-32-4-64 --dtype float16
python3 -m sglang.bench_one_batch --model meta-llama/Meta-Llama-3-8B --batch-size 1 --input 1024 --output 512 --json-model-override-args '{"architectures": ["TorchNativeLlamaForCausalLM"]}' --enable-torch-compile --torchao-config gemlite-8-4-64 --dtype float16
Reviewers:
Subscribers:
Tasks:
Tags:
Motivation
This PR is to add support for teh torchao gemlite integration in SGLang for int4wo quantization, the motivation behind the work is that we expect these kernels to have better TTFT performance compared to the existing int4 integration which is optimized for non prefill performance.
Modifications
Added some new options to the torchao utils and added a place to store the gemlite cache after warmup
Checklist