Unverified Commit 6c7cb903 authored by Lianmin Zheng's avatar Lianmin Zheng Committed by GitHub
Browse files

[Minor] improve kill scripts and torchao import (#1375)

parent dff2860a
...@@ -3,15 +3,17 @@ Common utilities for torchao. ...@@ -3,15 +3,17 @@ Common utilities for torchao.
""" """
import torch import torch
from torchao.quantization import (
int4_weight_only,
int8_dynamic_activation_int8_weight,
int8_weight_only,
quantize_,
)
def torchao_quantize_param_data(param, torchao_config): def torchao_quantize_param_data(param, torchao_config):
# Lazy import to suppress some warnings
from torchao.quantization import (
int4_weight_only,
int8_dynamic_activation_int8_weight,
int8_weight_only,
quantize_,
)
dummy_linear = torch.nn.Linear(param.shape[1], param.shape[0], bias=False) dummy_linear = torch.nn.Linear(param.shape[1], param.shape[0], bias=False)
dummy_linear.weight = param dummy_linear.weight = param
if "int8wo" in torchao_config: if "int8wo" in torchao_config:
......
kill -9 $(ps aux | grep 'sglang' | grep -v 'grep' | awk '{print $2}') kill -9 $(ps aux | grep 'sglang.launch_server' | grep -v 'grep' | awk '{print $2}')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment