MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / custom

Method custom

tests/unit/modelingpreln.py:471–480  ·  view source on GitHub ↗
(start, end)

Source from the content-addressed store, hash-verified

469 all_encoder_layers = []
470
471 def custom(start, end):
472
473 def custom_forward(*inputs):
474 layers = self.layer[start:end]
475 x_ = inputs[0]
476 for layer in layers:
477 x_ = layer(x_, inputs[1])
478 return x_
479
480 return custom_forward
481
482 if checkpoint_activations:
483 l = 0

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected