Live data from Hacker News

Running large language models like ChatGPT on a single GPU

github.com

211–220 of 274 posts

Re: Running large language models like ChatGPT on a single GPU

#211

If this works well, it will be a game changer. Requiring a fleet of $10k+ GPUs will kill any hope of wide spread adoption of open source "competitors" to GPT-3. Stable Diffusion is so popular because it can run on hardware mere mortals can own.

This will only happen if "Open"AI or other big orgs release the model weights, which only Stable Diffusion did. Cost to train is still astronomical.

It does not have to be. We have optimizations for all kinds of workloads - https://CentML.ai

Re: Running large language models like ChatGPT on a single GPU

#212
Don't underestimate the value of batching even for personal use. You can get MUCH better results from a language model if you sample a couple outputs and choose the best to continue.

This kind of usage isn't especially economical for hosted use-- but for personal use it would mostly be using idle resources and you can get extra samples almost for free.

A bunch of people getting multiple completions and choosing which one they'd prefer to continue might make for some really useful training data too.

Re: Running large language models like ChatGPT on a single GPU

#213

Earlier quoted context omitted.

What's the advantage of purchasing a T4 instead of a 3090 or 4090?

A lot of 2U cases won't fit a consumer GPU. Furthermore, Tesla-equivalents are usually either significantly cheaper than their consumer counterpart (for last-gen and older GPUs) or similar in price with far more RAM. I bought a bunch of Tesla P40s at a really low price compared to what 1080tis are going for.

I bought a couple dozen 24GB K80s for like $40 each.

Re: Running large language models like ChatGPT on a single GPU

#214
post #49

It's really interesting that these models are written in Python. Anyone know how much of a speed up using a faster language here would have? Maybe it's already off-loading a lot of the computation to C (I know many Python libraries do this), but I'd love to know.

The model is not written in a programming language at all. The model is in the neural network weights.

Re: Running large language models like ChatGPT on a single GPU

#215

interesting article, I have to give that a try! :D One ting is that while getting the value of running pretrained model weights like OPT-175B, there are also a potential downsides to using pre-trained models, such as the need to fine-tune the model to your specific task, potential compatibility issues with your existing infrastructure (integration ) , and the possibility that the pre-trained model may not perform as…

But OpenAI's latest models (and a few others that are basically comparable) make that an obsolescent viewpoint since they are so general and capable and can adjust to a given context on the fly.

So now what makes sense in my opinion is to keep going in that direction of generality. Take advantage of their API and otherwise work on open source efforts to reproduce the performance of those models or come up with new techniques that can get the same capabilities with less incredible resource needs.

Re: Running large language models like ChatGPT on a single GPU

#216

Earlier quoted context omitted.

I spoke with the authors of the paper; the leftmost points in Figure 1 were generated with batch-size 1, indicating ~1.2x and ~2x improvements in speed over DeepSpeed for 30B and 175B models respectively. For reference, this is speeding up from ~0.009tokens/s to about ~0.02tokens/s on 175B. These results are generally unimpressive, of course. Most of the improvements at that point are attributable to the authors maki…

Calling this garbage is absolutely wild. The authors make it very clear that this is optimized for throughput and not latency. Throughput focused scenarios absolutely do exist, editorializing this as "running large language models like ChatGPT" and focusing on chatbot applications is the fault of HN. It's also a neat result that fp4 quantization doesn't cause much issue even at 175b, though that kinda was to be expec…

While I agree that throughput-focused scenarios exist and this work may be valuable for them, I still think that the repository can be improved to avoid "overselling".

The fact that the FlexGen's single-batch generation performance is much worse is unclear to most people not familiar with peculiarities of LLM inference and worth clarifying. Instead, the readme starts with mentioning ChatGPT and Codex - projects that both rely on single-batch inference of LLMs at interactive speeds, which is not really possible with FlexGen's offloading (given the speed mentioned in the parent comment). The batch sizes are not reported in the table as well.

Seeing that, I'm not surprised that most HN commenters misunderstood the project's contribution.

Re: Running large language models like ChatGPT on a single GPU

#217

Earlier quoted context omitted.

People often (usually) do objectively useful things because it's in their selfish interests to do so, ego or otherwise. The surest road to failure is expecting people to act virtuously. Generally systems that assume virtue fail, and systems that assume selfish action and steer that selfish action towards the greater good succeed. In other words, I don't care why people do things, only that they do.

That’s fine, as long as publicity isn’t the motivation. It’s safe to assume that isn’t optimal for a projects success (Satoshi understood this). Not sure where you got the idea that the inverse of that was beneficial to such a project. I’ve seen first hand where it becomes a problem. I’m not aware of many examples of starry-eyed divas achieving great results. Usually you hear about them but only because they are exce…

> to say otherwise is purely a straw man argument

This is really overconfident.

That publicity isn't causally connected to success is belied by the existence of the advertising industry. While generally refuting across industries, it is worth noting that the most dominant AI company - Google - happens to be in this industry. They are explicitly known - having publicity for - their generous compensation packages. This is because of a causal model of talent attraction.

Success is obviously causally connected to publicity and the idea that it isn't isn't well supported by the evidence. Contrary to your assertion, it was not a safe assumption. Your appeal to Satoshi is an appeal to authority, not a causal model of its shielding off from project impacts.

Re: Running large language models like ChatGPT on a single GPU

#218
post #92

I’d love to run this on a single 24gb 3090 - how much dram / SSD space do I need for a decent LLM, when it’s quantised to 4bits?

I've been trying this, and with compression on (4 bits) you can fit the entire 30B model on the 3090.

OK so don't need offloading at all for the quantised model - nice.

In practice, how good is the 30B model vs 175B?

Re: Running large language models like ChatGPT on a single GPU

#219
post #201
post #155

Got the ops-30b chatbot running on 3090 24GB. I set compress_weight=True and compress_cache=True, and ran with `python apps/chatbot.py --model facebook/opt-30b --percent 100 0 100 0 100 0`. I also modified the prompt a bit to make it more... uh alive: Assistant: Did you know that Saturn is 97 times the size of Earth? Human: Are you sure? Assistant: What difference does size make, really, anyway? Human: You didn't ans…

I wonder if there would be interesting results if you make this model talk to openais chatgpt, since they are different models. Seeding them with some topic.

Do not let Dinesh AI talk to Gilfoyle AI !

Re: Running large language models like ChatGPT on a single GPU

#220

Earlier quoted context omitted.

I spoke with the authors of the paper; the leftmost points in Figure 1 were generated with batch-size 1, indicating ~1.2x and ~2x improvements in speed over DeepSpeed for 30B and 175B models respectively. For reference, this is speeding up from ~0.009tokens/s to about ~0.02tokens/s on 175B. These results are generally unimpressive, of course. Most of the improvements at that point are attributable to the authors maki…

Calling this garbage is absolutely wild. The authors make it very clear that this is optimized for throughput and not latency. Throughput focused scenarios absolutely do exist, editorializing this as "running large language models like ChatGPT" and focusing on chatbot applications is the fault of HN. It's also a neat result that fp4 quantization doesn't cause much issue even at 175b, though that kinda was to be expec…

[deleted]
Post reply on HN