pub struct TfliteSource { /* private fields */ }Expand description
A TFLite model file as a ModelSource (Gemma-family exports).
Implementations§
Trait Implementations§
Source§impl ModelSource for TfliteSource
impl ModelSource for TfliteSource
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.Source§fn open_tensor_quant(&self, _name: &str) -> Result<Option<QuantTensor<'_>>>
fn open_tensor_quant(&self, _name: &str) -> Result<Option<QuantTensor<'_>>>
Raw packed quantized bytes for a tensor, when this source stores it
in a quant format that has a device kernel (GGUF Q4_0/Q4_K/Q6_K).
None means “no packed representation” — the caller falls back to
ModelSource::open_tensor, which dequantizes to float. Sources
without packed formats keep this default.Auto Trait Implementations§
impl Freeze for TfliteSource
impl RefUnwindSafe for TfliteSource
impl Send for TfliteSource
impl Sync for TfliteSource
impl Unpin for TfliteSource
impl UnsafeUnpin for TfliteSource
impl UnwindSafe for TfliteSource
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