pub enum GraphFfn<'a> {
Dense {
gate: GraphW<'a>,
up: GraphW<'a>,
down: GraphW<'a>,
},
Moe {
router: GraphW<'a>,
shared_gate: GraphW<'a>,
experts: Vec<(usize, usize, usize)>,
n_exp: usize,
top_k: usize,
inter: usize,
norm_topk: bool,
},
}Expand description
The FFN of one graph layer: a dense SwiGLU trio, or a routed MoE — router + top-k selection + all selected experts run ON DEVICE (the routing decision depends on the resident hidden state, so a CPU round-trip per layer would forfeit the one-submit design).
Variants§
Dense
Moe
Auto Trait Implementations§
impl<'a> Freeze for GraphFfn<'a>
impl<'a> RefUnwindSafe for GraphFfn<'a>
impl<'a> Send for GraphFfn<'a>
impl<'a> Sync for GraphFfn<'a>
impl<'a> Unpin for GraphFfn<'a>
impl<'a> UnsafeUnpin for GraphFfn<'a>
impl<'a> UnwindSafe for GraphFfn<'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