Live data from Hacker News

Kimi K3 (2.8T) at 1 token/s on a MacBook Pro, streamed from four SSDs

github.com

141–150 of 161 posts

Re: Kimi K3 (2.8T) at 1 token/s on a MacBook Pro, streamed from four SSDs

#141

Even if that's impressive, the README is low SNR slop as usual...

Thank you. Put a five-line TL;DR at the top of the README — what it is, the number, the honest limit, the two findings, credits — with the detail below for anyone who wants it.

What was the decision to leave the LLM to write the detail section rather than author it yourself? There's a growing resentment about asking people to read LLM-produced words, especially if it's a large amount to read. Not sure if you were aware of that or not (I think there's been links to surveys / polls just recently on H.N)

Re: Kimi K3 (2.8T) at 1 token/s on a MacBook Pro, streamed from four SSDs

#142
post #45

I wonder if faster SSDs would help? In particular you can still get used Optane SSDs on eBay, although they’re fairly pricey. (not the bogus m.2 ones that are slower than a halfway decent consumer NVMe)

Most desktops and mini-PCs can read simultaneously from only 2 internal M.2 SSDs, 1 of which is PCIe 5.0 and the other is PCIe 4.0.

They may have more M.2 sockets but usually except for the first all the others share the same PCIe 4.0 path.

Those 2 M.2 SSDs have a theoretical maximum aggregated throughput of 24 GByte/s, but what is achievable in practice is typically only slightly above 20 GB/s.

If you have 1 or 2 USB 4 / Thunderbolt 4 ports, the aggregated throughput can be increased with external SSDs, like in TFA.

With 2 internal SSDs and 2 fast external SSDs, a higher throughput than in TFA is possible.

Re: Kimi K3 (2.8T) at 1 token/s on a MacBook Pro, streamed from four SSDs

#143

Earlier quoted context omitted.

take a look at Cerebras, who are doing wafer-scale compute

I imagine Astra is/will soon will be on Cerebras?

Nope, OpenAI partnered with Broadcom to produce their own chips and the performance/watt looks good

Re: Kimi K3 (2.8T) at 1 token/s on a MacBook Pro, streamed from four SSDs

#144
post #95

Earlier quoted context omitted.

Probably not. Each read here is a whole 17.5 MB expert file, so the time per read is set by the drive's throughput, not its access latency — 17.5 MB at 7 GB/s is ~2.5 ms, which is what we measure at queue depth 1 on the SN8100s. What actually moves the barrier is how fast the slowest of 16 concurrent whole-file reads completes: more drives on direct ports, stable tail behaviour under load, and scheduling. Our ladder…

Could RAID0 help?

When you have heterogeneous SSDs, e.g. you mix PCIe 5.0, PCIe 4.0 and Thunderbolt interfaces, you can obtain a greater throughput by managing in software the distribution of data, than by using RAID0.

RAID0 works fine only when all the interfaces have the same speed.

If one SSD is twice faster than the other, in order to achieve maximal throughput, you must take care to place the data in such a way so that you will need to read twice more data from the twice faster SSD.

In general, you must distribute the data so that the amounts read from each SSD are proportional with the throughputs of the SSDs.

One could write a modified RAID0 device driver, which would use unequal stripes, with widths proportional with the SSD throughputs, but I am not aware of any such already existing RAID0 driver.

Re: Kimi K3 (2.8T) at 1 token/s on a MacBook Pro, streamed from four SSDs

#145

Earlier quoted context omitted.

Bandwidth doesn't multiply like that here, and we measured it rather than assumed it. A MoE layer needs 16 expert reads and can't proceed until the slowest one lands, so a layer costs the max over its reads, not the sum. Going from one drive to four (13.6 → ~33 GB/s of combined ceilings) took decode from ~52% to 100% of our number — not 4× — with Every drive already at 90–100% of its own ceiling. RAID-0 was one of th…

Would the 40 Mac’s work with pipelining though?

No matter how many external drives you gather, the data coming from them must be squeezed through the peripheral interfaces of the Apple SoC.

So your CPU, made by Apple, Intel, AMD etc., has a number of PCIe lanes and a number of USB/Thunderbolt ports for connecting peripherals.

Those have an aggregated throughput, which sets an upper limit for the amount of data that can be read per second from all the peripheral devices.

In a given computer, usually not all the lanes and ports of the CPU are actually connected, so the limit may be even lower.

In desktop PCs and mini-PCs, usually only 4 + 4 = 8 PCIe lanes are available for SSDs, and when there are more SSD sockets they share some of those lanes.

A much higher SSD throughput could be achieved in a desktop PC by using the GPU connector with an SSD adapter for M.2 SSDs, which has 16 PCIe 5.0 lanes, with a 64 GByte/s throughput.

Taking out the GPU might actually be OK for doing AI inference, because a beefy CPU like a Ryzen 9950X should be able to keep up with a reading throughput of 88 GB/s from 6 SSDs (2 on the motherboard and 4 on the add-on PCIe card), while computing inference in the INT8 or BF16 formats, so the absence of the GPU would not reduce the inference speed when it is limited by the speed of reading the weights.

Re: Kimi K3 (2.8T) at 1 token/s on a MacBook Pro, streamed from four SSDs

#146
post #124

There's a tendency to cite only decode speeds, but in practice, an LLM generates far fewer tokens than it has to read (unless you ask general knowledge questions). So the effective performance is much slower than the decode rate suggests, because a 512-token prompt already takes 6 minutes to load

Generally infill is significantly faster than inference due to batching. Is that not the case here for some reason?

Prefill is generally faster than generation, but not by much on older Mac processors. I get around 70-60 tps in prefill on my M1 Max for Muse Glimmer (not sure about the generation speed, probably between 15 and 30).

They allegedly improved this by “up to 7x” with M5 but I’m not sure about the exact numbers here.

Re: Kimi K3 (2.8T) at 1 token/s on a MacBook Pro, streamed from four SSDs

#147
post #143

Earlier quoted context omitted.

I imagine Astra is/will soon will be on Cerebras?

Nope, OpenAI partnered with Broadcom to produce their own chips and the performance/watt looks good

Is it definitely out of the question?

https://openai.com/index/cerebras-partnership/

Re: Kimi K3 (2.8T) at 1 token/s on a MacBook Pro, streamed from four SSDs

#148
post #27

But why though? Cannot possibly be useful at such slow speeds, and costs a ton to perform that badly

Because we can. And K3 is frontier-like. Running on a MacBook Pro.

We should all send them this video when we see a question like that: https://youtu.be/PGVLS6YHDlY?t=42

Re: Kimi K3 (2.8T) at 1 token/s on a MacBook Pro, streamed from four SSDs

#149
post #63

Earlier quoted context omitted.

Anything you do right now? A typical 10 minute prompt "simply" becomes about 7 hours long. (40t/s vs 1t/s).

I don't really do anything at my job that could be done in a single prompt, and certainly not something that would take me 7 hours. A 7 hour task would take multiple iterations with how LLMs are right now. You said it would do overnight what would take a human half a week, so I'm curious what tasks you are doing where AI is 3x faster than you even at 1t/s

you could give it an entire spec, let it rip through everything that it is assigned and let another model correct the failures. Or similarly there's uses as well as an asynchronous adversarial review agent which basically ends up being an extra pair of "hands" to help out where performance isn't critical.

Re: Kimi K3 (2.8T) at 1 token/s on a MacBook Pro, streamed from four SSDs

#150
post #95

Earlier quoted context omitted.

Could RAID0 help?

When you have heterogeneous SSDs, e.g. you mix PCIe 5.0, PCIe 4.0 and Thunderbolt interfaces, you can obtain a greater throughput by managing in software the distribution of data, than by using RAID0. RAID0 works fine only when all the interfaces have the same speed. If one SSD is twice faster than the other, in order to achieve maximal throughput, you must take care to place the data in such a way so that you will n…

One approach I've seen used is:

  mdadm --create /dev/md0 --level=0 --raid-devices=3 /dev/nvme0n1p1 /dev/nvme0n1p2 /dev/nvme1n1p1
Which is effectively a way to get any positive integer m:n ratioed bandwidth distribution over any number of any sized drives.
Post reply on HN