pub struct TransformerBlockRecord<B: Backend> {
pub attn: <Attention<B> as Module<B>>::Record,
pub attn_norm: <RmsNorm<B> as Module<B>>::Record,
pub mlp: <Mlp<B> as Module<B>>::Record,
pub mlp_norm: <RmsNorm<B> as Module<B>>::Record,
pub scale_shift_table: <Param<Tensor<B, 2>> as Module<B>>::Record,
}Expand description
The record type for the module.
Fields§
§attn: <Attention<B> as Module<B>>::RecordThe module record associative type.
attn_norm: <RmsNorm<B> as Module<B>>::RecordThe module record associative type.
mlp: <Mlp<B> as Module<B>>::RecordThe module record associative type.
mlp_norm: <RmsNorm<B> as Module<B>>::RecordThe module record associative type.
scale_shift_table: <Param<Tensor<B, 2>> as Module<B>>::RecordThe module record associative type.
Trait Implementations§
Source§impl<B: Backend> Record<B> for TransformerBlockRecord<B>
impl<B: Backend> Record<B> for TransformerBlockRecord<B>
Source§type Item<S: PrecisionSettings> = TransformerBlockRecordItem<B, S>
type Item<S: PrecisionSettings> = TransformerBlockRecordItem<B, S>
Type of the item that can be serialized and deserialized.
Auto Trait Implementations§
impl<B> !Freeze for TransformerBlockRecord<B>
impl<B> !RefUnwindSafe for TransformerBlockRecord<B>
impl<B> !UnwindSafe for TransformerBlockRecord<B>
impl<B> Send for TransformerBlockRecord<B>
impl<B> Sync for TransformerBlockRecord<B>
impl<B> Unpin for TransformerBlockRecord<B>where
<B as BackendTypes>::FloatTensorPrimitive: Unpin,
<B as BackendTypes>::QuantizedTensorPrimitive: Unpin,
<B as BackendTypes>::Device: Unpin,
impl<B> UnsafeUnpin for TransformerBlockRecord<B>where
<B as BackendTypes>::Device: UnsafeUnpin,
<B as BackendTypes>::FloatTensorPrimitive: UnsafeUnpin,
<B as BackendTypes>::QuantizedTensorPrimitive: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
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