MCPcopy Create free account
hub / github.com/THUDM/GLM / custom

Method custom

model/modeling_bert.py:545–553  ·  view source on GitHub ↗
(start, end)

Source from the content-addressed store, hash-verified

543 all_encoder_layers = []
544
545 def custom(start, end):
546 def custom_forward(*inputs):
547 layers = self.layer[start:end]
548 x_ = inputs[0]
549 for layer in layers:
550 x_ = layer(x_, inputs[1])
551 return x_
552
553 return custom_forward
554
555 if checkpoint_activations:
556 l = 0

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected