News for hackers. Stuff that matters.
Re:Serving 70B-Scale LLMs Efficiently on Low-Resource Edge D... by loufe on Thursday October 03, 2024 @11:05AM (#41731462)
It would be nice for the inference time to be paired with measure of output quality. I'm not well versed in how the architecture works, but I have a hard time believing a 90% reduction in peak memory footprint comes cost-free.
Re:Serving 70B-Scale LLMs Efficiently on Low-Resource Edge D... by woadwarrior01 on Thursday October 03, 2024 @11:30AM (#41731686)
It's not cost-free. It comes at the cost of greatly increased latency. 29.9 seconds per token with Llama 3.1-70B. This is from Table 1 (pg 8) of the paper.
Re:Serving 70B-Scale LLMs Efficiently on Low-Resource Edge D... by _ache_ on Thursday October 03, 2024 @12:19PM (#41732127)
That is s/token and not token/s. The cost is high.

The actual goal of the article is to highlight that we can optimise the overall speed by decreasing link latency. Yeah link latency, because it's not 1 machine but several low devices that are used together to serve the 70B LLM.

Re:Serving 70B-Scale LLMs Efficiently on Low-Resource Edge D... by m3kw9 on Thursday October 03, 2024 @11:44AM (#41731790)
Ah the disk swap method
Re:Serving 70B-Scale LLMs Efficiently on Low-Resource Edge D... by _ache_ on Thursday October 03, 2024 @12:20PM (#41732139)
It's not disk swap. It's multi-devices LLM.
Re:Serving 70B-Scale LLMs Efficiently on Low-Resource Edge D... by wpietri on Thursday October 03, 2024 @01:09PM (#41732656)
I think the point is that it has the same sort of latency tradeoff that disk swap did: it's awful, but sometimes better than nothing.
Re:Serving 70B-Scale LLMs Efficiently on Low-Resource Edge D... by kridsdale3 on Thursday October 03, 2024 @01:09PM (#41732651)
That looked like an analogy. Back in the days of a mechanical arm moving magnetic fields around in our PCs, you could have the illusion of infinite RAM as long as you're ok with microsecond operations now taking two million times longer. This is akin.
Re:Serving 70B-Scale LLMs Efficiently on Low-Resource Edge D... by thelastparadise on Thursday October 03, 2024 @11:52AM (#41731855)
Is there any predictability/patterns for neuron/layer activation? If so, would it be reasonable to have a second tiny model that specifically tries to predict activation and preemptively swap those into memory?
Re:Serving 70B-Scale LLMs Efficiently on Low-Resource Edge D... by tcdent on Thursday October 03, 2024 @12:01PM (#41731946)
Depends on the architecture, but generally you just move through the layers linearly. Simple iteration.

The number of layers, and the amount of time spent in each of them, makes me think any benefit from pre-loading the layer ahead is negligible.

You really need the entire model on device to consider it performant.

Re:Serving 70B-Scale LLMs Efficiently on Low-Resource Edge D... by miki123211 on Thursday October 03, 2024 @12:04PM (#41731966)
This isn't how neural networks work.

For vanilla models, you always use all the weights. That isn't true for mixture-of-experts, though, and in that setting, your approach has merit.

Re:Serving 70B-Scale LLMs Efficiently on Low-Resource Edge D... by teraflop on Thursday October 03, 2024 @01:29PM (#41732834)
Am I just misunderstanding, or is the paper using "latency" when what they really mean is "throughput"?

In other words, if I want 100 tokens of output, do I have to wait 2990 seconds? If so, the terminology seems unnecessarily confusing.

Re:Serving 70B-Scale LLMs Efficiently on Low-Resource Edge D... by freehorse on Thursday October 03, 2024 @11:26AM (#41731651)
From what I get skimming through the article the main cost is speed of token generation (token latency). You can always run a large model by reading directly from the disk and not care much about ram; but it is very slow. They try to improve that aspect doing some optimisations, but it is still definitely slower than using ram or vram.
Re:Serving 70B-Scale LLMs Efficiently on Low-Resource Edge D... by refulgentis on Thursday October 03, 2024 @11:55AM (#41731881)
Table 3 directly refutes this* and claims 0 tradeoffs.**

Below that, they indicate that a key part of the implementation is loading weights from disk before they're needed using a separate thread.***

* maybe I'm missing something though, someone please triple check :)

** ttft (time to first token) and s/token (seconds per token) are both lower than any alternative in all cases.

*** "daemon thread asynchronously preloads the weights"

Re:Serving 70B-Scale LLMs Efficiently on Low-Resource Edge D... by sgc on Thursday October 03, 2024 @12:26PM (#41732207)
I want to add that their chart shows s/token per device (edit: as per the heading on table 1 - it could also be confusing grammar), so it sounds like you are getting 4x the listed s/t on their 4 laptop cluster . Their laptops are not even hardwired - they are connecting over wifi.

This comes at a very interesting time for me. I have an ancient dual xeon workstation with 64gb memory that I was researching how to convert to run an llm. I can just run that with 4 instances on the same machine and see how it goes, without purchasing a better GPU, to start. It sounds like this will allow you to run very large models with minimal quants, on craigslist quality devices.

If it does what they say it does (and it seems to do), it will be an absolute game changer for most users.

Re:Serving 70B-Scale LLMs Efficiently on Low-Resource Edge D... by zackangelo on Thursday October 03, 2024 @11:23AM (#41731626)
I've only read the abstract but they don't mention quantizing the weights or otherwise trying to shrink the model in any way.

They're claiming to be able to efficiently run larger models without loading the entire thing into GPU memory. If they're using the same weights, the same architecture and just using tensor parallel operations to perform the forward pass that would imply no loss in quality.

I'm sure there are trade-offs but they're not clear by just looking at the abstract.

Re:Serving 70B-Scale LLMs Efficiently on Low-Resource Edge D... by tgtweak on Thursday October 03, 2024 @12:38PM (#41732349)
I read it like this too - no drop in weights or model quality just optimizing the lower boundaries of performance when you are splitting from vram to ram to disk (or network).
Re:Serving 70B-Scale LLMs Efficiently on Low-Resource Edge D... by not_a_dane on Thursday October 03, 2024 @11:11AM (#41731511)
Nothing is free in this world.