MCPcopy Create free account
hub / github.com/OpenSparseLLMs/MoM / load_state_dict

Method load_state_dict

training/flame/data.py:147–154  ·  view source on GitHub ↗
(self, state_dict)

Source from the content-addressed store, hash-verified

145 }
146
147 def load_state_dict(self, state_dict):
148 self.states = state_dict['states']
149 self.buffer = state_dict['buffer'].clone()
150 self.tokens = deepcopy(state_dict['tokens'])
151 self.rand_id = state_dict['rand_id']
152 self.token_id = state_dict['token_id']
153 self.rng_state = state_dict['rng_state'].clone() if state_dict['rng_state'] is not None else None
154 self._epoch = state_dict['epoch']
155
156
157@dataclass

Callers 4

__init__Method · 0.80
__init__Method · 0.80
load_modelFunction · 0.80
__iter__Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected