pub struct MtmdContextParams {
pub use_gpu: bool,
pub print_timings: bool,
pub n_threads: i32,
pub media_marker: CString,
}Expand description
Configuration parameters for MTMD context
§Examples
use llama_cpp_bindings::mtmd::{MtmdContextParams, mtmd_default_marker};
use std::ffi::CString;
let params = MtmdContextParams {
use_gpu: false,
print_timings: true,
n_threads: 4,
media_marker: CString::new(mtmd_default_marker()).unwrap(),
};Fields§
§use_gpu: boolWhether to use GPU acceleration
print_timings: boolWhether to print timing information
n_threads: i32Number of threads to use for processing
media_marker: CStringMedia marker string used to identify media positions in text
Trait Implementations§
Source§impl Clone for MtmdContextParams
impl Clone for MtmdContextParams
Source§fn clone(&self) -> MtmdContextParams
fn clone(&self) -> MtmdContextParams
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MtmdContextParams
impl Debug for MtmdContextParams
Source§impl Default for MtmdContextParams
impl Default for MtmdContextParams
Source§impl From<&MtmdContextParams> for mtmd_context_params
impl From<&MtmdContextParams> for mtmd_context_params
Source§fn from(params: &MtmdContextParams) -> Self
fn from(params: &MtmdContextParams) -> Self
Converts to this type from the input type.
Source§impl From<mtmd_context_params> for MtmdContextParams
impl From<mtmd_context_params> for MtmdContextParams
Source§fn from(params: mtmd_context_params) -> Self
fn from(params: mtmd_context_params) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for MtmdContextParams
impl RefUnwindSafe for MtmdContextParams
impl Send for MtmdContextParams
impl Sync for MtmdContextParams
impl Unpin for MtmdContextParams
impl UnsafeUnpin for MtmdContextParams
impl UnwindSafe for MtmdContextParams
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§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 more