pub enum ExpertProj {
Gate,
Up,
Down,
}Expand description
2026-09-25: Which routed-expert projection a delta targets.
Variants§
Implementations§
Source§impl ExpertProj
impl ExpertProj
Sourcepub fn peft_name(&self) -> &'static str
pub fn peft_name(&self) -> &'static str
2026-09-25: The projection’s name in a PEFT tensor key.
Sourcepub fn dims(&self, cfg: &ModelConfig, layer: usize) -> (usize, usize)
pub fn dims(&self, cfg: &ModelConfig, layer: usize) -> (usize, usize)
2026-09-25: (out_dim, in_dim) of the routed-expert projection on
layer. The width is ModelConfig::moe_intermediate_size_for, not
the dense intermediate_size.
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
Checks if this value is equivalent to the given key. Read more
§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.