pub struct K3CpuModel {Show 14 fields
pub graph: K3Graph,
pub kda: KdaConfig,
pub mla: MlaConfig,
pub moe: LatentMoeConfig,
pub dense_intermediate: usize,
pub eps: f32,
pub rope_theta: f32,
pub vocab: usize,
pub embed: Vec<f32>,
pub lm_head: Vec<f32>,
pub final_norm: Vec<f32>,
pub output_res_proj: Vec<f32>,
pub output_res_norm: Vec<f32>,
pub layers: Vec<K3CpuLayer>,
}Expand description
CPU twin (or tiny stand-in) ready for greedy decode.
Fields§
§graph: K3Graph§kda: KdaConfig§mla: MlaConfig§moe: LatentMoeConfig§dense_intermediate: usize§eps: f32§rope_theta: f32§vocab: usize§embed: Vec<f32>§lm_head: Vec<f32>§final_norm: Vec<f32>§output_res_proj: Vec<f32>§output_res_norm: Vec<f32>§layers: Vec<K3CpuLayer>Implementations§
Source§impl K3CpuModel
impl K3CpuModel
Sourcepub fn from_pretrained(dir: &Path) -> Result<K3CpuModel, Error>
pub fn from_pretrained(dir: &Path) -> Result<K3CpuModel, Error>
Bind a HuggingFace twin dir (config.json + unpacked .safetensors).
Source§impl K3CpuModel
impl K3CpuModel
Sourcepub fn synthetic_tiny() -> K3CpuModel
pub fn synthetic_tiny() -> K3CpuModel
8-layer twin pattern, tiny dims. Deterministic; no HF weights.
Sourcepub fn synthetic_small() -> K3CpuModel
pub fn synthetic_small() -> K3CpuModel
Same 8-layer twin pattern, slightly wider. Still cheap on CPU.
Sourcepub fn synthetic_prod_width_dummy() -> K3CpuModel
pub fn synthetic_prod_width_dummy() -> K3CpuModel
Production width, dummy depth: hidden=7168, heads=96, 2 layers (KDA + MLA), vocab=256, 8 routed experts. Head/lora dims stay tiny so the CPU test is fast. Not 93 layers / 1.56 TB.
Trait Implementations§
Source§impl Clone for K3CpuModel
impl Clone for K3CpuModel
Source§fn clone(&self) -> K3CpuModel
fn clone(&self) -> K3CpuModel
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for K3CpuModel
impl RefUnwindSafe for K3CpuModel
impl Send for K3CpuModel
impl Sync for K3CpuModel
impl Unpin for K3CpuModel
impl UnwindSafe for K3CpuModel
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