pub struct FlashAttentionConfig {
pub block_size: usize,
pub dimensions: usize,
pub temperature: f32,
}Expand description
Configuration for Flash Attention.
Fields§
§block_size: usizeBlock size for tiled computation (tune to L1 cache). Default 64 works well for typical f32 vectors.
dimensions: usizeEmbedding dimensionality.
temperature: f32Softmax temperature scaling.
Trait Implementations§
Source§impl Clone for FlashAttentionConfig
impl Clone for FlashAttentionConfig
Source§fn clone(&self) -> FlashAttentionConfig
fn clone(&self) -> FlashAttentionConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FlashAttentionConfig
impl Debug for FlashAttentionConfig
Source§impl Default for FlashAttentionConfig
impl Default for FlashAttentionConfig
Source§impl<'de> Deserialize<'de> for FlashAttentionConfig
impl<'de> Deserialize<'de> for FlashAttentionConfig
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 FlashAttentionConfig
impl RefUnwindSafe for FlashAttentionConfig
impl Send for FlashAttentionConfig
impl Sync for FlashAttentionConfig
impl Unpin for FlashAttentionConfig
impl UnsafeUnpin for FlashAttentionConfig
impl UnwindSafe for FlashAttentionConfig
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