]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
ggml : rewrite silu and softmax for cpu (llama/7154)
authorJustine Tunney <redacted>
Fri, 17 May 2024 06:58:52 +0000 (02:58 -0400)
committerGeorgi Gerganov <redacted>
Sun, 16 Jun 2024 15:19:48 +0000 (18:19 +0300)
commit574661f2e68074955afb1ed721dc206bc02d968c
tree7d5b73f84e216a6427ebb916fdf9f2a9139d777f
parent7bd69349bf488ece15cafeb70d389b7725d7eff0
ggml : rewrite silu and softmax for cpu (llama/7154)

This change upstreams llamafile's vectorized expf() functions. This lets
us compute softmax and silu more accurately than the short[65536] lookup
table that GGML previously used to make this operation go faster. We can
support aarch64 and sse2+ with the worst case rounding error of 2ulp. It
makes make -j8 tests && ./tests/test-backend-ops -o SOFT_MAX -b CPU perf
go 1.5x faster for SSE2+FMA, 1.9x faster for AVX2+FMA and 2.1x on AVX512
ggml.c