thinking & learning

Joined September 2014
1,978 Photos and videos
canada 🇨🇦 should join EU
67
Numan reposted
First you have to understand that modern LLM inference already disaggregates weights as models outgrew single chips years ago. You shard either by layer (pipeline parallelism) or by slicing every layer (tensor parallelism), and the two do very different things. As an example, let’s look at Llama 3.3. It has 70B of weights and at FP8 that’s 70 GB of memory which is enough to fit on a single H100. Now that H100 has 3.35 TB/s of HBM, so the fastest it can ever decode for one user is 70/3.35 ≈ 21 ms/token or ~48 tok/s while using under 1% of its FLOPs. Now if we pipeline it across 8 chips: each chip holds ~8.75 GB, which means it only needs 1/8th the bandwidth and 1/8th the FLOPs to sustain the same aggregate throughput. Now crucially the token/sec a user gets is limited by the amount of data that crosses the link. In current LLMs all that is a small amount of activations for LLama 3.3 it’s ~8 KB per token…. Yes, you read that right it’s 8 KILOBYTES we are sending over a <900 GB/s link. That’s only 9 ns of serialization time but the overhead of 224G PAM4 SerDes adds ~100 ns per link traversal with RS-FEC which is 11x longer than the payload itself. And then you have the NVSwitch adding ~300 ns per hop and you need to pay twice. That’s ~600 ns of just hardware latency wrapped around 9 ns of data making a 98% tax before software even shows up. Then NCCL’s collective stack turns 600 ns into 10-20 us… all to move 8 kilobytes lol. For comparison 8 KB serializes over 10 Gigabit Ethernet NRZ, in just 6.6 us. Pipeline parallelism however doesn’t make a single user faster as the token still needs to visit every layer in the sequence, so per-user speed is still weights / per-chip bandwidth. To get more speed per user token you need to use tensor parallelism and have all the chips work on the same layer simultaneously. TP costs you 2 all reduce OPs per layer, 160 per token on llama 3, that’s still kilobytes of traffic but with NVLink overhead it’s a massive tax and why pipeline parallelism on most models still gives more interactivity per user. However, this gives you a huge latency lever to pull that scales tokens per second with interconnect speed instead of memory BW. The clever amongst you might have also realized that sharding doesn’t just cut memory bandwidth per chip it also cuts FLOPs per chip and is why we have such bad MFU on decode. So once you’ve sized the link for the memory, you need to size the compute for it too. This is called “balancing the pipeline”, and currently no shipping chip does it because they were all designed as standalone monsters. Remember Tokens/sec = ~aggregate memory BW / bytes touched per token. At batch 64 in FP4 you need ~250 FLOPs per byte, and Blackwell ships 1,250. Provisioned 5x more than the narrow pipe of HBM. Nobody saturates shit cause they are all building around HBM. So now it all comes full circle. Parallelism reduces memory bw pressure and thus FLOPs but increases interconnect latency pressure. Despite having HBM and GigaSERDES we aren’t actually doing more work lol. But if you really wanted to balance the pipeline you need to match the memory bandwidth, the flops, and most importantly the interconnect. So what does that look like ? Well if you build around LPDDR’s lower bandwidth, lower your interconnect latency, you actually can beat Nvidia on decode with a fraction of the silicon.
66
62
1,351
393,622
neymar ruined this young talent who could have atleast become a semi pro in usa
Young me, 11 years ago in my Neymar jersey. Sighhhh
1
2
221
consciousness is the random key generator
1
1
7
314
roooooo
5
16
612
we will be the world champions
2
4
118
arithmetic latency. It is short compared to memory latency – only 6 to 24 cycles versus around 400 cycles – and is often deemphasized. Yet, ignoring arithmetic latency may be as detrimental to accuracy as ignoring memory latency. This is due to what is known as Little’s law [Little 1961], which is a simple relation that states that latency multiplied by throughput equals concurrency. Arithmetic latency is short but maximum arithmetic throughput is large, so that arithmetic concurrency can be substantial and as substantial as memory concurrency if both are expressed in similar units. Ignoring small latency thus may imply ignoring substantial concurrency and lead to substantial inaccuracy
1
87
BLAKE3 runs fast on Metal
1
2
327
pros dont believe me but i dont care - see for urself
1
118
Multithreading is a latency hiding technique that is widely used in modern commodity processors such as GPUs. It involves executing many instances of the same or different programs at the same time; the instances are called threads or warps. Multithreading allows better use of the widely replicated and deeply pipelined resources in modern, multi-billion transistor chips. It is typically expected that executing more threads at the same time results in better performance, up to a limit
1
2
139
what occupancy is needed to attain the best possible throughput? How does it depend on the GPU microarchitecture and executed code? How does one estimate execution time given occupancy, code, and any necessary information about the processor? Finally, what are the key differences between modeling multithreaded performance today and 25 years ago?
64
2
425
pain is not a public event. it is not a debt to be distributed, not a spectacle for compassion, not an altar before which others may prove their tenderness. pity multiplies suffering; it does not overcome it. let the weak confess in order to be held. let them turn every wound into a claim upon the world. the higher man does not ask the world to kneel beside his bed. he asks only this: can i still command myself? death may enter the body, but it must not become its master. death may approach, but it must not be allowed to interpret life. one must not live backwards from the grave. to suffer well is not to suffer quietly for the sake of others. it is to transform suffering into will, discipline, power. it is to say: this, too, belongs to me. i do not reject it. i do not worship it. i use it. there is no virtue in being understood. there is no greatness in being pitied. the noble spirit does not make pain smaller by sharing it. he makes himself greater by containing it. and when the end comes, the question is not whether he was loved, mourned, or surrounded. the question is whether he remained capable of saying yes. yes to life. yes to fate. yes even to the suffering that could not break him.
3
2
11
441
rip it
4
351
im seeing btc 36k
6
5
647
$TSLA
Replying to @NumanThabit
if 430 cant hold it may be a nice short to 421-405
1
3
756
target hit tsla 405
1
4
109
gpt 5.6 is sooooo good
4
6
989
wouldnt be surprised if late longs get fked
6
10
711