pub enum TensorParallelLayer {
RowParallelLinear {
input_size: usize,
output_size: usize,
bias: bool,
input_is_parallel: bool,
},
ColumnParallelLinear {
input_size: usize,
output_size: usize,
bias: bool,
gather_output: bool,
},
ParallelEmbedding {
num_embeddings: usize,
embedding_dim: usize,
padding_idx: Option<usize>,
},
ParallelAttention {
hidden_size: usize,
num_attention_heads: usize,
dropout_prob: f32,
},
}Expand description
Tensor parallel layer types
Variants§
RowParallelLinear
Row-parallel linear layer
ColumnParallelLinear
Column-parallel linear layer
ParallelEmbedding
Parallel embedding layer
ParallelAttention
Parallel attention layer
Trait Implementations§
Source§impl Clone for TensorParallelLayer
impl Clone for TensorParallelLayer
Source§fn clone(&self) -> TensorParallelLayer
fn clone(&self) -> TensorParallelLayer
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 moreAuto Trait Implementations§
impl Freeze for TensorParallelLayer
impl RefUnwindSafe for TensorParallelLayer
impl Send for TensorParallelLayer
impl Sync for TensorParallelLayer
impl Unpin for TensorParallelLayer
impl UnsafeUnpin for TensorParallelLayer
impl UnwindSafe for TensorParallelLayer
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more