[Bugfix] [Quantization] Fix loading for CT DSV2 (#47780)
This commit is contained in:
@@ -829,7 +829,7 @@ def _try_load_fp8_indexer_wk(
|
|||||||
if "indexer.wk." not in name or "wk_weights" in name:
|
if "indexer.wk." not in name or "wk_weights" in name:
|
||||||
return False # Weight is not an isolated WK weight for the indexer, ignore.
|
return False # Weight is not an isolated WK weight for the indexer, ignore.
|
||||||
is_weight = name.endswith(".weight") and tensor.dtype == torch.float8_e4m3fn
|
is_weight = name.endswith(".weight") and tensor.dtype == torch.float8_e4m3fn
|
||||||
is_scale = "weight_scale_inv" in name
|
is_scale = "weight_scale" in name
|
||||||
if not is_weight and not is_scale:
|
if not is_weight and not is_scale:
|
||||||
return False # WK is not in FP8 format, ignore.
|
return False # WK is not in FP8 format, ignore.
|
||||||
# Buffer this tensor (weight or scale) until both have arrived.
|
# Buffer this tensor (weight or scale) until both have arrived.
|
||||||
|
|||||||
Reference in New Issue
Block a user