Skip to main content

SOFTMAX_MACS_PER_SCORE

Constant SOFTMAX_MACS_PER_SCORE 

Source
pub const SOFTMAX_MACS_PER_SCORE: f64 = 7.5;
Expand description

Vector multiply-add slots per score a softmax takes: the engine’s exponential is twelve f32 operations (decode_engine::numerics::exp: the scaling and its rounding, two for the range reduction, six for the cubic, one for the table product, one for the power of two), and the running maximum, the sum and the rescale three more; fifteen operations, two to a slot.