]> git.djapps.eu Git - pkg/ggml/sources/ggml/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>
Tue, 28 May 2024 11:41:08 +0000 (14:41 +0300)
commitfc4748c6b2c4f6d9a98b918b467dba1251d661de
treee35ecbbcba9c7e47af1216bdfa30551333399274
parent6e9d5150624c85a2abe92c4ea681b03389bd6879
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
src/ggml.c