Skip to content

Commit 3a31c57

Browse files
committed
fix
1 parent 01c30f6 commit 3a31c57

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fastdeploy/model_executor/layers/quantization/weight_only.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ def __init__(
237237
def create_weights(self, layer, **extra_weight_attrs):
238238
# TODO(bukejiyu): remove v1 loader check when v0 loader is removed
239239
self.model_format = extra_weight_attrs.get("model_format")
240+
if "split_axis" in extra_weight_attrs and hasattr(layer, "nranks") and layer.nranks > 0:
241+
extra_weight_attrs = {**extra_weight_attrs, "is_distributed": True}
240242
if self.quant_config.is_checkpoint_bf16 and layer.fd_config.load_config.load_choices == "default_v1":
241243
weight_shape = layer.weight_shape[::-1] if self.model_format == "torch" else layer.weight_shape
242244
layer.weight = layer.create_parameter(

0 commit comments

Comments
 (0)