Live data from Hacker News

Running large language models like ChatGPT on a single GPU

github.com

161–170 of 274 posts

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

#161

I recently bought a T4 to go with my epyc 7402 and 512GB ram for fun and this looks like a great use case. Thanks!

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

Power consumption. A Tesla T4 with 16GB RAM will consume a mere 70W. An RTX 3090 will need at least 300W, and the Titan models go up to 450W.

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

#162
post #147

Earlier quoted context omitted.

The cloud has been cheaper to train large models on for a couple years now. Compare buying 8xA100 server vs renting one on Lambda Labs. At least 3 years to break even - if you are using it non-stop 24/7. Longer if not.

This is not true - the break even period is closer to 6-7 months.

A single 8xA100 server is ~150k. On demand cost to rent it is $8.8/hour. Do the math and don't forget the energy costs.

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

#163
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…

This is amazing. Reminds me of claptrap from Borderlands

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

#164
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…

That's impressive! How much customization did you have to do in order to get the chatbot to respond like that?

Not much. Here's the prompt:

  A chat between a human and a more funny and witty intelligent assistant
  Human: Hello! What can you do?
  Assistant: Hey there! I can pretty much do whatever you ask!
  Human: What is the name of the tallest mountain in the world?
  Assistant: It's Everest.
  Human: Are you sure?
  Assistant: You damn right I'm sure! I'm a hyperintelligent AI!

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

#165

Very cool. Worth mentioning though that the highlighted figures (1.12 tok/s for OPT-175B for "FlexGen with Compression") are for inputs of 512 tokens and outputs of 32 tokens. Since decoder-only transformer memory requirements scale with the square of sequence lengths, things would probably slow down significantly for very long sequences, which would be required for a back-and-forth conversation. Still though, until…

> transformer memory requirements scale with the square of sequence lengths Not true, see: Flash Attention. You can losslessly calculate the attention in blocks using a little math trick. Essentially each subsequent block "corrects" the denominator of the last block's softmax calculation. At the end you have a perfectly* accurate softmax. Since you don't need to keep the whole sequence in memory to perform the softma…

What's the best way to get started learning this? What are the steps I should take to arrive at understanding what "attention" is?

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

#166
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…

This is amazing. Reminds me of claptrap from Borderlands

It really does

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

#167
post #145

A lot of people are looking at this wrong. A $350 3060Ti has 12GB RAM. If there's a way to run models locally, it opens up the door to: 1) Privacy-sensitive applications 2) Tinkering 3) Ignoring filters 4) Prototyping 5) Eventually, a bit of extra training The upside isn't so much cost / performance, as local control over a cloud-based solution.

I have that exact card, this maybe the nudge where I remove windows from the computer and try out linux gaming (and local GPT)

Thing is, you don't have to totally switch to Linux. I'm running ML/CUDA workloads through WSL without too many problems.

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

#168

We are hiring in that area of work in Europe time zone. If you are exited about and capable in this field, please apply here: https://ai-jobs.net/job/41469-senior-research-engineer-llms-...

If you want talent, don't make them go through the regular application process.

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

#169
post #164

Earlier quoted context omitted.

That's impressive! How much customization did you have to do in order to get the chatbot to respond like that?

Not much. Here's the prompt: A chat between a human and a more funny and witty intelligent assistant Human: Hello! What can you do? Assistant: Hey there! I can pretty much do whatever you ask! Human: What is the name of the tallest mountain in the world? Assistant: It's Everest. Human: Are you sure? Assistant: You damn right I'm sure! I'm a hyperintelligent AI!

All I can think of is outsourcing to ChatGPT now...

https://www.youtube.com/watch?v=rYaZ57Bn4pQ

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

#170

Earlier quoted context omitted.

do/did you seriously think that the processing requirement was going to “kill” that possibility? the history of computing clearly indicates that either the requirements for running or the bar for owning this technology was always going to drop

The history of computing had Moore's Law.

exactly
Post reply on HN