Struct llama_core::Metadata
source · pub struct Metadata {Show 25 fields
pub model_name: String,
pub model_alias: String,
pub log_prompts: bool,
pub prompt_template: PromptTemplateType,
pub log_enable: bool,
pub debug_log: bool,
pub embeddings: bool,
pub n_predict: u64,
pub reverse_prompt: Option<String>,
pub mmproj: Option<String>,
pub image: Option<String>,
pub n_gpu_layers: u64,
pub main_gpu: Option<u64>,
pub tensor_split: Option<String>,
pub use_mmap: Option<bool>,
pub ctx_size: u64,
pub batch_size: u64,
pub threads: u64,
pub temperature: f64,
pub top_p: f64,
pub repeat_penalty: f64,
pub presence_penalty: f64,
pub frequency_penalty: f64,
pub grammar: String,
pub json_schema: Option<String>,
}
Expand description
Model metadata
Fields§
§model_name: String
§model_alias: String
§log_prompts: bool
§prompt_template: PromptTemplateType
§log_enable: bool
§debug_log: bool
§embeddings: bool
§n_predict: u64
§reverse_prompt: Option<String>
§mmproj: Option<String>
path to the multimodal projector file for llava
image: Option<String>
Path to the image file for llava
n_gpu_layers: u64
§main_gpu: Option<u64>
The main GPU to use. Defaults to None.
tensor_split: Option<String>
How split tensors should be distributed accross GPUs. If None the model is not split; otherwise, a comma-separated list of non-negative values, e.g., “3,2” presents 60% of the data to GPU 0 and 40% to GPU 1.
use_mmap: Option<bool>
§ctx_size: u64
§batch_size: u64
§threads: u64
§temperature: f64
§top_p: f64
§repeat_penalty: f64
§presence_penalty: f64
§frequency_penalty: f64
§grammar: String
BNF-like grammar to constrain generations (see samples in grammars/ dir). Defaults to empty string.
json_schema: Option<String>
JSON schema to constrain generations (https://json-schema.org/), e.g. {}
for any JSON object. For schemas w/ external $refs, use –grammar + example/json_schema_to_grammar.py instead.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Metadata
impl<'de> Deserialize<'de> for Metadata
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Metadata
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnwindSafe for Metadata
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.