File tree Expand file tree Collapse file tree 2 files changed +1
-5
lines changed Expand file tree Collapse file tree 2 files changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ keyword arguments not specified in the config if we'd like:
119
119
tokenizer : ModelTokenizer,
120
120
train_on_input : bool = True ,
121
121
max_seq_len : int = 512 ,
122
- ) -> InstructDataset :
122
+ ) -> SFTDataset :
123
123
124
124
from torchtune import config
125
125
Original file line number Diff line number Diff line change @@ -495,10 +495,6 @@ that :class:`~torchtune.datasets.SFTDataset` and :class:`~torchtune.datasets.Tex
495
495
you to create your own dataset class for more flexibility. Let's walk through the :class: `~torchtune.datasets.PreferenceDataset `,
496
496
which has custom functionality for RLHF preference data, as an example to understand what you'll need to do.
497
497
498
- If you take a look at the code for the :class: `~torchtune.datasets.PreferenceDataset ` class,
499
- you'll notice it's quite similar to :class: `~torchtune.datasets.InstructDataset ` with a few
500
- adjustments for chosen and rejected samples in preference data.
501
-
502
498
.. code-block :: python
503
499
504
500
chosen_message = [
You can’t perform that action at this time.
0 commit comments