pub struct LinearAttentionLayer<'a, Q: QuantWeights> {Show 14 fields
pub input_ln: DevicePtr,
pub a_log: DevicePtr,
pub dt_bias: DevicePtr,
pub conv1d_weight: DevicePtr,
pub in_proj_a: &'a Q,
pub in_proj_b: &'a Q,
pub in_proj_qkv: &'a Q,
pub in_proj_z: &'a Q,
pub norm_weight: DevicePtr,
pub out_proj: &'a Q,
pub post_ln: DevicePtr,
pub gate_proj: &'a Q,
pub up_proj: &'a Q,
pub down_proj: &'a Q,
}Expand description
Linear-attention (GDN) layer weights.
Fields§
§input_ln: DevicePtr§a_log: DevicePtrFP32 [num_state_heads].
dt_bias: DevicePtrBF16 [num_state_heads].
conv1d_weight: DevicePtrBF16 [QKV_TOTAL_LIN, conv_kernel_size, 1].
in_proj_a: &'a Q§in_proj_b: &'a Q§in_proj_qkv: &'a Q§in_proj_z: &'a Q§norm_weight: DevicePtrBF16 [v_head_dim_lin].
out_proj: &'a Q§post_ln: DevicePtr§gate_proj: &'a Q§up_proj: &'a Q§down_proj: &'a QAuto Trait Implementations§
impl<'a, Q> Freeze for LinearAttentionLayer<'a, Q>
impl<'a, Q> RefUnwindSafe for LinearAttentionLayer<'a, Q>where
Q: RefUnwindSafe,
impl<'a, Q> Send for LinearAttentionLayer<'a, Q>
impl<'a, Q> Sync for LinearAttentionLayer<'a, Q>
impl<'a, Q> Unpin for LinearAttentionLayer<'a, Q>
impl<'a, Q> UnwindSafe for LinearAttentionLayer<'a, Q>where
Q: RefUnwindSafe,
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