convert : fix conversion from FP8 for Deepseek-V3.1-Base
This commit is contained in:
parent
1ae6ab7601
commit
899398277d
|
|
@ -254,6 +254,8 @@ class ModelBase:
|
|||
# TODO: make sure it's a list of integers
|
||||
for i, size in enumerate(weight_block_size):
|
||||
scale = scale.repeat_interleave(size, i)
|
||||
# unpad the scale (e.g. when the tensor size isn't a multiple of the block size)
|
||||
scale = scale[tuple(slice(0, size) for size in weight.shape)]
|
||||
|
||||
return weight.float() * scale
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue