Crate llm_chain_llama_sys

Source

Structs§

__fsid_t
llama_context
llama_context_params
llama_token_data
llama_token_data_array
max_align_t

Constants§

INT8_MAX
INT8_MIN
INT8_WIDTH
INT16_MAX
INT16_MIN
INT16_WIDTH
INT32_MAX
INT32_MIN
INT32_WIDTH
INT64_WIDTH
INTMAX_WIDTH
INTPTR_MAX
INTPTR_MIN
INTPTR_WIDTH
INT_FAST8_MAX
INT_FAST8_MIN
INT_FAST8_WIDTH
INT_FAST16_MAX
INT_FAST16_MIN
INT_FAST16_WIDTH
INT_FAST32_MAX
INT_FAST32_MIN
INT_FAST32_WIDTH
INT_FAST64_WIDTH
INT_LEAST8_MAX
INT_LEAST8_MIN
INT_LEAST8_WIDTH
INT_LEAST16_MAX
INT_LEAST16_MIN
INT_LEAST16_WIDTH
INT_LEAST32_MAX
INT_LEAST32_MIN
INT_LEAST32_WIDTH
INT_LEAST64_WIDTH
LLAMA_FILE_VERSION
LLAMA_SESSION_VERSION
PTRDIFF_MAX
PTRDIFF_MIN
PTRDIFF_WIDTH
SIG_ATOMIC_MAX
SIG_ATOMIC_MIN
SIG_ATOMIC_WIDTH
SIZE_MAX
SIZE_WIDTH
UINT8_MAX
UINT8_WIDTH
UINT16_MAX
UINT16_WIDTH
UINT32_MAX
UINT32_WIDTH
UINT64_WIDTH
UINTMAX_WIDTH
UINTPTR_MAX
UINTPTR_WIDTH
UINT_FAST8_MAX
UINT_FAST8_WIDTH
UINT_FAST16_MAX
UINT_FAST16_WIDTH
UINT_FAST32_MAX
UINT_FAST32_WIDTH
UINT_FAST64_WIDTH
UINT_LEAST8_MAX
UINT_LEAST8_WIDTH
UINT_LEAST16_MAX
UINT_LEAST16_WIDTH
UINT_LEAST32_MAX
UINT_LEAST32_WIDTH
UINT_LEAST64_WIDTH
WCHAR_WIDTH
WINT_MAX
WINT_MIN
WINT_WIDTH
_ATFILE_SOURCE
_BITS_STDINT_INTN_H
_BITS_STDINT_UINTN_H
_BITS_TIME64_H
_BITS_TYPESIZES_H
_BITS_TYPES_H
_BITS_WCHAR_H
_DEFAULT_SOURCE
_DYNAMIC_STACK_SIZE_SOURCE
_FEATURES_H
_ISOC2X_SOURCE
_ISOC11_SOURCE
_ISOC95_SOURCE
_ISOC99_SOURCE
_LARGEFILE64_SOURCE
_LARGEFILE_SOURCE
_POSIX_C_SOURCE
_POSIX_SOURCE
_STDC_PREDEF_H
_STDINT_H
_SYS_CDEFS_H
_XOPEN_SOURCE
_XOPEN_SOURCE_EXTENDED
__FD_SETSIZE
__GLIBC_MINOR__
__GLIBC_USE_DEPRECATED_GETS
__GLIBC_USE_DEPRECATED_SCANF
__GLIBC_USE_IEC_60559_BFP_EXT
__GLIBC_USE_IEC_60559_BFP_EXT_C2X
__GLIBC_USE_IEC_60559_EXT
__GLIBC_USE_IEC_60559_FUNCS_EXT
__GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
__GLIBC_USE_IEC_60559_TYPES_EXT
__GLIBC_USE_ISOC2X
__GLIBC_USE_LIB_EXT2
__GLIBC__
__GNU_LIBRARY__
__HAVE_GENERIC_SELECTION
__INO_T_MATCHES_INO64_T
__KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64
__LDOUBLE_REDIRECTS_TO_FLOAT128_ABI
__OFF_T_MATCHES_OFF64_T
__RLIM_T_MATCHES_RLIM64_T
__STATFS_MATCHES_STATFS64
__STDC_IEC_559_COMPLEX__
__STDC_IEC_559__
__STDC_IEC_60559_BFP__
__STDC_IEC_60559_COMPLEX__
__STDC_ISO_10646__
__SYSCALL_WORDSIZE
__TIMESIZE
__USE_ATFILE
__USE_DYNAMIC_STACK_SIZE
__USE_FORTIFY_LEVEL
__USE_GNU
__USE_ISOC11
__USE_ISOC95
__USE_ISOC99
__USE_ISOCXX11
__USE_LARGEFILE
__USE_LARGEFILE64
__USE_MISC
__USE_POSIX
__USE_POSIX2
__USE_POSIX199309
__USE_POSIX199506
__USE_UNIX98
__USE_XOPEN
__USE_XOPEN2K
__USE_XOPEN2K8
__USE_XOPEN2K8XSI
__USE_XOPEN2KXSI
__USE_XOPEN_EXTENDED
__WORDSIZE
__WORDSIZE_TIME64_COMPAT32
__bool_true_false_are_defined
__glibc_c99_flexarr_available
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§

__blkcnt64_t
__blkcnt_t
__blksize_t
__caddr_t
__clock_t
__clockid_t
__daddr_t
__dev_t
__fsblkcnt64_t
__fsblkcnt_t
__fsfilcnt64_t
__fsfilcnt_t
__fsword_t
__gid_t
__id_t
__ino64_t
__ino_t
__int8_t
__int16_t
__int32_t
__int64_t
__int_least8_t
__int_least16_t
__int_least32_t
__int_least64_t
__intmax_t
__intptr_t
__key_t
__loff_t
__mode_t
__nlink_t
__off64_t
__off_t
__pid_t
__quad_t
__rlim64_t
__rlim_t
__sig_atomic_t
__socklen_t
__ssize_t
__suseconds64_t
__suseconds_t
__syscall_slong_t
__syscall_ulong_t
__time_t
__timer_t
__u_char
__u_int
__u_long
__u_quad_t
__u_short
__uid_t
__uint8_t
__uint16_t
__uint32_t
__uint64_t
__uint_least8_t
__uint_least16_t
__uint_least32_t
__uint_least64_t
__uintmax_t
__useconds_t
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
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