diff --git a/intermediate_source/transformer_building_blocks.py b/intermediate_source/transformer_building_blocks.py index 36b2019f19..67860b85b7 100644 --- a/intermediate_source/transformer_building_blocks.py +++ b/intermediate_source/transformer_building_blocks.py @@ -1,4 +1,7 @@ """ +.. meta:: + :description: Learn how to optimize transformer models by replacing nn.Transformer with Nested Tensors and torch.compile() for significant performance gains in PyTorch. + Accelerating PyTorch Transformers by replacing ``nn.Transformer`` with Nested Tensors and ``torch.compile()`` ============================================================================================================= **Author:** `Mikayla Gawarecki `_ diff --git a/prototype_source/nestedtensor.py b/prototype_source/nestedtensor.py index ecf099c1e0..6578cf7345 100644 --- a/prototype_source/nestedtensor.py +++ b/prototype_source/nestedtensor.py @@ -369,3 +369,8 @@ def benchmark(func, *args, **kwargs): # how implement multi-head attention for transformers in a way that avoids computation on padding. # For more information, check out the docs for the # `torch.nested `__ namespace. +# +# See Also +# -------- +# +# * `Accelerating PyTorch Transformers by replacing nn.Transformer with Nested Tensors and torch.compile()