News for hackers. Stuff that matters.
Re:The Coming of Local LLMs by emrah on Tuesday April 11, 2023 @11:28AM (#35526508)
It's great they got LLMs running on resource constrained devices but are they any good? Or I should ask, with the limited resources they get, what good are they for?
Re:The Coming of Local LLMs by BulgarianIdiot on Tuesday April 11, 2023 @11:45AM (#35526798)
They’re crude but will be getting better quickly.
Re:The Coming of Local LLMs by cgearhart on Tuesday April 11, 2023 @11:51AM (#35526886)
Even with smaller models & more optimized hardware, I think edge compute is going to be power-limited first. Batteries today just won’t support constantly running LLMs. But I joked recently that as long as they prove useful then consumers would be willing to swap their iPhone for the old car battery with a phone handle attached.
Re:The Coming of Local LLMs by BulgarianIdiot on Tuesday April 11, 2023 @03:40PM (#35530377)
The first step is for it to be viable for smaller models on desktops. The rest will follow, as hardware catches up. Hybrid analog-hybrid NN hardware is on the horizon, maybe in 3-4 years. This would allow GPT-4 level performance on an iPhone with plausible battery life.

The current hardware of course can't pull anything like this yet. But iPhone supports on-device facial recognition, object recognition, dictation and translation, so small steps...

Re:The Coming of Local LLMs by boppo1 on Wednesday April 12, 2023 @12:44AM (#35535113)
Who is making said hardware?
Re:The Coming of Local LLMs by BulgarianIdiot on Thursday April 13, 2023 @09:42AM (#35555315)
Re:The Coming of Local LLMs by tudorw on Tuesday April 11, 2023 @11:45AM (#35526800)
I guess if the hardware is cheap for some uses speed is not so important, you can just walk away and let it grind.
Re:The Coming of Local LLMs by kbrkbr on Tuesday April 11, 2023 @11:51AM (#35526893)
From my experience with llama.cpp and oobaboogas webui I can say they are amazing, at least on my gaming pc. I’m absolutely astonished at the speed and quality of llama, alpaca, galactica and vicuna (the >10B parameters ones).

Make no mistake, it’s for tinkerers that do not expect each prompt to be answered human like.

I see them as creativity and thought testing tools, also knowledge exploratory.

Re:The Coming of Local LLMs by wing-_-nuts on Tuesday April 11, 2023 @12:40PM (#35527604)
is there a difference in the quality of llm one would be able to run on a gpu with 8, 12, 16, all the way up to 24gb?

I'm trying to decide whether it's worth while to splurge on a more expensive 4090 vs a 4070 or whatever.

Re:The Coming of Local LLMs by Garrrrrr on Tuesday April 11, 2023 @12:53PM (#35527805)
llama.cpp runs on your processor and uses a lot of RAM, so splurging on a GPU isn't going to help the performance
Re:The Coming of Local LLMs by turmeric_root on Tuesday April 11, 2023 @01:15PM (#35528113)
More VRAM => larger models. IME it is absolutely worth maxing out VRAM for the significant improvement in quality, especially with LLaMA (though even with a 4090, you won't be able to run the largest 65-billion parameter model even with 4-bit quantization).

That said, I recommend renting a cloud GPU for a few hours and trying the larger models on them before buying a GPU of your own, just to see if the models meet your requirements.

Re:The Coming of Local LLMs by sliken on Tuesday April 11, 2023 @04:53PM (#35531396)
But should fit easily on a Apple MBP or Studio with 96GB or 128GB of unified memory.
Re:The Coming of Local LLMs by whimsicalism on Tuesday April 11, 2023 @01:31PM (#35528325)
It makes 0 economical sense to buy a GPU to train a model. If you want to train a model, train it on the cloud.
Re:The Coming of Local LLMs by anonzzzies on Tuesday April 11, 2023 @01:46PM (#35528542)
Can you calculate that for me on a napkin? Every calculation I make for training, but certainly for inference, makes me break even after well under a year and then it’s vastly less if I buy the hardware myself.
Re:The Coming of Local LLMs by whimsicalism on Tuesday April 11, 2023 @01:50PM (#35528603)
You can infer on your local machine.

I doubt it will take you a year to train a model.

Vicuna-13B cost $300 to train/fine-tune [0]. They trained on an A100 which costs $10k [1].

[0]: https://vicuna.lmsys.org/ [1]: https://github.com/lm-sys/FastChat/blob/main/scripts/train-v...

Re:The Coming of Local LLMs by wing-_-nuts on Tuesday April 11, 2023 @02:03PM (#35528798)
It's more that I'm building a gaming pc this summer, and I can either target 1440p (4070) for 2k or 4k for 5k (4090). If I can do a lot more with a 4090 over a 4070 it might make sense, but I know a lot of cs students use google colab these days, so I may just rely on that.
Re:The Coming of Local LLMs by whimsicalism on Tuesday April 11, 2023 @02:56PM (#35529683)
Fair enough.
Re:The Coming of Local LLMs by thewataccount on Tuesday April 11, 2023 @04:46PM (#35531320)
I'd seriously recommend the 4090 over the 4070 if you want to do finetuning/inference locally. And I highly recommend 64GB of ram.

The 24GB of VRAM is 100% worth it alone. If you want to do local ML stuff you _need_ that 24gb of VRAM.

64GB of ram + 24GB of vram lets you run a lot of the medium size models at decent speeds. I don't use Colab personally but AFAIK it should work fine for you if you don't want to do it locally.

Also worth noting is the newer ray tracing rendering that cyberpunk is doing. You should checkout the demos IMO it looks sick. It only runs at 18fps on a 4090 so it's only playable on a 4090 + dlss, and I'm not sure if the newer rending tech will be super achievable on any of the other cards - if that's of interest to you.

Re:The Coming of Local LLMs by boppo1 on Wednesday April 12, 2023 @12:39AM (#35535069)
Get a 13900 or 7950X and 64 gb of ram. You can run llama 30B and 65B, slowly but surely. Play with that before buying a gpu. If you really, really see yourself getting into this, then go ahead and get a 3090 or 4090. But otherwise get a cheaper nvidia card and wait for things to develop a little more. You can still play with ML and CUDA but you'll have cash left for when 50X0s drop, and that will probably be right around when this stuff will really be getting hot (if the current plateau doesn't hold).

Llama is basically an auto-complete right now. We're celebrating baby's first steps. It's not really worth the $600-1000 jump up from cards that can run all current games 4k60.

Re:The Coming of Local LLMs by thewataccount on Tuesday April 11, 2023 @04:40PM (#35531233)
This isn't necessarily true with LoRAs - a 4090 can train/compute the alpaca dataset with LoRA in under 6 hours (it might be 3, I forget what it was).

So finetuning with LoRAs and a few other methods is fine on higher end consumer hardware like a 4090 and finishes in a reasonable amount of time - IMO definitely worth it if you're experimenting with this especially for the inference.

The base training though yeah I totally agree with you - train in the cloud, don't buy hardware when you need a month of 8x A100's or whatnot.

Re:The Coming of Local LLMs by whimsicalism on Tuesday April 11, 2023 @04:52PM (#35531380)
Even with LoRA the economics are not in your favor to buy a 4090 instead of cloud training.
Re:The Coming of Local LLMs by thewataccount on Tuesday April 11, 2023 @04:57PM (#35531446)
Actually yeah you're definitely right.

My perspective was for people who have other uses for them e.g. gaming or local inference. From a pure finance standpoint you're definitely right - you should rent and not buy a dedicated card. I think you'd need a few thousand hours to break even which is a few months 24/7.

Re:The Coming of Local LLMs by rubidium on Tuesday April 11, 2023 @12:22PM (#35527379)
Is there a "getting started" guide you'd recommend to a newbie to the space?
Re:The Coming of Local LLMs by kbrkbr on Tuesday April 11, 2023 @12:39PM (#35527587)
I started with ggerganov’s llama.cpp GitHub repo, and went from there. But then again, I know some programming, statistics and machine learning, so it may not be for you, I cannot judge that.

Models can be found on huggingface.co, and I’d start with eachadea/ggml-vicuna-13b-4bit, but it needs 10G of cpu-ram. It is very friendly to any prompt though.

I read on my way (on reddit, when I recall correctly), that there must be some really good intro videos on YouTube.

Re:The Coming of Local LLMs by boppo1 on Wednesday April 12, 2023 @12:42AM (#35535101)
additional point of reference I don't know shit about ML or stats, and am a very weak programmer. I just know how to install programs on linux and use CLI in a basic fashion. I have had no problem getting llama.cpp going by following ggerganov's readme.
Re:The Coming of Local LLMs by synergy20 on Tuesday April 11, 2023 @11:59AM (#35527036)
are we talking about training or inference for local LLM here? it's hard to do any meaningful training on the edge unless we all carry a heavy gaming pc, even that, the training quality will be subpar?
Re:The Coming of Local LLMs by qumpis on Tuesday April 11, 2023 @12:02PM (#35527075)
Inference, even fine-tuning a few layers would be difficult since one needs to use non-quantized model, I'd imagine
Re:The Coming of Local LLMs by ctoth on Tuesday April 11, 2023 @12:33PM (#35527518)
Checkout LoRA and Alpaca LoRA and the whole huge group of people who have already figured this out. I think there was another breakthrough (yesterday?) which is a further adaption of LoRA to touch even less parameters at runtime.
Re:The Coming of Local LLMs by homarp on Tuesday April 11, 2023 @12:45PM (#35527689)
Re:The Coming of Local LLMs by whimsicalism on Tuesday April 11, 2023 @12:55PM (#35527837)
Disagree that this is a major breakthrough :) but it is probably a marginal improvement.
Re:The Coming of Local LLMs by whimsicalism on Tuesday April 11, 2023 @12:55PM (#35527838)
They're not training on edge :)
Re:The Coming of Local LLMs by whimsicalism on Tuesday April 11, 2023 @12:56PM (#35527853)
If they are amazing, then ChatGPT must be God-like in your view.

I've been underwhelmed by Alpaca and Alpaca-LORA and LLaMA all at 13B but I have not tried higher params.

Re:The Coming of Local LLMs by kbrkbr on Tuesday April 11, 2023 @01:18PM (#35528145)
In my opinion the problem with these is engineering a good prompt. I read of lots of people only getting nonsense or repetitions, and learned a bit from what they shared. These models are not chat bots.

Vicuna is more friendly in that regard.

But I’m well aware of their limitations also, and I can see how one can be underwhelmed. They are not jacks of all trades

Re:The Coming of Local LLMs by whimsicalism on Tuesday April 11, 2023 @01:21PM (#35528181)
Alpaca & Alpaca-LoRA are literally trained to be chat bots. Their goal is to be instruct-tuned.
Re:The Coming of Local LLMs by MacsHeadroom on Wednesday April 12, 2023 @12:37AM (#35535058)
Alpaca-LoRA, and all LoRas, are garbage. Alpaca is horrible compared to newer finetunes. Even cleaning the Alpaca dataset and retraining a cleaned Alpaca improves its performance greatly.

But newer finetunes like Vicuna go well beyond that, including hundreds of thousands of real human conversations with GPT-4 ChatGPT in the dataset (unlike Alpaca's fully synthetic dataset).

Vicuna-13B in 16bit is easily comparable to ChatGPT-3.5 in capability. Newer finetunes coming out nearly every day are going beyond chatGPT-3.5 and getting closer and closer to GPT-4 performance.

You don't even have to install anything to validate this for yourself. There's a live web demo of Vicuna-13B right here: https://chat.lmsys.org/ (disable ad blocker if it does not load)

Re:The Coming of Local LLMs by MacsHeadroom on Wednesday April 12, 2023 @03:16AM (#35536050)
Also, InstructGPT was released in January 2021 and Vicuna-13B blows it out of the water.
Re:The Coming of Local LLMs by yyyk on Tuesday April 11, 2023 @02:04PM (#35528818)
30B Alpaca is better. Not anywhere near ChatGPT level, but better than the 13B models.
Re:The Coming of Local LLMs by turmeric_root on Tuesday April 11, 2023 @02:29PM (#35529212)
I like using them for memeing