Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix description
Signed-off-by: changwangss <[email protected]>
  • Loading branch information
changwangss committed Sep 18, 2024
commit f9153297af478cd56c9f7658bd0d10fda759792e
13 changes: 10 additions & 3 deletions neural_compressor/torch/algorithms/weight_only/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -1233,6 +1233,10 @@ def convert_dtype_str2torch(str_dtype):

# ref reverse reorder from AutoAWQ https://github.com/AutoGPTQ/AutoGPTQ/blob/v0.7.1/auto_gptq/modeling/_utils.py#L491
def awq_reverse_reorder_int_tensor(int_tensor, bits: int):
"""Awq tensor convert tool.

Reverse_reorder_int_tensor
"""
assert bits == 4

int_tensor = int_tensor.T.contiguous()
Expand Down Expand Up @@ -1265,7 +1269,8 @@ def unpack_awq(
bits: int,
group_size: int,
):
"""
"""Unpack awq format to actual values.

Args:
awq_qweight (`torch.LongTensor`):
Expected shape: (in_features, out_features // (32 // bits))
Expand Down Expand Up @@ -1336,7 +1341,8 @@ def pack_from_tensors(
bits: int,
group_size: int,
):
"""
"""Pack the tensor to optimum format.

Args:
unpacked_qweight (`torch.LongTensor`):
Expected shape: (in_features, out_features)
Expand Down Expand Up @@ -1420,7 +1426,8 @@ def repack_awq_to_optimum_format(
bits: int,
group_size: int,
):
"""
"""The function to repack_awq_to_optimum_format.

Args:
awq_qweight (`torch.LongTensor`):
Expected shape: (in_features, out_features // (32 // bits))
Expand Down
Loading