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:
119119        tokenizer : ModelTokenizer, 
120120        train_on_input : bool  =  True , 
121121        max_seq_len : int  =  512 , 
122-     ) -> InstructDataset : 
122+     ) -> SFTDataset : 
123123
124124    from  torchtune import  config 
125125
Original file line number Diff line number Diff line change @@ -495,10 +495,6 @@ that :class:`~torchtune.datasets.SFTDataset` and :class:`~torchtune.datasets.Tex
495495you to create your own dataset class for more flexibility. Let's walk through the :class: `~torchtune.datasets.PreferenceDataset `,
496496which has custom functionality for RLHF preference data, as an example to understand what you'll need to do.
497497
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- 
502498.. code-block :: python 
503499
504500    chosen_message =  [ 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments