MCPcopy Create free account
hub / github.com/AI-Hypercomputer/maxtext / init_decode_state

Function init_decode_state

src/MaxText/maxtext_utils.py:743–746  ·  view source on GitHub ↗

Init train state with null opt state for decode.

(apply_fn, params)

Source from the content-addressed store, hash-verified

741
742
743def init_decode_state(apply_fn, params) -> train_state.TrainState:
744 """Init train state with null opt state for decode."""
745 state = train_state.TrainState(step=0, apply_fn=apply_fn, params=params, tx=None, opt_state={}) # type: ignore
746 return state
747
748
749def init_training_state(apply_fn, params, tx):

Callers 2

init_initial_stateFunction · 0.85
setup_decode_stateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected