Add safe_serialization (safetensors) option to the checkpoint conversion script (`examples/convert_dcp_to_hf.py`)
Open
enhancement
- Dominant language
- Python
- Stars
- 2k
- Forks
- 561
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 145
Description
**Is your feature request related to a problem? Please describe.**
Currently, the ckpt conversion script `examples/convert_dcp_to_hf.py` saves model weights in `.bin` for the HF checkpoint. The user has to convert it to safetensors.
**Describe the solution you'd like**
HF has a feature. It should be something like add an option
```
model.save_pretrained(
...,
safe_serialization=True
)
```
https://github.com/NVIDIA/NeMo-RL/blob/main/examples/convert_dcp_to_hf.py
**Describe alternatives you've considered**
**Additional context**
Contributor guide
Assessment
This issue has not been assessed yet.