Fix mutable default in Megatron init and IndexError on empty ModuleList (#3944)
* Fix mutable default argument in Megatron init and IndexError on empty ModuleList
In megatron_lm.py, initialize() used args_defaults={} as a default
parameter, which is shared across calls and can cause unexpected
state persistence.
In other.py, is_repeated_block() accessed module[0] without checking
if the ModuleList was empty, causing IndexError for empty ModuleLists.
* Apply style fixes
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>