pub struct DecoderLayerConfig {
pub self_attention: AttentionConfig,
pub cross_attention: AttentionConfig,
pub feed_forward: FeedForwardConfig,
pub layer_norm: LayerNormConfig,
pub pre_norm: bool,
}Expand description
Configuration for a complete transformer decoder layer
Fields§
§self_attention: AttentionConfigSelf-attention configuration (with causal masking)
cross_attention: AttentionConfigCross-attention configuration
feed_forward: FeedForwardConfigFeed-forward configuration
layer_norm: LayerNormConfigLayer normalization configuration
pre_norm: boolWhether to use pre-layer normalization
Implementations§
Source§impl DecoderLayerConfig
impl DecoderLayerConfig
Trait Implementations§
Source§impl Clone for DecoderLayerConfig
impl Clone for DecoderLayerConfig
Source§fn clone(&self) -> DecoderLayerConfig
fn clone(&self) -> DecoderLayerConfig
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 DecoderLayerConfig
impl RefUnwindSafe for DecoderLayerConfig
impl Send for DecoderLayerConfig
impl Sync for DecoderLayerConfig
impl Unpin for DecoderLayerConfig
impl UnwindSafe for DecoderLayerConfig
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