|
17 | 17 | struct gpt_params {
|
18 | 18 | int32_t seed = -1; // RNG seed
|
19 | 19 | int32_t n_threads = std::min(4, (int32_t) std::thread::hardware_concurrency());
|
20 |
| - int32_t n_predict = 128; // new tokens to predict |
| 20 | + int32_t n_predict = -1; // new tokens to predict |
21 | 21 | int32_t n_parts = -1; // amount of model parts (-1 = determine from model dimensions)
|
22 | 22 | int32_t n_ctx = 512; // context size
|
23 | 23 | int32_t n_batch = 512; // batch size for prompt processing (must be >=32 to use BLAS)
|
24 | 24 | int32_t n_keep = 0; // number of tokens to keep from initial prompt
|
25 | 25 |
|
26 | 26 | // sampling parameters
|
27 | 27 | std::unordered_map<llama_token, float> logit_bias; // logit bias for specific tokens
|
28 |
| - int32_t top_k = 0; // <= 0 to use vocab size |
29 |
| - float top_p = 1.0f; // 1.0 = disabled |
30 |
| - float tfs_z = 1.0f; // 1.0 = disabled |
31 |
| - float typical_p = 1.0f; // 1.0 = disabled |
32 |
| - float temp = 1.0f; // 1.0 = disabled |
33 |
| - float repeat_penalty = 1.0f; // 1.0 = disabled |
34 |
| - int32_t repeat_last_n = -1; // last n tokens to penalize (0 = disable penalty, -1 = context size) |
35 |
| - float frequency_penalty = 0.0f; // 0.0 = disabled |
36 |
| - float presence_penalty = 0.0f; // 0.0 = disabled |
37 |
| - int mirostat = 0; // 0 = disabled, 1 = mirostat, 2 = mirostat 2.0 |
38 |
| - float mirostat_tau = 5.0f; // target entropy |
39 |
| - float mirostat_eta = 0.1f; // learning rate |
| 28 | + int32_t top_k = 40; // <= 0 to use vocab size |
| 29 | + float top_p = 0.95f; // 1.0 = disabled |
| 30 | + float tfs_z = 1.00f; // 1.0 = disabled |
| 31 | + float typical_p = 1.00f; // 1.0 = disabled |
| 32 | + float temp = 0.80f; // 1.0 = disabled |
| 33 | + float repeat_penalty = 1.10f; // 1.0 = disabled |
| 34 | + int32_t repeat_last_n = 64; // last n tokens to penalize (0 = disable penalty, -1 = context size) |
| 35 | + float frequency_penalty = 0.00f; // 0.0 = disabled |
| 36 | + float presence_penalty = 0.00f; // 0.0 = disabled |
| 37 | + int mirostat = 0; // 0 = disabled, 1 = mirostat, 2 = mirostat 2.0 |
| 38 | + float mirostat_tau = 5.00f; // target entropy |
| 39 | + float mirostat_eta = 0.10f; // learning rate |
40 | 40 |
|
41 | 41 | std::string model = "models/lamma-7B/ggml-model.bin"; // model path
|
42 | 42 | std::string prompt = "";
|
|
0 commit comments