mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-11-04 09:32:00 +00:00 
			
		
		
		
	llama : add DRY sampler (#9702)
* sampling : add DRY sampler (post-refactor) * DRY: Trying to fix coauthors, removed unneeded line * DRY: Fixed redundant code * DRY: Fixed crash issue due to DRY being in chain but uninitialized --------- Co-authored-by: l3utterfly <gc.pthzfoldr@gmail.com> Co-authored-by: pi6am <34464159+pi6am@users.noreply.github.com>
This commit is contained in:
		@@ -28,3 +28,21 @@ struct llama_sampler * llama_sampler_init_grammar_impl(
 | 
			
		||||
 | 
			
		||||
struct llama_sampler * llama_sampler_init_infill_impl(
 | 
			
		||||
        const struct llama_vocab & vocab);
 | 
			
		||||
 | 
			
		||||
struct llama_sampler * llama_sampler_init_dry_impl(
 | 
			
		||||
        const struct llama_vocab &  vocab,
 | 
			
		||||
                         int32_t    context_size,
 | 
			
		||||
                           float    dry_multiplier,
 | 
			
		||||
                           float    dry_base,
 | 
			
		||||
                         int32_t    dry_allowed_length,
 | 
			
		||||
                         int32_t    dry_penalty_last_n,
 | 
			
		||||
                      const char ** seq_breakers,
 | 
			
		||||
                          size_t    num_breakers);
 | 
			
		||||
 | 
			
		||||
struct llama_sampler * llama_sampler_init_dry_testing(
 | 
			
		||||
                         int32_t   context_size,
 | 
			
		||||
                           float   dry_multiplier,
 | 
			
		||||
                           float   dry_base,
 | 
			
		||||
                         int32_t   dry_allowed_length,
 | 
			
		||||
                         int32_t   dry_penalty_last_n,
 | 
			
		||||
  const std::vector<std::vector<llama_token>>& seq_breakers);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user