246 points peter_d_sherman 2 days ago 61 comments
larpingscholar 2 days ago | parent
XorNot 2 days ago | parent
Dylan16807 2 days ago | parent
cyanydeez 2 days ago | parent
If they can deploy aoftware and models, these benefits go into hardware selection.
Dylan16807 2 days ago | parent
But I'm saying the native performance number is too low to care about, so the 83x ratio isn't meaningful. It's an important number divided by an unimportant number. If native was a little better and the ratio was 50x, or native was even worse and the ratio was 600x, that change in ratio would basically not matter.
adrian_b 2 days ago | parent
The last consumer GPU with similar FP64 performance was AMD Radeon VII from 2019 (1:4 ratio).
Nonetheless, Intel makes only small discrete GPUs. They have outstanding performance per dollar, but moderate absolute performance.
I have an Intel Arc B580 in a computer with AMD Ryzen 9 9900X (i.e. 12-core Zen 5).
In this configuration, the GPU and the CPU have a very similar FP64 throughput, which is less than that of a 16-core 9950X (but because adding the GPU doubles the throughput, the aggregate throughput is 50% over a 9950X).
Adding the Intel GPU was worthwhile, because it doubled the throughput for a very low additional price, much less than with a second computer.
Unlike Intel Battlemage, most other recent GPUs, except the AMD Instinct datacenter GPUs, have a 1:64 FP64:FP32 throughput ratio, which is trivially beaten by any software FP64 implementation.
moab 2 days ago | parent
hodgehog11 2 days ago | parent
fsh 2 days ago | parent
dist-epoch 2 days ago | parent
chasil 2 days ago | parent
froh 2 days ago | parent
they happened to use gnu MP, yes, but for cobol, dynamic arbitrary float precision or "never overflow" ints are not the point.
rcxdude 2 days ago | parent
ssivark 2 days ago | parent
fsh 2 days ago | parent
adrian_b 2 days ago | parent
Not only the precision must be around that of FP64, but also the exponent range must be wide enough to make unlikely overflows and underflows, which is a condition not satisfied by FP32.
Sometimes it is possible to use mixed precision, i.e. to do some computations with FP64 and others with FP32, but the right combination varies from a problem to another and a lot of work is necessary to determine an optimum distribution of the computations over the different precisions. It is much easier to use FP64 everywhere.
In electronics, where one frequently has to solve systems of the so-called "stiff" ordinary differential equations (e.g. in SPICE analyses), using numbers with insufficient precision frequently either prevents convergence or leads to "hallucinated" incorrect solutions.
The idea frequently pushed by those who try to support NVIDIA and its followers, that one should find an approximate solution in FP32, which should do most of the work, and then the accuracy of that solution should be improved with FP64 with a little additional work, frequently fails for electronics problems and other stiff problems, because the low-precision computations may converge to a different solution, whose improvement does not lead to the correct solution obtained with high-precision computations.
scotty79 2 days ago | parent
That question is going to be increasingly relevant. And some will be intentionally written not for humans.
I often just pass the paper to agent and ask it to make me what the paper describes.
nukanse 2 days ago | parent
Why would multiplication and addition be the only needed math, and not xor gates.
Ai should be used to find that set of functions.
advael 2 days ago | parent
gmueckl 2 days ago | parent
advael 1 day ago | parent
wodenokoto 2 days ago | parent
My first home assignment after being introduced to NN was to draw an XOR gate on paper using neurons.
How to do it, is left as an exercise to the reader.
comradesmith 2 days ago | parent
nextaccountic 2 days ago | parent
Zanfa 2 days ago | parent
I believe binary networks use quantization-aware training for exactly that reason as well.
sigmoid10 2 days ago | parent
adrian_b 2 days ago | parent
Addition modulo 2 is special, because it is identical with subtraction modulo 2. This means that computer "XOR" has 2 possible interpretations, as addition modulo 2 and as subtraction modulo 2.
Because addition modulo 2 is special, some of the algorithms that work with additions in bigger fields also work modulo 2, but other algorithms are no longer applicable.
saagarjha 2 days ago | parent
dnhkng 2 days ago | parent
https://dnhkng.github.io/posts/m4-tinystories/
https://dnhkng.github.io/posts/isa-net-compression/
I think they may have popped up on HN already.
hodgehog11 2 days ago | parent
The entire ML literature for the last 30 years has been playing genetic optimisation on model designs and architectures. We are reaching the exploitation phase because it is becoming clear that exploration is giving diminishing returns.
CuriouslyC 1 day ago | parent
cubefox 2 days ago | parent
https://proceedings.neurips.cc/paper_files/paper/2024/hash/7...
It uses XNOR (IFF, the opposite of XOR) as the activation function. This allows for a binary neural network that is trained directly in binary, not quantized later.
There is also a bunch of other papers that forego neural networks altogether and instead use something called "logic gate networks". Instead of neurons, they use logic gates. They don't have weights and use random connections instead. The learning consists in deciding which logic gate to use at each node ("neuron") in the network. They use conventional differentiation though, by "relaxing" the binary Boolean functions into continuous functions between 0 and 1, and then converting them to binary after training. I wonder whether the binary training approach from the paper above could be used for much faster training of these "logic gate networks". Currently they have extremely fast inference but slow training.
jrmg 2 days ago | parent
nukanse 1 day ago | parent
cubefox 2 days ago | parent
adrian_b 2 days ago | parent
Within a given budget and if you are not a big company that can buy server CPUs and datacenter GPUs at prices much lower than their list prices, the most financially-efficient way to simulate nuclear weapons or any other complex system would be to buy a set of desktops with AMD 9950X and also dual-port 25 Gb/s Ethernet NICs for interconnecting them into a ring (1 NIC per PC) or into a mesh (2 NICs per PC).
Those computers could be augmented with Intel Battlemage GPUs, which have the maximum performance per dollar of anything existing on the market.
jacquesm 2 days ago | parent
adrian_b 2 days ago | parent
dopa42365 1 day ago | parent
Like, one RTX 4090 outperforms the ASCI Red from 1997 ("First to TFLOPS").
And weapon design itself peaked decades beforehand (some time in the 60s/70s, using a trillionth? of modern compute).
Whatever the computing part of nuclear stewardship looked like at the end of the cold war, you can easily replicate that at home already.
Routine8502 1 day ago | parent
saretup 2 days ago | parent
saagarjha 2 days ago | parent
lucamark 2 days ago | parent
So, they formulated a combinatorial optimization method to unify tricks that break down a single, high-precision FP64 matrix multiplication into many small, low-precision ones using modular arithmetic (the Chinese Remainder Theorem) and then reassemble the exact result.
Conclusion: 83× speedup over native FP64 on an NVIDIA B300 GPU
otherjason 1 day ago | parent
adrian_b 2 days ago | parent
Simple implementations of the FP64 operations with FP32 will result in a speed of up to 4 times greater than that of the hardware, for correct implementations that also implement the FP64 exponent range and the behaviors for special FP values.
By using the GPU "tensor" units, higher speedups should be achievable, like claimed in this paper.
Nonetheless, the 83x speedup from the paper is most likely bogus and not reachable in most applications. The real speedup might be 2 or 3 times less than that.
After a quick skimming through the paper, I could not find any mention about how they handle exponents and floating-point exceptions.
If they do not implement the standard FP64 exponent range, underflows and overflows would be extremely frequent. Depending on how they handle exceptions, this would either produce incorrect results or slow down the computation dramatically.
jacquesm 2 days ago | parent
adrian_b 2 days ago | parent
This would achieve maximum computational efficiency, but the higher level layers of the software would have to be modified from problem to problem.
Nonetheless, it might be possible for such a rewriting of the higher level layers to become simpler than in the past, when using an LLM assistant.
Lockal 1 day ago | parent
Edit: apparently paper is exactly about this (I started reading it after comments...)
MWil 2 days ago | parent
So would it make more sense for me to target the paper's FP4/FP6/FP8 (maybe even the NVIDIA specific implementations) or would it make more sense for me to optimize the INT8 performance? I'm not sure the extra memory traffic wouldnt just offset non-INT8.
api 1 day ago | parent
There's some interesting Chinese accelerator chips bubbling up that are all int8 or just int8 and fp16 and nothing else.
simoiacos 1 day ago | parent
The hardware is quite capable but I think there is still a lot of room for architecture specific optimizations.
api 1 day ago | parent
I have an Intel Nuc with a nice card built in and run local models with it as a home LLM server. Played with training baby ones too.
Intel has great price performance already but still trails a bit on power and raw performance. Of course they are likely pricing aggressively.
Also decent gaming GPUs from what I hear.
Apple is another one, almost forgot, but more for just the good LLM on a laptop niche if you have the cash for one of their beefcake Pros.
frumiousirc 2 days ago | parent
harrykris 1 day ago | parent