Skip to content

Commit 8f2d028

Browse files
committed
llama : restore comments in llama.h
ggml-ci
1 parent acd5b84 commit 8f2d028

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

include/llama.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,13 +1044,26 @@ extern "C" {
10441044
llama_constraint_context_t ctx;
10451045
};
10461046

1047+
/// @details Sorts candidate tokens by their logits in descending order and calculate probabilities based on logits.
10471048
LLAMA_API struct llama_constraint * llama_constraint_init_softmax (void);
1049+
1050+
/// @details Top-K sampling described in academic paper "The Curious Case of Neural Text Degeneration" https://arxiv.org/abs/1904.09751
10481051
LLAMA_API struct llama_constraint * llama_constraint_init_top_k (int32_t k);
1052+
1053+
/// @details Nucleus sampling described in academic paper "The Curious Case of Neural Text Degeneration" https://arxiv.org/abs/1904.09751
10491054
LLAMA_API struct llama_constraint * llama_constraint_init_top_p (float p, int32_t min_keep);
1055+
1056+
/// @details Minimum P sampling as described in https://github.com/ggerganov/llama.cpp/pull/3841
10501057
LLAMA_API struct llama_constraint * llama_constraint_init_min_p (float p, int32_t min_keep);
1058+
1059+
/// @details Tail Free Sampling described in https://www.trentonbricken.com/Tail-Free-Sampling/.
10511060
LLAMA_API struct llama_constraint * llama_constraint_init_tail_free (float z, int32_t min_keep);
1061+
1062+
/// @details Locally Typical Sampling implementation described in the paper https://arxiv.org/abs/2202.00666.
10521063
LLAMA_API struct llama_constraint * llama_constraint_init_typical (float p, int32_t min_keep);
10531064
LLAMA_API struct llama_constraint * llama_constraint_init_temp (float t);
1065+
1066+
/// @details Dynamic temperature implementation (a.k.a. entropy) described in the paper https://arxiv.org/abs/2309.02772.
10541067
LLAMA_API struct llama_constraint * llama_constraint_init_temp_ext (float t, float delta, float exponent);
10551068

10561069
/// @details Mirostat 1.0 algorithm described in the paper https://arxiv.org/abs/2007.14966. Uses tokens instead of words.

0 commit comments

Comments
 (0)