MCPcopy Create free account
hub / github.com/OpenBitSys/BitDistiller / __init__

Method __init__

inference/models/falcon.py:228–239  ·  view source on GitHub ↗
(self, layer_id: int, args)

Source from the content-addressed store, hash-verified

226
227class TransformerBlock(nn.Module):
228 def __init__(self, layer_id: int, args):
229 super().__init__()
230 self.n_heads = args.n_head
231 self.dim = args.hidden_size
232 self.head_dim = args.hidden_size // args.n_head
233 self.self_attention = FalconAttentionFused(args)
234 self.mlp = FalconMLP(dim=args.hidden_size)
235 self.layer_id = layer_id
236 self.input_layernorm = nn.LayerNorm(
237 args.hidden_size, eps=args.layer_norm_epsilon
238 )
239 # self.post_attention_layernorm = nn.LayerNorm(args.dim, eps=args.norm_eps)
240
241 def forward(
242 self,

Callers

nothing calls this directly

Calls 3

FalconMLPClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected