Skip to main content

EmbryoGraphModel

Struct EmbryoGraphModel 

Source
pub struct EmbryoGraphModel {
Show 38 fields pub id: u64, pub hidden: usize, pub intermediate: usize, pub vocab: usize, pub layers: usize, pub phase_heads: usize, pub nphase: usize, pub phase_dv: usize, pub anchor_q_heads: usize, pub anchor_kv_heads: usize, pub anchor_head_dim: usize, pub rotary_dim: usize, pub max_seq: usize, pub cluster_count: usize, pub cluster_size: usize, pub phase_state_len: usize, pub state_stride: usize, pub kv_stride: usize, pub norm_gemma: bool, pub phase_mass: f32, pub weights: Vec<f32>, pub meta: Vec<u32>, pub lm_head: Vec<f32>, pub clusters: Vec<f32>, pub final_norm: Vec<f32>, pub inv_freq: Vec<f32>, pub bounded: bool, pub kv_layers: usize, pub state_layers: usize, pub anchor_window: usize, pub anchor_sink: usize, pub phase_layers: usize, pub gdn_layers: usize, pub gdn_heads: usize, pub gdn_k_heads: usize, pub gdn_dk: usize, pub gdn_dv: usize, pub gdn_kk: usize,
}
Expand description

Packed, f32-only Embryo model consumed by the resident Vulkan graph.

This is deliberately a separate representation from CmfModel: the Embryo graph owns one contiguous device copy and never dereferences the mmap or asks the ordinary per-op residency path for a tensor. meta contains byte-free element offsets into weights; UINT_MAX marks an absent optional matrix. The builder lives in pipeline.rs, where the architecture-specific weight types are visible.

Fields§

§id: u64§hidden: usize§intermediate: usize§vocab: usize§layers: usize§phase_heads: usize§nphase: usize§phase_dv: usize§anchor_q_heads: usize§anchor_kv_heads: usize§anchor_head_dim: usize§rotary_dim: usize§max_seq: usize§cluster_count: usize§cluster_size: usize§phase_state_len: usize§state_stride: usize§kv_stride: usize§norm_gemma: bool§phase_mass: f32§weights: Vec<f32>§meta: Vec<u32>§lm_head: Vec<f32>§clusters: Vec<f32>§final_norm: Vec<f32>§inv_freq: Vec<f32>§bounded: bool

Natively bounded anchors (swa_sink_v1): every anchor layer owns a ring of anchor_window raw keys/values instead of a max_seq KV plane, so kv_stride is the ring size, kv_layers counts the anchors, and no position cap applies (the operator has none).

§kv_layers: usize

Layers that own a KV/ring slot of kv_stride f32 (all layers for the legacy full anchor — offsets are layer·kv_stride — or the bounded anchors only).

§state_layers: usize

Recurrent (phase or GDN) layers — the state buffer holds one state_stride per such layer; anchors own none.

§anchor_window: usize§anchor_sink: usize§phase_layers: usize

vmf_phase mixer layers (kind 0/1) in the stack.

§gdn_layers: usize

GatedDeltaNet mixer layers (kind 4) in the stack; their geometry is gdn_heads (nv), gdn_k_heads (nk), gdn_dk, gdn_dv, gdn_kk (conv taps) — header words 24..29 of meta.

§gdn_heads: usize§gdn_k_heads: usize§gdn_dk: usize§gdn_dv: usize§gdn_kk: usize

Implementations§

Source§

impl EmbryoGraphModel

Source

pub fn gdn_c_dim(&self) -> usize

Fused q/k/v projection width of the GDN mixer (2·nk·dk + nv·dv).

Auto Trait Implementations§

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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 = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more