File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1127,11 +1127,16 @@ static void llama_sampler_k_shift_free(struct llama_sampler * smpl) {
11271127    delete  (llama_sampler_k_shift *) smpl->ctx ;
11281128}
11291129
1130+ static  void  llama_sampler_k_shift_reset (struct  llama_sampler  * smpl) {
1131+     auto  * ctx = (llama_sampler_k_shift *) smpl->ctx ;
1132+     ctx->k_set  = false ;
1133+ }
1134+ 
11301135static  struct  llama_sampler_i  llama_sampler_k_shift_i = {
11311136    /*  .name   = */   llama_sampler_k_shift_name,
11321137    /*  .accept = */   nullptr ,
11331138    /*  .apply  = */   llama_sampler_k_shift_apply,
1134-     /*  .reset  = */   nullptr ,
1139+     /*  .reset  = */   llama_sampler_k_shift_reset ,
11351140    /*  .clone  = */   llama_sampler_k_shift_clone,
11361141    /*  .free   = */   llama_sampler_k_shift_free,
11371142};
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments