pub struct CommonParams {Show 20 fields
pub n_predict: i32,
pub n_ctx: i32,
pub n_batch: i32,
pub n_ubatch: i32,
pub n_keep: i32,
pub n_chunks: i32,
pub n_parallel: i32,
pub n_sequences: i32,
pub grp_attn_n: i32,
pub grp_attn_w: i32,
pub n_print: i32,
pub rope_freq_base: f32,
pub rope_freq_scale: f32,
pub yarn_ext_factor: f32,
pub yarn_attn_factor: f32,
pub yarn_beta_fast: f32,
pub yarn_beta_slow: f32,
pub yarn_orig_ctx: i32,
pub defrag_thold: f32,
pub prompt: String,
}Expand description
Struct containing common parameters for processing.
§See more
https://github.com/ggerganov/llama.cpp/blob/master/common/common.h#L109
Fields§
§n_predict: i32New tokens to predict
n_ctx: i32Context size
n_batch: i32Logical batch size for prompt processing (must be >=32 to use BLAS)
n_ubatch: i32Physical batch size for prompt processing (must be >=32 to use BLAS)
n_keep: i32Number of tokens to keep from initial prompt
n_chunks: i32Max number of chunks to process (-1 = unlimited)
n_parallel: i32Number of parallel sequences to decode
n_sequences: i32Number of sequences to decode
grp_attn_n: i32Group-attention factor
grp_attn_w: i32Group-attention width
n_print: i32Print token count every n tokens (-1 = disabled)
rope_freq_base: f32RoPE base frequency
rope_freq_scale: f32RoPE frequency scaling factor
yarn_ext_factor: f32YaRN extrapolation mix factor
yarn_attn_factor: f32YaRN magnitude scaling factor
yarn_beta_fast: f32YaRN low correction dim
yarn_beta_slow: f32YaRN high correction dim
yarn_orig_ctx: i32YaRN original context length
defrag_thold: f32KV cache defragmentation threshold
prompt: Stringprompt for the model to consume
Trait Implementations§
Source§impl Clone for CommonParams
impl Clone for CommonParams
Source§fn clone(&self) -> CommonParams
fn clone(&self) -> CommonParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more