Fix core dumped when `NemotronH` is torch compiled (#44854)
* fix
* fix
* fix
* Update src/transformers/models/nemotron_h/modular_nemotron_h.py
Co-authored-by: Cyril Vallez <cyril.vallez@huggingface.co>
* correct fix
* much better fix
* type hint
---------
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
Co-authored-by: Cyril Vallez <cyril.vallez@huggingface.co>
Co-authored-by: Cyril Vallez <cyril.vallez@gmail.com>