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

Small fixes for torchao quant #2476

Merged
merged 3 commits into from
Dec 16, 2024
Merged

Conversation

jerryzh168
Copy link
Contributor

Summary:

  1. quantization should happen before tp (in the future ideally we can just laod quantized checkpoints, and tp can be different depending on specific deployment env)
  2. adding _is_linear check for filter_fn

Test Plan:

python3 -m sglang.bench_one_batch --model meta-llama/Meta-Llama-3-8B --batch-size 1 --input 128 --output 8 --json-model-override-args '{"architectures": ["TorchNativeLlamaForCausalLM"]}' --enable-torch-compile --torchao-config int4wo-64 --tp-size 2

Reviewers:

Subscribers:

Tasks:

Tags:

Summary:
1. quantization should happen before tp (in the future ideally we can just laod quantized checkpoints, and tp can be different depending on specific deployment env)
2. adding _is_linear check for filter_fn

Test Plan:
```
python3 -m sglang.bench_one_batch --model meta-llama/Meta-Llama-3-8B --batch-size 1 --input 128 --output 8 --json-model-override-args '{"architectures": ["TorchNativeLlamaForCausalLM"]}' --enable-torch-compile --torchao-config int4wo-64 --tp-size 2
```

Reviewers:

Subscribers:

Tasks:

Tags:
@jerryzh168
Copy link
Contributor Author

not sure why the CI is failing, I can get speedup locally

@zhyncs
Copy link
Member

zhyncs commented Dec 16, 2024

Hi @jerryzh168 May you try this locally

cd test/srt
python3 run_suite.py --suite minimal --range-begin 15 --range-end 30

@jerryzh168
Copy link
Contributor Author

@zhyncs I tried, but has some issues:

[2024-12-16 11:26:58] Initialization failed. warmup error: Traceback (most recent call last):
  File "/data/users/jerryzh/sglang/python/sglang/srt/server.py", line 621, in _wait_and_warmup
    assert res.status_code == 200, f"{res=}, {res.text=}"
AssertionError: res=<Response [403]>, res.text='<html><body>kErrorForbidden, request blocked: 127.0.0.1 is private</body></html>'

not sure what I need to do to get around this.

The current errors in the PR doesn't seem to be related to the change though

@merrymercy merrymercy merged commit 8269947 into sgl-project:main Dec 16, 2024
13 of 15 checks passed
merrymercy added a commit that referenced this pull request Dec 16, 2024
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