From 370b06cd3e6a71c0d2fe7f3ae153e2fe34f012b0 Mon Sep 17 00:00:00 2001 From: Joel Schlosser Date: Fri, 16 Jan 2026 10:56:27 -0500 Subject: [PATCH 1/4] Add warning about inactive NJT development to related docs --- intermediate_source/transformer_building_blocks.py | 4 ++++ unstable_source/nestedtensor.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/intermediate_source/transformer_building_blocks.py b/intermediate_source/transformer_building_blocks.py index decaf0602f7..84cfdf05f93 100644 --- a/intermediate_source/transformer_building_blocks.py +++ b/intermediate_source/transformer_building_blocks.py @@ -79,6 +79,10 @@ # sequence lengths. They eliminate the need for the bug-prone practices of explicit # padding and masking (think ``key_padding_mask`` in ``nn.MultiHeadAttention``). # +# ```{warning} +# Nested tensors are not currently under active development. Use at your own risk. +# ``` +# # * `scaled_dot_product_attention `_ # # ``scaled_dot_product_attention`` is a primitive for diff --git a/unstable_source/nestedtensor.py b/unstable_source/nestedtensor.py index 77f8a4cebe1..9463328cbff 100644 --- a/unstable_source/nestedtensor.py +++ b/unstable_source/nestedtensor.py @@ -3,6 +3,8 @@ Getting Started with Nested Tensors =============================================================== +**Warning: Nested tensors are not currently under active development. Use at your own risk.** + Nested tensors generalize the shape of regular dense tensors, allowing for representation of ragged-sized data. @@ -21,8 +23,6 @@ they are invaluable for building transformers that can efficiently operate on ragged sequential inputs. Below, we present an implementation of multi-head attention using nested tensors that, combined usage of ``torch.compile``, out-performs operating naively on tensors with padding. - -Nested tensors are currently a prototype feature and are subject to change. """ import numpy as np From 396a87536b557becae0e4f07aac43daadd36f6d2 Mon Sep 17 00:00:00 2001 From: Joel Schlosser Date: Fri, 16 Jan 2026 14:17:09 -0500 Subject: [PATCH 2/4] Use RST syntax --- intermediate_source/transformer_building_blocks.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/intermediate_source/transformer_building_blocks.py b/intermediate_source/transformer_building_blocks.py index 84cfdf05f93..b0b7f96ae26 100644 --- a/intermediate_source/transformer_building_blocks.py +++ b/intermediate_source/transformer_building_blocks.py @@ -79,9 +79,8 @@ # sequence lengths. They eliminate the need for the bug-prone practices of explicit # padding and masking (think ``key_padding_mask`` in ``nn.MultiHeadAttention``). # -# ```{warning} -# Nested tensors are not currently under active development. Use at your own risk. -# ``` +# .. warning:: +# Nested tensors are not currently under active development. Use at your own risk. # # * `scaled_dot_product_attention `_ # From eec59114d61c61d5fdf85de84a4c2647ce7ac100 Mon Sep 17 00:00:00 2001 From: Svetlana Karslioglu Date: Fri, 16 Jan 2026 11:33:09 -0800 Subject: [PATCH 3/4] Update unstable_source/nestedtensor.py --- unstable_source/nestedtensor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/unstable_source/nestedtensor.py b/unstable_source/nestedtensor.py index 9463328cbff..5da59b000d5 100644 --- a/unstable_source/nestedtensor.py +++ b/unstable_source/nestedtensor.py @@ -3,7 +3,8 @@ Getting Started with Nested Tensors =============================================================== -**Warning: Nested tensors are not currently under active development. Use at your own risk.** +.. warning:: + Nested tensors are not currently under active development. Use at your own risk. Nested tensors generalize the shape of regular dense tensors, allowing for representation of ragged-sized data. From 9397cc935df2839ed560f8a18f7728a9cce9a4cc Mon Sep 17 00:00:00 2001 From: Svetlana Karslioglu Date: Fri, 16 Jan 2026 12:38:04 -0800 Subject: [PATCH 4/4] Update nestedtensor.py --- unstable_source/nestedtensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unstable_source/nestedtensor.py b/unstable_source/nestedtensor.py index 5da59b000d5..ccec8825793 100644 --- a/unstable_source/nestedtensor.py +++ b/unstable_source/nestedtensor.py @@ -3,7 +3,7 @@ Getting Started with Nested Tensors =============================================================== -.. warning:: +.. warning:: Nested tensors are not currently under active development. Use at your own risk. Nested tensors generalize the shape of regular dense tensors, allowing for representation