gemma.cpp/ops
Daniel Keysers 03f0ee2323 Add tests for SampleTopK that highlight existing problems and fix those:
- Sampling was not correct for k>1 and temperature=0.
- Sampling was not correct for only negative logits.

Also restructure the code a bit for better readability and add some asserts for things that shouldn't happen.

PiperOrigin-RevId: 676043267
2024-09-18 10:32:01 -07:00
..
dot-inl.h Major compression update, arbitrary-len unpack + new Dot 2024-09-10 02:22:19 -07:00
dot_test.cc Major compression update, arbitrary-len unpack + new Dot 2024-09-10 02:22:19 -07:00
fp_arith-inl.h Refactor/cleanup, remove even_odd 2024-09-04 09:25:13 -07:00
gemma_matvec_test.cc Major compression update, arbitrary-len unpack + new Dot 2024-09-10 02:22:19 -07:00
matmul-inl.h Major compression update, arbitrary-len unpack + new Dot 2024-09-10 02:22:19 -07:00
matmul.h Major MatMul update, 1.9-2.3x speedup on Zen4 via bf16 mul 2024-08-16 07:52:20 -07:00
matmul_test.cc Major compression update, arbitrary-len unpack + new Dot 2024-09-10 02:22:19 -07:00
matvec-inl.h Major compression update, arbitrary-len unpack + new Dot 2024-09-10 02:22:19 -07:00
ops-inl.h Add tests for SampleTopK that highlight existing problems and fix those: 2024-09-18 10:32:01 -07:00
ops_test.cc Add tests for SampleTopK that highlight existing problems and fix those: 2024-09-18 10:32:01 -07:00