pub struct DenseFfnWeightsBf16 {
pub gate_proj: DenseWeight,
pub up_proj: DenseWeight,
pub down_proj: DenseWeight,
}Expand description
BF16 dense MLP weights — alternative to NVFP4 for precision-sensitive
models (Gemma-4-31B). Each is [N, K] row-major BF16. When installed
on a DenseFfnLayer via set_bf16_weights, the forward paths
dispatch to dense_gemv_bf16 / dense_gemm_bf16 instead of the
w4a16 NVFP4 kernels. Costs ~3.4 GB extra GPU memory on Gemma-4-31B
(3 × hidden×intermediate × 2 bytes) vs NVFP4’s 0.5 bytes/weight.
Fields§
§gate_proj: DenseWeight§up_proj: DenseWeight§down_proj: DenseWeightAuto Trait Implementations§
impl Freeze for DenseFfnWeightsBf16
impl RefUnwindSafe for DenseFfnWeightsBf16
impl Send for DenseFfnWeightsBf16
impl Sync for DenseFfnWeightsBf16
impl Unpin for DenseFfnWeightsBf16
impl UnwindSafe for DenseFfnWeightsBf16
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