pub struct ModelParallelContract {Show 16 fields
pub family: &'static str,
pub variant: String,
pub trunk_layers: usize,
pub mtp_layers: usize,
pub hidden_size: usize,
pub vocab_size: usize,
pub dense_ffn_size: usize,
pub dense_prefix_layers: usize,
pub head_dim: usize,
pub query_heads: Vec<usize>,
pub kv_heads: Vec<usize>,
pub expert_count: usize,
pub experts_per_token: usize,
pub expert_ffn_size: usize,
pub shared_expert_ffn_size: usize,
pub hardware_targets: Vec<HardwareTarget>,
}Fields§
§family: &'static str§variant: String§trunk_layers: usize§mtp_layers: usize§vocab_size: usize§dense_ffn_size: usize§dense_prefix_layers: usize§head_dim: usize§query_heads: Vec<usize>§kv_heads: Vec<usize>§expert_count: usize§experts_per_token: usize§expert_ffn_size: usize§hardware_targets: Vec<HardwareTarget>Implementations§
Source§impl ModelParallelContract
impl ModelParallelContract
Sourcepub fn from_model(cfg: &ModelConfig) -> Result<Self, TopologyError>
pub fn from_model(cfg: &ModelConfig) -> Result<Self, TopologyError>
Build the model-specific contract. Unregistered families refuse rather than inheriting a generic transformer assumption.
pub fn plan( &self, request: TopologyRequest, ) -> Result<ParallelPlan, TopologyError>
Trait Implementations§
Source§impl Clone for ModelParallelContract
impl Clone for ModelParallelContract
Source§fn clone(&self) -> ModelParallelContract
fn clone(&self) -> ModelParallelContract
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 moreSource§impl Debug for ModelParallelContract
impl Debug for ModelParallelContract
impl Eq for ModelParallelContract
Source§impl PartialEq for ModelParallelContract
impl PartialEq for ModelParallelContract
impl StructuralPartialEq for ModelParallelContract
Auto Trait Implementations§
impl Freeze for ModelParallelContract
impl RefUnwindSafe for ModelParallelContract
impl Send for ModelParallelContract
impl Sync for ModelParallelContract
impl Unpin for ModelParallelContract
impl UnsafeUnpin for ModelParallelContract
impl UnwindSafe for ModelParallelContract
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