build_projection

Function build_projection 

Source
pub fn build_projection(shape: PredictorShape, seed: u64) -> Vec<bf16>
Expand description

Random Gaussian projection matrix P of shape [head_dim, r], BF16, in row-major layout. Variance 1/head_dim so that ⟨k, p⟩ has unit variance for unit-norm k. Standard JL setting (KVSwap §2.2).