Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/InternLM/InternLM
/ sync_states
Function
sync_states
internlm/core/context/random.py:118–121 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
116
117
118
def
sync_states():
119
current_mode = get_current_mode()
120
current_states = torch.cuda.get_rng_state()
121
set_seed_states(current_mode, current_states)
122
123
124
@contextmanager
Callers
3
forward
Method · 0.90
backward
Method · 0.90
_checkpoint_without_reentrant
Function · 0.90
Calls
2
get_current_mode
Function · 0.85
set_seed_states
Function · 0.85
Tested by
no test coverage detected