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

Method custom

tests/unit/modeling.py:429–438  ·  view source on GitHub ↗
(start, end)

Source from the content-addressed store, hash-verified

427 all_encoder_layers = []
428
429 def custom(start, end):
430
431 def custom_forward(*inputs):
432 layers = self.layer[start:end]
433 x_ = inputs[0]
434 for layer in layers:
435 x_ = layer(x_, inputs[1])
436 return x_
437
438 return custom_forward
439
440 if checkpoint_activations:
441 l = 0

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected