MCPcopy Create free account
hub / github.com/THUDM/LongWriter / build_layer

Method build_layer

train/patch/modeling_chatglm.py:502–503  ·  view source on GitHub ↗
(layer_number)

Source from the content-addressed store, hash-verified

500
501 # Transformer layers.
502 def build_layer(layer_number):
503 return GLMBlock(config, layer_number, device=device)
504
505 self.layers = torch.nn.ModuleList([build_layer(i + 1) for i in range(self.num_layers)])
506

Callers

nothing calls this directly

Calls 1

GLMBlockClass · 0.85

Tested by

no test coverage detected