Support compressed tensors fp8w8a8 (#4743)
This commit is contained in:
@@ -23,6 +23,7 @@ from sglang.srt.layers.parameter import (
|
||||
PackedvLLMParameter,
|
||||
PerTensorScaleParameter,
|
||||
RowvLLMParameter,
|
||||
_ColumnvLLMParameter,
|
||||
)
|
||||
from sglang.srt.layers.quantization.base_config import (
|
||||
QuantizationConfig,
|
||||
@@ -423,8 +424,6 @@ class ColumnParallelLinear(LinearBase):
|
||||
assert loaded_weight.numel() == 1
|
||||
loaded_weight = loaded_weight.reshape(1)
|
||||
|
||||
from sglang.srt.layers.parameter import _ColumnvLLMParameter
|
||||
|
||||
if isinstance(param, _ColumnvLLMParameter):
|
||||
param.load_column_parallel_weight(
|
||||
loaded_weight,
|
||||
@@ -1247,7 +1246,7 @@ class RowParallelLinear(LinearBase):
|
||||
assert loaded_weight.numel() == 1
|
||||
loaded_weight = loaded_weight.reshape(1)
|
||||
|
||||
if isinstance(param, BasevLLMParameter):
|
||||
if isinstance(param, RowvLLMParameter):
|
||||
# This `BasevLLMParameter` is defined in sglang/srt/layers/parameter.py,
|
||||
# It supports additional parameters like tp_rank and use_presharded_weights.
|
||||
param.load_row_parallel_weight(
|
||||
|
||||
Reference in New Issue
Block a user