logoalt Hacker News

noosphrtoday at 2:38 PM1 replyview on HN

I once replaced IEEE 754 floating point numbers in a model by balanced ternary floating point numbers.

It took me 20 minutes.

Tell me how you'd do that in cpp?


Replies

mathisfun123today at 5:50 PM

lol the same way we implement all of the reduced precision fp8, fp4 types today: by storing them in the corresponding uint:

https://github.com/ggml-org/llama.cpp/discussions/15095

show 1 reply