pub struct TqHbOracleParams {
pub num_heads: u32,
pub num_kv_heads: u32,
pub head_dim: u32,
pub kv_seq_len: u32,
pub kv_capacity: u32,
pub scale: f32,
pub mask_type: u32,
pub sliding_window: u32,
pub softcap: f32,
pub ring_start: u32,
pub scale_factor_d512: f32,
pub codebook_bits: u32,
}Expand description
Parameters for the HB TQ flash attention decode oracle.
Field-for-field mirror of crate::ops::flash_attn_vec_tq_hb::FlashAttnVecTqHbParams
— kept independent so the oracle has zero dependency on Metal types.
Fields§
§num_heads: u32§num_kv_heads: u32§head_dim: u32§kv_seq_len: u32§kv_capacity: u32§scale: f32§mask_type: u32§sliding_window: u32§softcap: f32Note: present in kernel params but never read in the kernel body.
Oracle mirrors the kernel by NOT applying softcap. Tracked as F-0
finding: contractual drift vs flash_attn_vec.metal where softcap is
also documented but unimplemented.
ring_start: u32§scale_factor_d512: f32Only used when head_dim == 512. For D=256 set to any value.
codebook_bits: u32Codebook bit-width: 5, 6, or 8.
Trait Implementations§
Source§impl Clone for TqHbOracleParams
impl Clone for TqHbOracleParams
Source§fn clone(&self) -> TqHbOracleParams
fn clone(&self) -> TqHbOracleParams
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 TqHbOracleParams
impl Debug for TqHbOracleParams
impl Copy for TqHbOracleParams
Auto Trait Implementations§
impl Freeze for TqHbOracleParams
impl RefUnwindSafe for TqHbOracleParams
impl Send for TqHbOracleParams
impl Sync for TqHbOracleParams
impl Unpin for TqHbOracleParams
impl UnsafeUnpin for TqHbOracleParams
impl UnwindSafe for TqHbOracleParams
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