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

Method custom_forward

tests/unit/modeling.py:431–436  ·  view source on GitHub ↗
(*inputs)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected