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

Method __init__

lit_gpt/lora.py:601–609  ·  view source on GitHub ↗
(self, config: Config)

Source from the content-addressed store, hash-verified

599
600class Block(BaseBlock):
601 def __init__(self, config: Config) -> None:
602 nn.Module.__init__(self)
603 self.norm_1 = config.norm_class(config.n_embd, eps=config.norm_eps)
604 self.attn = CausalSelfAttention(config)
605 if not config.shared_attention_norm:
606 self.norm_2 = config.norm_class(config.n_embd, eps=config.norm_eps)
607 self.mlp = config.mlp_class(config)
608
609 self.config = config
610
611
612class CausalSelfAttention(BaseCausalSelfAttention):

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