pub struct AttentionConfig {
pub attention_bias: bool,
pub sliding_window: Option<usize>,
}Expand description
Attention configuration for model architecture
Fields§
§attention_bias: boolWhether attention uses bias
sliding_window: Option<usize>Sliding window size (None for full attention)
Trait Implementations§
Source§impl Clone for AttentionConfig
impl Clone for AttentionConfig
Source§fn clone(&self) -> AttentionConfig
fn clone(&self) -> AttentionConfig
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 moreSource§impl Debug for AttentionConfig
impl Debug for AttentionConfig
Source§impl Default for AttentionConfig
impl Default for AttentionConfig
Source§impl<'de> Deserialize<'de> for AttentionConfig
impl<'de> Deserialize<'de> for AttentionConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AttentionConfig
impl RefUnwindSafe for AttentionConfig
impl Send for AttentionConfig
impl Sync for AttentionConfig
impl Unpin for AttentionConfig
impl UnsafeUnpin for AttentionConfig
impl UnwindSafe for AttentionConfig
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