Skip to content

Fix formatting in the scaled_dot tutorial #3087

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
Oct 9, 2024
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
10 changes: 5 additions & 5 deletions intermediate_source/scaled_dot_product_attention_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def generate_rand_batch(

######################################################################
# Using SDPA with ``torch.compile``
# =================================
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# With the release of PyTorch 2.0, a new feature called
# ``torch.compile()`` has been introduced, which can provide
Expand Down Expand Up @@ -324,9 +324,9 @@ def generate_rand_batch(
#

######################################################################
# Using SDPA with attn_bias subclasses`
# ==========================================
#
# Using SDPA with attn_bias subclasses
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# As of PyTorch 2.3, we have added a new submodule that contains tensor subclasses.
# Designed to be used with ``torch.nn.functional.scaled_dot_product_attention``.
# The module is named ``torch.nn.attention.bias`` and contains the following two
Expand Down Expand Up @@ -394,7 +394,7 @@ def generate_rand_batch(

######################################################################
# Conclusion
# ==========
# ~~~~~~~~~~~
#
# In this tutorial, we have demonstrated the basic usage of
# ``torch.nn.functional.scaled_dot_product_attention``. We have shown how
Expand Down
Loading