pub struct GgufSource { /* private fields */ }Expand description
A parsed GGUF file.
Implementations§
Source§impl GgufSource
impl GgufSource
Source§impl GgufSource
impl GgufSource
Trait Implementations§
Source§impl ModelSource for GgufSource
impl ModelSource for GgufSource
Source§fn metadata(&self) -> &ModelMetadata
fn metadata(&self) -> &ModelMetadata
Architecture + hyperparameter metadata.
Source§fn tensor_names(&self) -> Vec<String>
fn tensor_names(&self) -> Vec<String>
Names of all tensors available in this source.
Source§fn open_tensor(&self, name: &str) -> Result<TensorReader<'_>>
fn open_tensor(&self, name: &str) -> Result<TensorReader<'_>>
Opens a tensor by name, returning a lazy reader over the raw bytes.
Source§fn tokenizer(&self) -> Result<TokenizerSpec>
fn tokenizer(&self) -> Result<TokenizerSpec>
Tokenizer specification (path to
tokenizer.json + added tokens).Source§fn sampler_defaults(&self) -> Option<SamplerConfig>
fn sampler_defaults(&self) -> Option<SamplerConfig>
Sampler defaults from
generation_config.json, if present.Auto Trait Implementations§
impl Freeze for GgufSource
impl RefUnwindSafe for GgufSource
impl Send for GgufSource
impl Sync for GgufSource
impl Unpin for GgufSource
impl UnsafeUnpin for GgufSource
impl UnwindSafe for GgufSource
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