MCPcopy Create free account
hub / github.com/Tele-AI/Telechat / __init__

Method __init__

models/12B/modeling_telechat.py:509–522  ·  view source on GitHub ↗
(self, config: TelechatConfig, layer_idx)

Source from the content-addressed store, hash-verified

507
508class TelechatBlock(nn.Module):
509 def __init__(self, config: TelechatConfig, layer_idx):
510 super().__init__()
511 hidden_size = config.hidden_size
512
513 self.input_layernorm = MixedFusedRMSNorm(hidden_size, eps=config.layer_norm_epsilon)
514 self.num_heads = config.n_head
515 self.layer_idx = layer_idx
516 self.self_attention = TelechatAttention(config, layer_idx)
517 self.post_attention_layernorm = MixedFusedRMSNorm(hidden_size, eps=config.layer_norm_epsilon)
518
519 self.mlp = TelechatMLP(config)
520
521 self.apply_residual_connection_post_layernorm = config.apply_residual_connection_post_layernorm
522 self.hidden_dropout = config.hidden_dropout
523
524 def forward(
525 self,

Callers

nothing calls this directly

Calls 4

MixedFusedRMSNormClass · 0.70
TelechatAttentionClass · 0.70
TelechatMLPClass · 0.70
__init__Method · 0.45

Tested by

no test coverage detected