Hacker News new | past | comments | ask | show | jobs | submit
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?

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

loading story #48348025