MCPcopy Create free account
hub / github.com/Pints-AI/1.5-Pints / __init__

Method __init__

lit_gpt/model.py:246–253  ·  view source on GitHub ↗
(self, config: Config)

Source from the content-addressed store, hash-verified

244
245class Block(nn.Module):
246 def __init__(self, config: Config) -> None:
247 super().__init__()
248 self.norm_1 = config.norm_class(config.n_embd, eps=config.norm_eps)
249 self.attn = CausalSelfAttention(config)
250 if not config.shared_attention_norm:
251 self.norm_2 = config.norm_class(config.n_embd, eps=config.norm_eps)
252 self.mlp = config.mlp_class(config)
253 self.config = config
254
255 def forward(
256 self,

Callers

nothing calls this directly

Calls 4

norm_classMethod · 0.80
CausalSelfAttentionClass · 0.70
__init__Method · 0.45
mlp_classMethod · 0.45

Tested by

no test coverage detected