News for hackers. Stuff that matters.
Re:How to make LLMs go fast by behnamoh on Friday December 22, 2023 @11:58AM (#38736064)
I wonder if the transformer will remain the de facto arch for LLMs in a couple years. We already have Mamba, RWKV, etc. which are huge improvements over transformer in terms of memory requirement and speed. I wonder why there's still so much work (and hacks and workarounds) on transformer to make it go faster and consume less VRAM whereas the same effort could be spent on other architectures that solve some of those problems fundamentally.
Re:How to make LLMs go fast by logicchains on Friday December 22, 2023 @12:59PM (#38736718)
Theoretically transformers are fundamentally more powerful than stuff like Mamba and RWKV because they don't "forget"; the newest token can attend perfectly to the oldest token if it wants. Mamba and RWKV on the other hand compress the old state, based on information available at the time of compression. If it turns out the new token wants some information from the old token that during the compression was excluded due to the compression thinking it wouldn't be needed, the new token has no way to access it.
Re:How to make LLMs go fast by visarga on Friday December 22, 2023 @01:47PM (#38737176)
Yet this all-to-all approach of transformers is bottlenecked on compute, while Mamba can take in a context length of a million tokens, that might have a positive effect on long range tasks.
Re:How to make LLMs go fast by maleldil on Friday December 22, 2023 @02:19PM (#38737537)
What use is to have infinite context if new tokens can only access a lossy compression of past tokens?

There is definitely a use for this kind of model, but this also shows why Transformers are still the main architecture we use today.

Re:How to make LLMs go fast by seo-speedwagon on Friday December 22, 2023 @03:27PM (#38738266)
I know almost nothing about this space but “lossy compression of millions of past tokens” feels a lot more like how actual human memory works than “perfect access to a small number of recent tokens”.
Re:How to make LLMs go fast by thentherewere2 on Friday December 22, 2023 @03:41PM (#38738434)
RNNs and LSTMs from the past did this as well (but cannot be trained in parallel as each token has to be compressed sequentially). Transformers ate their cake.

Newer methods are going back to similar concepts but trying to get past previous bottlenecks given what we've learned since then about transformers.

Re:How to make LLMs go fast by throwup238 on Friday December 22, 2023 @05:03PM (#38739203)
> feels a lot more like how actual human memory works

Beware of feel-good traps like this.

If you were to map the human connectome to a computational neural network down to the ion channel, it'd be at least 500 quadrillion parameters*. That's at least 5-6 orders of magnitude beyond what is currently possible with SOTA ML which means that even if the human brain was 99% devoted to compressing those tokens, that 1% that could actually do work with them is still a thousand times bigger than GPT4. There be emergent dragons.

* This is a fascile argument to begin with since biological neuron signals aren't quantized and ion channels are far too complex to map to a single static parameter

Re:How to make LLMs go fast by bbor on Friday December 22, 2023 @08:26PM (#38740787)
Maybe against HN rules, but: thank you. Very helpful comment!
Re:How to make LLMs go fast by fwip on Friday December 22, 2023 @06:00PM (#38739617)
> biological neuron signals aren't quantized

Perhaps, but they inherently have imprecision due the nature of being biological. Expose the same neuron to the same input N times, and you'll get a range of output. The effect of noisy analog data is, broadly speaking, similar to the effect of low-resolution digital data.

Re:How to make LLMs go fast by throwup238 on Saturday December 23, 2023 @03:34AM (#38742611)
Expose the same neuron to the same input N times and you won't get a randomly distributed range of outputs, you'll get a signal that is either attenuated or potentiated. That's not noise, that's the simplest form of neuroplasticity at work (which is why static parameters can never represent ion channels).
Re:How to make LLMs go fast by nickpsecurity on Friday December 22, 2023 @06:01PM (#38739628)
I didn’t know those alternatives had those weaknesses. I did have a whole list of alternatives to check out. Having already looked at some, do you know any transformer alternatives that don’t forget things but were still sub-quadratic? What rabbit holes are worth digging deeper into?
Re:How to make LLMs go fast by deepnotderp on Friday December 22, 2023 @06:29PM (#38739920)
Doesn't sub-quadratic attention fundamentally imply forgetting things?
Re:How to make LLMs go fast by evnc on Friday December 22, 2023 @09:02PM (#38740961)
This is fair -- the newest token can attend perfectly to the oldest token, within the context window.

but also, on a broader scale, if a transformer model is presented with a long input that does not fit in its context (e.g.: you are building a chatbot, and you have a very long chat history), it must "compress" or "forget" some of that information (e.g.: repeatedly summarizing historical messages, dropping them and appending the summary at the beginning of the input).

Mamba/RWKV/other "recurrent" architectures, can theoretically operate on unbounded input lengths; they "forget" information from earlier tokens over time, but is that not comparable to what a transformer must do with input lengths greater than their context window?

Re:How to make LLMs go fast by D0TheMath on Friday December 22, 2023 @09:08PM (#38740994)
The jury very much still seems out on this. Computationally speaking, I believe Mamba is Turing complete, while transformers aren't (they can't do loops), so technically Mamba is more expressive. But of course, the question is always whether it ends up with lower loss.
Re:How to make LLMs go fast by D0TheMath on Friday December 22, 2023 @09:09PM (#38741003)
(well actually its not turing complete, but it definitely seems closer)
Re:How to make LLMs go fast by beoberha on Friday December 22, 2023 @12:49PM (#38736648)
There’s hacks and workarounds because billions of dollars have been poured into transformers by the biggest tech companies in the world.

Your assumption that the same effort could be given to MAMBA or RWKV isn’t necessarily true. I’m sure there’s research arms looking to see if they scale to the level OpenAI or Google have their transformers at now, but they’re still very much in their infancy.

This all ignores the risk of them not panning out and the lost time not focusing some energy on transformers.

Re:How to make LLMs go fast by andy99 on Friday December 22, 2023 @12:23PM (#38736351)
The speed of transformers is memory bandwidth limited. I think that it's possible to speed them way up with different chip architectures, and I know there are lots of people working on this e.g. https://etched.ai making asics and https://untether.ai making chips will co-located memory and compute cells. So unless some architecture really starts beating transformers badly on language tasks, I think the speed problem is going to disappear as silicon architectures adapt.
Re:How to make LLMs go fast by tome on Friday December 22, 2023 @12:42PM (#38736578)
Yup, the company I work for has the world's fastest LLM appliance, based on a hardware design co-locating memory and compute. It requires compilation innovation as well in a sort of hardware-software codesign. We don't see transformer models as being an impediment in terms of memory requirements or speed in the near future.

[I would be happy to say more but I just got a top-level comment flag killed, presumably because they though I was advertising, so I won't mention the company name.]

Re:How to make LLMs go fast by benchess on Friday December 22, 2023 @03:30PM (#38738306)
If I understand correctly, Groq chips have 220MB SRAM and the next best level is DDR4? How many chips are needed to run Llama2-70B at those speeds?
Re:How to make LLMs go fast by tome on Friday December 22, 2023 @04:53PM (#38739106)
Cool that you know the tech specs of the GroqChip! Yes, that's right, 220 MB of SRAM per chip. I think the demo where we first broke 200 tokens / sec was running on 1 GroqRack, so 64 chips. The live public demo that's currently running at 275 tokens / sec I think might be running on two GroqRacks, so 128 chips. I'm not certain of either of these figures so please don't quote me! But those are the right ball-park.
Re:How to make LLMs go fast by trsohmers on Friday December 22, 2023 @07:27PM (#38740438)
This article from less than a month ago says that it is on 576 chips https://www.nextplatform.com/2023/11/27/groq-says-it-can-dep...
Re:How to make LLMs go fast by tome on Saturday December 23, 2023 @02:59AM (#38742484)
Thanks, looks like you're right and this demo is running on 9 GroqRacks (576 chips). I think we may also have an 8 rack version in progress. We've tried a variety of different configurations to improve performance, which is possible because of the high level of flexibility and configurability of our architecture and compiler tool chain.
Re:How to make LLMs go fast by andy99 on Friday December 22, 2023 @01:36PM (#38737040)
Are you guys hiring? I'm actually looking for a job in this industry.
Re:How to make LLMs go fast by tome on Friday December 22, 2023 @02:03PM (#38737370)
Yes we are! (I put links in my profile because I'm worried if link here or mention the name I'll be flag killed again.)
Re:How to make LLMs go fast by andy99 on Friday December 22, 2023 @02:20PM (#38737550)
Awesome, thanks! Is there someone there you could connect me with for an introductory chat? I put my contact info in my profile, I completely understand if it's not possible. Thanks!
Re:How to make LLMs go fast by tome on Friday December 22, 2023 @03:01PM (#38737989)
Yes, sure! I've emailed a recruiter to introduce you. Thanks for reaching out and showing interest.
Re:How to make LLMs go fast by tome on Saturday December 23, 2023 @08:05AM (#38743966)
Link to HN discussion about the appliance: https://news.ycombinator.com/item?id=38739199
Re:How to make LLMs go fast by pavelstoev on Friday December 22, 2023 @05:04PM (#38739209)
There is still so much performance to gain by applying software-based optimizations for superior performance of transformer LLMs on GPUs. From ~ 30% GPU utilization to over 90% is possible. I wrote a white paper on this, page 5 and 6: http://tinyurl.com/uujr3z4f
Re:How to make LLMs go fast by taneq on Friday December 22, 2023 @12:52PM (#38736663)
The current best-in-class performance is from transformer models so of course research is focusing on this. You're creating a false dichotomy between "work on transformers" and "work on something new and fundamentally better." All of the current work on optimizing transformer architectures is exploring and better understanding the space, and so it IS leading us to better architectures. This is the most fertile ground for new insights that will outperform the current approaches.

New technologies aren't generally just created out of whole cloth by some genius, they're build up of layers of incremental improvements, each of which is modest in its own right but which when taken together are groundbreaking.

Re:How to make LLMs go fast by __loam on Friday December 22, 2023 @12:08PM (#38736189)
The best technology doesn't necessarily win. First to market matters, especially when models on the scale of gpt-4 cost 100mln to train.
Re:How to make LLMs go fast by evilantnie on Friday December 22, 2023 @12:31PM (#38736446)
"best" is subjective, but I do think the industry will eventually converge onto an architecture that is significantly more cost effective than current state of the art. Regardless of who is first to market, everyone is incentivized to continue down this path with their research on improving LLM performance.
Re:How to make LLMs go fast by realusername on Friday December 22, 2023 @01:50PM (#38737208)
While the first mover advantage exists, I don't think it's a sufficient moat in the long term.

OpenAI's moat is the high cost of training as you mentioned but this might be obsolete in a few papers down the road.

They themselves realized this by trying to turn it into a platform but I don't think it's enough.

Re:How to make LLMs go fast by uoaei on Friday December 22, 2023 @09:42PM (#38741159)
> why there's still so much work (and hacks and workarounds) on transformer to make it go faster and consume less VRAM whereas the same effort could be spent on other architectures

Probably because the pace of development is now no longer determined by ML researchers but by CS engineers. ML is "easy to pick up" until you have to understand the reasons certain architectures work or don't for different applications.

Re:How to make LLMs go fast by cyanydeez on Saturday December 23, 2023 @07:14PM (#38749648)
technical debt