pub struct MoEConfig {
pub dim: u32,
pub num_experts: u32,
pub top_k: u32,
pub expert_capacity: Option<f64>,
}Expand description
MoE attention configuration
Fields§
§dim: u32§num_experts: u32§top_k: u32§expert_capacity: Option<f64>Trait Implementations§
Source§impl FromNapiValue for MoEConfig
impl FromNapiValue for MoEConfig
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl ToNapiValue for MoEConfig
impl ToNapiValue for MoEConfig
Source§unsafe fn to_napi_value(env: napi_env, val: MoEConfig) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, val: MoEConfig) -> Result<napi_value>
Safety Read more
Source§impl ValidateNapiValue for MoEConfig
impl ValidateNapiValue for MoEConfig
Source§unsafe fn validate(
env: *mut napi_env__,
napi_val: *mut napi_value__,
) -> Result<*mut napi_value__, Error>
unsafe fn validate( env: *mut napi_env__, napi_val: *mut napi_value__, ) -> Result<*mut napi_value__, Error>
Safety Read more
Auto Trait Implementations§
impl Freeze for MoEConfig
impl RefUnwindSafe for MoEConfig
impl Send for MoEConfig
impl Sync for MoEConfig
impl Unpin for MoEConfig
impl UnsafeUnpin for MoEConfig
impl UnwindSafe for MoEConfig
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