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: boolWhether 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> 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