Merge 8625dee2c04eda7b1b091fbf1e2c511d0e4915ec into 254f6b986720c92ddf97fbb1a6a6465da8e87e29

This commit is contained in:
ゆり 2025-12-25 00:06:36 +00:00 committed by GitHub
commit 258b47e63c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -379,13 +379,15 @@ class CompressedTensors24(CompressedTensorsScheme):
] ]
decompressed = combine_shards(decompressed_shards) decompressed = combine_shards(decompressed_shards)
else: else:
# Use the shape loaded from the model checkpoint rather than
# computing from layer attributes, as some layer types (e.g.,
# RowParallelLinear in vision models) may not have logical_widths
# or input_size_per_partition properly initialized.
out_dim, in_dim = layer.shape.data.view(-1).tolist()
decompressed = sparsity_compressor.decompress_weight( decompressed = sparsity_compressor.decompress_weight(
dict( dict(
compressed=compressed, compressed=compressed,
shape=( shape=(out_dim, in_dim),
layer.logical_widths[0],
layer.input_size_per_partition,
),
bitmask=bitmask, bitmask=bitmask,
) )
) )