pub struct DecoderConfig {
pub self_attention: AttentionConfig,
pub cross_attention: AttentionConfig,
pub feed_forward: FeedForwardConfig,
pub layer_norm: LayerNormConfig,
pub pre_norm: bool,
}Expand description
Configuration for 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 DecoderConfig
impl DecoderConfig
Trait Implementations§
Source§impl Clone for DecoderConfig
impl Clone for DecoderConfig
Source§fn clone(&self) -> DecoderConfig
fn clone(&self) -> DecoderConfig
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 DecoderConfig
impl RefUnwindSafe for DecoderConfig
impl Send for DecoderConfig
impl Sync for DecoderConfig
impl Unpin for DecoderConfig
impl UnwindSafe for DecoderConfig
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