From 45023120686518e42a864004b3144c4ebe037095 Mon Sep 17 00:00:00 2001 From: "Thomas J. Fan" Date: Tue, 31 Dec 2024 11:56:45 -0500 Subject: [PATCH] Adds message_transform link from SFTDataset docstring to docs --- torchtune/datasets/_sft.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchtune/datasets/_sft.py b/torchtune/datasets/_sft.py index f186974af9..9ee11244b6 100644 --- a/torchtune/datasets/_sft.py +++ b/torchtune/datasets/_sft.py @@ -83,7 +83,7 @@ class SFTDataset(Dataset): ``load_dataset`` for more details. message_transform (Transform): callable that keys into the desired fields in the sample and converts text content to a list of :class:`~torchtune.data.Message`. It is expected that the final list - of messages are stored in the ``"messages"`` key. + of messages are stored in the ``"messages"`` key. See :ref:`message_transform_usage_label` for details. model_transform (Transform): callable that applies model-specific pre-processing to the sample after the list of messages is created from ``message_transform``. This includes tokenization and any modality-specific transforms. It is expected to return at minimum ``"tokens"`` and ``"mask"`` keys.