Skip to main content

SpecSource

Trait SpecSource 

Source
pub trait SpecSource {
    // Required methods
    fn arch(&self) -> &str;
    fn arch_meta(&self, suffix: &str) -> Option<&MetaValue>;
    fn dims(&self, name: &str) -> Option<&[u64]>;
    fn tensor_names(&self) -> Vec<&str>;

    // Provided method
    fn has(&self, name: &str) -> bool { ... }
}
Expand description

What a checkpoint’s architecture is read from: its architecture’s name, its keys and its tensor directory — a GGUF checkpoint, or anything describing one.

Required Methods§

Source

fn arch(&self) -> &str

general.architecture.

Source

fn arch_meta(&self, suffix: &str) -> Option<&MetaValue>

The architecture key {arch}.{suffix}.

Source

fn dims(&self, name: &str) -> Option<&[u64]>

A tensor’s dims, dims[0] the fastest-varying.

Source

fn tensor_names(&self) -> Vec<&str>

Every tensor’s name, in the directory’s order.

Provided Methods§

Source

fn has(&self, name: &str) -> bool

Implementors§