Skip to content

Update transformer_building_blocks.py #3519

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions intermediate_source/transformer_building_blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
# ===============================
# First, we will briefly introduce the four technologies mentioned in the introduction
#
# * `torch.nested <https://pytorch.org/tutorials/prototype/nestedtensor.html>`_
# * `torch.nested <https://pytorch.org/tutorials/unstable/nestedtensor.html>`_
#
# Nested tensors generalize the shape of regular dense tensors, allowing for
# representation of ragged-sized data with the same tensor UX. In the context of
Expand Down Expand Up @@ -157,7 +157,7 @@
# skipped, performance and memory usage improve.
#
# We'll demonstrate the above by building upon the ``MultiheadAttention`` layer in the
# `Nested Tensor tutorial <https://pytorch.org/tutorials/prototype/nestedtensor.html>`_
# `Nested Tensor tutorial <https://pytorch.org/tutorials/unstable/nestedtensor.html>`_
# and comparing it to the ``nn.MultiheadAttention`` layer.

import torch
Expand Down