pub enum MoeRoutingStrategy {
TopK,
TopP,
ExpertChoice,
Switch,
Soft,
Sinkhorn,
Hash,
Custom,
}Expand description
Gating-network routing strategy for an MoE model.
Variants§
TopK
Classic top-k expert selection (Mixtral, Qwen2-MoE).
TopP
Top-p (nucleus) expert selection — dynamic experts-per-token based on cumulative gate probability.
ExpertChoice
Expert-Choice routing — each expert picks its top-k tokens (Zhou et al., 2022).
Switch
Switch Transformer single-expert routing (top-1).
Soft
Soft routing (all experts weighted, no hard top-k).
Sinkhorn
Sinkhorn / BASE-layer balanced assignment.
Hash
Hash-based fixed routing (no learned gate).
Custom
Custom / proprietary routing.
Trait Implementations§
Source§impl Clone for MoeRoutingStrategy
impl Clone for MoeRoutingStrategy
Source§fn clone(&self) -> MoeRoutingStrategy
fn clone(&self) -> MoeRoutingStrategy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MoeRoutingStrategy
Source§impl Debug for MoeRoutingStrategy
impl Debug for MoeRoutingStrategy
Source§impl<'de> Deserialize<'de> for MoeRoutingStrategy
impl<'de> Deserialize<'de> for MoeRoutingStrategy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for MoeRoutingStrategy
Source§impl Hash for MoeRoutingStrategy
impl Hash for MoeRoutingStrategy
Source§impl PartialEq for MoeRoutingStrategy
impl PartialEq for MoeRoutingStrategy
Source§fn eq(&self, other: &MoeRoutingStrategy) -> bool
fn eq(&self, other: &MoeRoutingStrategy) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for MoeRoutingStrategy
impl Serialize for MoeRoutingStrategy
impl StructuralPartialEq for MoeRoutingStrategy
Auto Trait Implementations§
impl Freeze for MoeRoutingStrategy
impl RefUnwindSafe for MoeRoutingStrategy
impl Send for MoeRoutingStrategy
impl Sync for MoeRoutingStrategy
impl Unpin for MoeRoutingStrategy
impl UnsafeUnpin for MoeRoutingStrategy
impl UnwindSafe for MoeRoutingStrategy
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