Crate llm_chain_llama_sys

Source

Structs§

llama_context
llama_context_params
llama_token_data
llama_token_data_array

Constants§

LLAMA_FILE_VERSION
LLAMA_SESSION_VERSION
NULL
__bool_true_false_are_defined
llama_ftype_LLAMA_FTYPE_ALL_F32
llama_ftype_LLAMA_FTYPE_MOSTLY_F16
llama_ftype_LLAMA_FTYPE_MOSTLY_Q4_0
llama_ftype_LLAMA_FTYPE_MOSTLY_Q4_1
llama_ftype_LLAMA_FTYPE_MOSTLY_Q4_2
llama_ftype_LLAMA_FTYPE_MOSTLY_Q4_1_SOME_F16
llama_ftype_LLAMA_FTYPE_MOSTLY_Q5_0
llama_ftype_LLAMA_FTYPE_MOSTLY_Q5_1
llama_ftype_LLAMA_FTYPE_MOSTLY_Q8_0

Functions§

llama_apply_lora_from_file
llama_context_default_params
llama_copy_state_data
llama_eval
llama_free
llama_get_embeddings
llama_get_kv_cache_token_count
llama_get_logits
llama_get_state_size
llama_init_from_file
llama_load_session_file
llama_mlock_supported
llama_mmap_supported
llama_model_quantize
llama_n_ctx
llama_n_embd
llama_n_vocab
llama_print_system_info
llama_print_timings
llama_reset_timings
llama_sample_frequency_and_presence_penalties
@details Frequency and presence penalties described in OpenAI API https://platform.openai.com/docs/api-reference/parameter-details.
llama_sample_repetition_penalty
@details Repetition penalty described in CTRL academic paper https://arxiv.org/abs/1909.05858, with negative logit fix.
llama_sample_softmax
@details Sorts candidate tokens by their logits in descending order and calculate probabilities based on logits.
llama_sample_tail_free
@details Tail Free Sampling described in https://www.trentonbricken.com/Tail-Free-Sampling/.
llama_sample_temperature
llama_sample_token
@details Randomly selects a token from the candidates based on their probabilities.
llama_sample_token_greedy
@details Selects the token with the highest probability.
llama_sample_token_mirostat
@details Mirostat 1.0 algorithm described in the paper https://arxiv.org/abs/2007.14966. Uses tokens instead of words. @param candidates A vector of llama_token_data containing the candidate tokens, their probabilities (p), and log-odds (logit) for the current position in the generated text. @param tau The target cross-entropy (or surprise) value you want to achieve for the generated text. A higher value corresponds to more surprising or less predictable text, while a lower value corresponds to less surprising or more predictable text. @param eta The learning rate used to update mu based on the error between the target and observed surprisal of the sampled word. A larger learning rate will cause mu to be updated more quickly, while a smaller learning rate will result in slower updates. @param m The number of tokens considered in the estimation of s_hat. This is an arbitrary value that is used to calculate s_hat, which in turn helps to calculate the value of k. In the paper, they use m = 100, but you can experiment with different values to see how it affects the performance of the algorithm. @param mu Maximum cross-entropy. This value is initialized to be twice the target cross-entropy (2 * tau) and is updated in the algorithm based on the error between the target and observed surprisal.
llama_sample_token_mirostat_v2
@details Mirostat 2.0 algorithm described in the paper https://arxiv.org/abs/2007.14966. Uses tokens instead of words. @param candidates A vector of llama_token_data containing the candidate tokens, their probabilities (p), and log-odds (logit) for the current position in the generated text. @param tau The target cross-entropy (or surprise) value you want to achieve for the generated text. A higher value corresponds to more surprising or less predictable text, while a lower value corresponds to less surprising or more predictable text. @param eta The learning rate used to update mu based on the error between the target and observed surprisal of the sampled word. A larger learning rate will cause mu to be updated more quickly, while a smaller learning rate will result in slower updates. @param mu Maximum cross-entropy. This value is initialized to be twice the target cross-entropy (2 * tau) and is updated in the algorithm based on the error between the target and observed surprisal.
llama_sample_top_k
@details Top-K sampling described in academic paper “The Curious Case of Neural Text Degeneration” https://arxiv.org/abs/1904.09751
llama_sample_top_p
@details Nucleus sampling described in academic paper “The Curious Case of Neural Text Degeneration” https://arxiv.org/abs/1904.09751
llama_sample_typical
@details Locally Typical Sampling implementation described in the paper https://arxiv.org/abs/2202.00666.
llama_save_session_file
llama_set_rng_seed
llama_set_state_data
llama_token_bos
llama_token_eos
llama_token_nl
llama_token_to_str
llama_tokenize

Type Aliases§

int_fast8_t
int_fast16_t
int_fast32_t
int_fast64_t
int_least8_t
int_least16_t
int_least32_t
int_least64_t
intmax_t
llama_ftype
llama_progress_callback
llama_token
max_align_t
std_nullptr_t
uint_fast8_t
uint_fast16_t
uint_fast32_t
uint_fast64_t
uint_least8_t
uint_least16_t
uint_least32_t
uint_least64_t
uintmax_t