Skip to main content

ParallelRoutedLayeredArchitecture

Trait ParallelRoutedLayeredArchitecture 

Source
pub trait ParallelRoutedLayeredArchitecture<B, S>: RoutedLayeredArchitecture<B, S> + ParallelLayeredArchitecture<B, S>{
    // Required method
    fn forward_unit_parallel_with_provider<P>(
        &mut self,
        group: usize,
        index: usize,
        unit: &mut Self::Unit,
        hidden: &B::Tensor,
        state: &mut S,
        forward: &mut Self::ForwardContext,
        pass: ExpertPass,
        provider: &mut P,
        parallel: &B::ParallelContext,
        context: &<B::Tensor as Tensor>::Context,
    ) -> Result<B::Tensor, Self::Error>
       where P: TensorParallelRoutedExpertProvider<B>,
             P::Error: Display;
}
Expand description

Tensor-parallel provider-aware unit execution.

Required Methods§

Source

fn forward_unit_parallel_with_provider<P>( &mut self, group: usize, index: usize, unit: &mut Self::Unit, hidden: &B::Tensor, state: &mut S, forward: &mut Self::ForwardContext, pass: ExpertPass, provider: &mut P, parallel: &B::ParallelContext, context: &<B::Tensor as Tensor>::Context, ) -> Result<B::Tensor, Self::Error>

Executes one tensor-parallel unit through a runtime-supplied provider.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§