| 1 | #pragma once |
|---|---|
| 2 | |
| 3 | // TODO: rename llama-sampling.h/.cpp to llama-sampler.h/.cpp ? |
| 4 | |
| 5 | #include "llama.h" |
| 6 | |
| 7 | #include <vector> |
| 8 | |
| 9 | struct llama_vocab; |
| 10 | struct llama_grammar; |
| 11 | |
| 12 | // sampler chain |
| 13 | |
| 14 | struct llama_sampler_chain { |
| 15 | llama_sampler_chain_params params; |
| 16 | |
| 17 | std::vector<struct llama_sampler *> samplers; |
| 18 | |
| 19 | // timing |
| 20 | |
| 21 | mutable int64_t t_sample_us; |
| 22 | |
| 23 | mutable int32_t n_sample; |
| 24 | }; |
| 25 | |
| 26 | struct llama_sampler * llama_sampler_init_dry_testing( |
| 27 | int32_t context_size, |
| 28 | float dry_multiplier, |
| 29 | float dry_base, |
| 30 | int32_t dry_allowed_length, |
| 31 | int32_t dry_penalty_last_n, |
| 32 | const std::vector<std::vector<llama_token>>& seq_breakers); |
| 33 |