aboutsummaryrefslogtreecommitdiff
path: root/llama.h
diff options
context:
space:
mode:
authorGuillaume "Vermeille" Sanchez <Guillaume.V.Sanchez@gmail.com>2023-07-21 12:58:36 +0200
committerGitHub <noreply@github.com>2023-07-21 13:58:36 +0300
commitab0e26bdfb7b3adb1e3145c61a0fa92d1abd21d0 (patch)
tree84420ac76f4de9304ab23a9835c4feca03171fed /llama.h
parent73643f5fb1136dc2b65ae910bdc5a431520d70a2 (diff)
llama : remove cfg smooth factor as it is only a reparameterization of the guidance scale (#2280)
Diffstat (limited to 'llama.h')
-rw-r--r--llama.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/llama.h b/llama.h
index c565f6a..bbf28e6 100644
--- a/llama.h
+++ b/llama.h
@@ -344,13 +344,11 @@ extern "C" {
/// @param candidates A vector of `llama_token_data` containing the candidate tokens, the logits must be directly extracted from the original generation context without being sorted.
/// @params guidance_ctx A separate context from the same model. Other than a negative prompt at the beginning, it should have all generated and user input tokens copied from the main context.
/// @params scale Guidance strength. 1.0f means no guidance. Higher values mean stronger guidance.
- /// @params smooth_factor Smooth factor between guidance logits and original logits. 1.0f means only use guidance logits. 0.0f means only original logits.
LLAMA_API void llama_sample_classifier_free_guidance(
struct llama_context * ctx,
llama_token_data_array * candidates,
struct llama_context * guidance_ctx,
- float scale,
- float smooth_factor);
+ float scale);
/// @details Sorts candidate tokens by their logits in descending order and calculate probabilities based on logits.
LLAMA_API void llama_sample_softmax(struct llama_context * ctx, llama_token_data_array * candidates);