pub struct SparseAttentionConfigBuilder { /* private fields */ }Expand description
Builder for SparseAttentionConfig.
Implementations§
Source§impl SparseAttentionConfigBuilder
impl SparseAttentionConfigBuilder
Sourcepub fn block_size(self, block_size: usize) -> Self
pub fn block_size(self, block_size: usize) -> Self
Sets the block size.
Sourcepub fn num_random_blocks(self, num_random_blocks: usize) -> Self
pub fn num_random_blocks(self, num_random_blocks: usize) -> Self
Sets the number of random blocks.
Sourcepub fn num_global_tokens(self, num_global_tokens: usize) -> Self
pub fn num_global_tokens(self, num_global_tokens: usize) -> Self
Sets the number of global tokens.
Sourcepub fn build(self) -> AttentionResult<SparseAttentionConfig>
pub fn build(self) -> AttentionResult<SparseAttentionConfig>
Builds the SparseAttentionConfig.
Trait Implementations§
Source§impl Default for SparseAttentionConfigBuilder
impl Default for SparseAttentionConfigBuilder
Source§fn default() -> SparseAttentionConfigBuilder
fn default() -> SparseAttentionConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SparseAttentionConfigBuilder
impl RefUnwindSafe for SparseAttentionConfigBuilder
impl Send for SparseAttentionConfigBuilder
impl Sync for SparseAttentionConfigBuilder
impl Unpin for SparseAttentionConfigBuilder
impl UnwindSafe for SparseAttentionConfigBuilder
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