Re: sizes of floats, was: +-Inf and NaN
Stavros Macrakis <[email protected]> Wed, 28 Feb 2024 14:33:59 -0500
| Newsgroups | gmane.comp.mathematics.maxima.general,gmane.lisp.gcl.devel |
|---|---|
| Message-ID | <CACLVabUsjqioNJGK1fuHQXKCRWBowVcc81mXth7kTzXX6Bk_XQ@mail.gmail.com> |
The application these days that really benefits from smaller floats (float16 or smaller) is ML, both because it saves space and because it speeds up computation. The OpenSearch search engine (which I work on) has many users with millions or even billions of 1000-dimension numeric vectors on which they calculate approximate nearest neighbors <https://aws.amazon.com/blogs/big-data/choose-the-k-nn-algorithm-for-your-billion-scale-use-case-with-opensearch/> (kNN/ANN). Just storing those vectors is expensive, let alone moving them into RAM for calculations, so saving a factor of 2 or 4 is useful. In many applications, 8-bit integers do the trick <https://opensearch.org/blog/byte-quantized-vectors-in-opensearch/>, but minifloats <https://en.wikipedia.org/wiki/Minifloat> could also be useful. But I don't think anyone wants to do small-float ML calculations in Lisp... unless we have a compiler that can take advantage of GPUs or SIMD instructions. For one thing, all the relevant libraries already exist in C++ or Java, using (rather new) SIMD libraries <https://www.baeldung.com/java-vector-api>. On Wed, Feb 28, 2024 at 1:47 PM Robert Dodier <[email protected]> wrote: > On Wed, Feb 28, 2024 at 7:40 AM Camm Maguire <[email protected]> > wrote: > > > Does anyone care about anything other than 4 or 8 byte floats? > > I know I don't, also I've never encountered, in 40+ years of numerical > programming, a problem that really needed bigger or smaller ones. I'm > not claiming those problems don't exist; only that they're uncommon to > the point of invisibility. > > Creating another float type is taking on a pretty big investment in > implementation and testing. (The first person who says "OH IT'S NO BIG > DEAL" is hereby saddled with the responsibility for it.) Frankly I > don't think the investment is worth the very small expected payoff. > > FWIW > > Robert > _______________________________________________ Maxima-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/maxima-discuss