GgufConfigInputs

Struct GgufConfigInputs 

Source
pub struct GgufConfigInputs<'a> {
    pub meta: &'a dyn GgufMeta,
    pub token_embd_vocab: Option<usize>,
    pub has_output_weight: bool,
}
Expand description

Inputs to config_from_gguf: the metadata accessor plus two facts the builder needs from the tensor section (not the metadata KV block).

Fields§

§meta: &'a dyn GgufMeta§token_embd_vocab: Option<usize>

Rows of token_embd.weight — the authoritative vocab size when the {arch}.vocab_size key is absent. None if the loader could not read the tensor shape before building the config.

§has_output_weight: bool

Whether the file contains an output.weight tensor. Its presence means an untied LM head; its absence means the LM head ties to the input embeddings. GGUF has no explicit tie_word_embeddings key, so this is the only reliable signal.

Auto Trait Implementations§

§

impl<'a> Freeze for GgufConfigInputs<'a>

§

impl<'a> !RefUnwindSafe for GgufConfigInputs<'a>

§

impl<'a> !Send for GgufConfigInputs<'a>

§

impl<'a> !Sync for GgufConfigInputs<'a>

§

impl<'a> Unpin for GgufConfigInputs<'a>

§

impl<'a> !UnwindSafe for GgufConfigInputs<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.