Num parameters in model.safetensors.index.json (#38531)
Num parameters in index.json
This commit is contained in:
@@ -3750,7 +3750,7 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, PushToHubMixin, PeftAdapterMi
|
||||
index = None
|
||||
if state_dict_split.is_sharded:
|
||||
index = {
|
||||
"metadata": state_dict_split.metadata,
|
||||
"metadata": {"total_parameters": self.num_parameters(), **state_dict_split.metadata},
|
||||
"weight_map": state_dict_split.tensor_to_filename,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user