MCPcopy Index your code
hub / github.com/pytorch/tutorials / transformer_building_blocks.py

File transformer_building_blocks.py

intermediate_source/transformer_building_blocks.py:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1"""
2.. meta::
3 :description: Learn how to optimize transformer models by replacing nn.Transformer with Nested Tensors and torch.compile() for significant performance gains in PyTorch.
4

Callers

nothing calls this directly

Calls 8

InputProjectionClass · 0.85
SwiGLUFFNClass · 0.85
PackedSwiGLUFFNClass · 0.85
gen_batchFunction · 0.70
MultiHeadAttentionClass · 0.70
benchmarkFunction · 0.70
backwardMethod · 0.45

Tested by

no test coverage detected