File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -223,9 +223,9 @@ def __iter__(
223223                output_tokens_sampler ,
224224            ):
225225                start_index  =  rand .randint (0 , len (self .text_creator .words ))
226-                 prefix_tokens  =  next (shared_prefix_iter , [])
227226                # Append the prefix tokens only for the first turn 
228227                if  i  ==  0 :
228+                     prefix_tokens  =  next (shared_prefix_iter , [])
229229                    prompt_text  =  self .processor .decode (
230230                        prefix_tokens 
231231                        +  self ._create_prompt (
@@ -234,7 +234,9 @@ def __iter__(
234234                        skip_special_tokens = True ,
235235                    )
236236                    row ["prompt" ].append (prompt_text )
237-                     row ["prompt_tokens_count" ].append (len (prefix_tokens ) +  prompt_tokens )
237+                     row ["prompt_tokens_count" ].append (
238+                         len (prefix_tokens ) +  prompt_tokens 
239+                     )
238240                    row ["output_tokens_count" ].append (output_tokens )
239241                else :
240242                    prompt_text  =  self .processor .decode (
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments