pub enum ExpertProj {
Gate,
Up,
Down,
}Expand description
Which routed-expert projection a delta targets. Ordered so
BTreeMap<(u16, ExpertProj), _> has a stable, testable key order.
Variants§
Implementations§
Source§impl ExpertProj
impl ExpertProj
Sourcepub fn peft_name(&self) -> &'static str
pub fn peft_name(&self) -> &'static str
PEFT suffix (the leaf .-segment of the on-disk tensor name).
Sourcepub fn dims(&self, cfg: &ModelConfig, layer: usize) -> (usize, usize)
pub fn dims(&self, cfg: &ModelConfig, layer: usize) -> (usize, usize)
(out_dim, in_dim) of the base routed-expert projection on layer.
Uses the PER-LAYER routed intermediate (ModelConfig::moe_intermediate_size_for,
e.g. 512 on Holo-3.1-35B-A3B) — NEVER the dense intermediate_size
(5120), which belongs to the standalone SwiGLU FFN. gate/up map hidden→
inter, down maps inter→hidden.
Trait Implementations§
Source§impl Clone for ExpertProj
impl Clone for ExpertProj
Source§fn clone(&self) -> ExpertProj
fn clone(&self) -> ExpertProj
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 moreSource§impl Debug for ExpertProj
impl Debug for ExpertProj
Source§impl Ord for ExpertProj
impl Ord for ExpertProj
Source§fn cmp(&self, other: &ExpertProj) -> Ordering
fn cmp(&self, other: &ExpertProj) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ExpertProj
impl PartialEq for ExpertProj
Source§impl PartialOrd for ExpertProj
impl PartialOrd for ExpertProj
impl Copy for ExpertProj
impl Eq for ExpertProj
impl StructuralPartialEq for ExpertProj
Auto Trait Implementations§
impl Freeze for ExpertProj
impl RefUnwindSafe for ExpertProj
impl Send for ExpertProj
impl Sync for ExpertProj
impl Unpin for ExpertProj
impl UnwindSafe for ExpertProj
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.