pub struct Model {
pub cfg: ModelConfig,
pub embd: EmbedHost,
pub output_norm: GpuTensor,
pub output: GpuTensor,
pub layers: Vec<Layer>,
}Fields§
§cfg: ModelConfig§embd: EmbedHost§output_norm: GpuTensor§output: GpuTensor§layers: Vec<Layer>Implementations§
Source§impl Model
impl Model
Source§impl Model
impl Model
Sourcepub fn load_dense(e: &Engine, g: &GgufFile) -> Result<Self, Box<dyn Error>>
pub fn load_dense(e: &Engine, g: &GgufFile) -> Result<Self, Box<dyn Error>>
Load a dense (vanilla-transformer) model from GGUF. Thin wrapper over
load_dense_from_source. Panics if the arch has SSM/MoE layers.
Sourcepub fn load_dense_from_source(
e: &Engine,
src: &dyn TensorSource,
) -> Result<Self, Box<dyn Error>>
pub fn load_dense_from_source( e: &Engine, src: &dyn TensorSource, ) -> Result<Self, Box<dyn Error>>
Load a dense-attention model from any TensorSource — GGUF or a safetensors HF checkpoint.
The whole loop speaks ggml names; the source maps them. The FFN is dense SwiGLU OR routed MoE
(OLMoE: dense full-attention + MoE FFN). Panics on hybrid (SSM) arches — use the hybrid path.
Auto Trait Implementations§
impl Freeze for Model
impl RefUnwindSafe for Model
impl Send for Model
impl Sync for Model
impl Unpin for Model
impl UnsafeUnpin for Model
impl UnwindSafe for Model
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