MCPcopy Create free account
hub / github.com/zai-org/CodeGeeX / custom_forward

Method custom_forward

codegeex/megatron/model/transformer.py:957–962  ·  view source on GitHub ↗
(*inputs)

Source from the content-addressed store, hash-verified

955
956 def custom(start, end):
957 def custom_forward(*inputs):
958 x_ = inputs[0]
959 for index in range(start, end):
960 layer = self._get_layer(index)
961 x_ = layer(x_, inputs[1])
962 return x_
963
964 return custom_forward
965

Callers

nothing calls this directly

Calls 1

_get_layerMethod · 0.95

Tested by

no test coverage detected