diff --git a/docs/source/tutorial_swap_components.md b/docs/source/tutorial_swap_components.md index 8e6a32b4d5d..5d9149e5ed8 100644 --- a/docs/source/tutorial_swap_components.md +++ b/docs/source/tutorial_swap_components.md @@ -34,6 +34,10 @@ layer = TransformerLayer.with_components(ffn=NewCustomFFN)(opt, ...) As long as `NewCustomFFN` has the same `__init__` and `forward` method signatures as `TransformerFFN`, everything should just work. +For examples, see: +- `parlai/agents/examples/transformer_variant.py` +- `projects/params_vs_compute/hash_ladder/hash_ladder.py` + ## Composability Since the swapping happens before instantiation, decorated components can be transparently composed. For example: