by sj4nz · 3y ago · 0 comments
See also http://people.eecs.berkeley.edu/~wkahan/UnumSORN.pdf and https://www.youtube.com/watch?v=LZAeZBVAzVw
Near 1.0 they look like a normal float. Maybe they have an extra bit or two of precision. Then as you get closer to 0 or infinity, every time the exponent field would run out you instead reset it, at the cost of one bit of precision.
The main benefit is that they have a lot more dynamic range than an equivalent float. The downside is the further you go into that range, the less accurate your numbers are.
They can also trade off accuracy near 1 for accuracy far from 1. Different exponent widths represent different points on this scale.
At smaller bit sizes, they have a good mix of preserving precision while being quite hard to overflow.
Overall they're not very different from standard floating point. Most of the bold claims from Gustafson are outside the scope of the posit itself.
-
Naively I would expect them to be kind of useful, if we ignore the issue of hardware support. Do neural networks need to represent extreme values with just as much precision as non-extreme values? And is the risk of overflow mitigated sufficiently at the same time? If so, yeah, the whole idea is useless.
I don't know what the hardware costs of posits look like, since I'm not a hardware engineer, so I can't comment on that. For larger sizes, posits seem to be inferior to IEEE 754 floating-point. For smaller sizes (say 16-bit and smaller), posits may work better, as the limited size means that IEEE 754's scale invariant nature [1] isn't as relevant, and packing more distinct numbers into the same bitwidth is more valuable [2].
[1] Put simply, in a IEEE 754 number, it doesn't matter if you measure your distance in nanometers, meters, or light-years--you'll get the same relative error either way. This is emphatically not the case in posits, where your relative error depends on the scale of the numbers.
[2] Posits combine ±infinity and NaN into a single value, and also does away with -0.0. From a numerical perspective, this is actually pretty cringe--there's a useful distinction there (and Kahan's talk gives some examples here)--but by the time you're at small bitwidths, you're likely limiting yourself to situations where the utility of these special values are questionable.
That seems fixable. Don't people make chips that do what you want a lot of? A chip with an array of 8-bit posit PUs could process a hell of a lot in parallel, subject only to getting the arguments and results to useful places.