diff options
author | Alexey Parfenov <zxed@alkatrazstudio.net> | 2023-12-23 09:31:49 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-23 11:31:49 +0200 |
commit | 6123979952385847d8348e295d77d6e01da8aa84 (patch) | |
tree | 2d536d31ef7e1b6f07468ff6b13710da1fe4f732 /common/sampling.h | |
parent | b9ec82d262cb20d7f0a8a1157bfa9aace40e2625 (diff) |
server : allow to specify custom prompt for penalty calculation (#3727)
Diffstat (limited to 'common/sampling.h')
-rw-r--r-- | common/sampling.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/sampling.h b/common/sampling.h index fdfa9eed..f16ef97e 100644 --- a/common/sampling.h +++ b/common/sampling.h @@ -36,6 +36,9 @@ typedef struct llama_sampling_params { float cfg_scale = 1.f; // how strong is guidance std::unordered_map<llama_token, float> logit_bias; // logit bias for specific tokens + + std::vector<llama_token> penalty_prompt_tokens; + bool use_penalty_prompt_tokens = false; } llama_sampling_params; // general sampler context |