MCPcopy Create free account
hub / github.com/LargeWorldModel/LWM / setup

Method setup

lwm/llama.py:1055–1064  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1053 precision: Optional[Union[jax.lax.Precision, str]]=None
1054
1055 def setup(self):
1056 self.transformer = FlaxLLaMAModule(self.config, dtype=self.dtype)
1057 self.lm_head = nn.Dense(
1058 self.config.vocab_size,
1059 dtype=self.dtype,
1060 param_dtype=self.param_dtype,
1061 use_bias=False,
1062 kernel_init=jax.nn.initializers.normal(stddev=self.config.initializer_range),
1063 precision=self.precision,
1064 )
1065
1066 def __call__(
1067 self,

Callers

nothing calls this directly

Calls 1

FlaxLLaMAModuleClass · 0.85

Tested by

no test coverage detected