Lurker News
I've been playing around with https://github.com/zphang/minimal-llama/ and https://github.com/tloen/alpaca-lora/blob/main/finetune.py, and wanted to create a simple UI where you can just paste text, tweak the parameters, and finetune the model quickly using a modern GPU.

To prepare the data, simply separate your text with two blank lines.
There's an inference tab, so you can test how the tuned model behaves.
This is my first foray into the world of LLM finetuning, Python, Torch, Transformers, LoRA, PEFT, and Gradio.
Enjoy!

Comments (98) 20 threads

Show all comments

Showing thread 1 of 20

syntaxing1 reply#
Is there any library that allows you to train with a Mac M1/M2? I know it will be slower but I rather spend money on a Mac Studio rather multiple graphic cards to get around the VRAM limitation.
speedgoose3 replies#
For training you could rent a GPU server for a short period.
te_chris1 reply#
Or use something like google vertex to run a docker job on gpus
tysam_and3 replies#
Personally I would recommend Colab or another notebook environment like a Lambda machine.

Much cheaper, and simpler than a bare metal machine, data ingress/egress is hard though for Colab you can just mount a Gdrive.
Unfortunately the API for training on M* chips (via MPS) is apparently still extremely buggy, so we have a ways to go before that is fully mainstream. And yes, I know that PyTorch just mainlined their mps support last week too...but from what I've heard the low level interface itself still needs some work. D:

nwoli2 replies#
Just fyi colab is way way more expensive now after the “credits” update than it was a year ago. Lamdalabs is about as cheap at this point

Continue this thread — 2 replies

lxe#
So hard I’ve been using lambda labs, vast.ai, and runpod to rent machines. A 3090 is about 30 cents an hour.
te_chris1 reply#
Vertex has a training service, rather than spinning up a notebook. If you can dockerize the training job you just need to upload the container and data to gcs then it’s point and click to run once - assume it’s some sort of kubeflow or whatever in the background.
tysam_and1 reply#
That sounds nice for the more involved big runs. I'll try to take a look at it sometime. I have some training runs that loop in just under 7 seconds at the shortest for the actual training portion of the run (maybe 9-10 including notebook spinup). After doing this for so many years, I've found that keeping it as short as humanly possible is usually the way to go. :D

That said, I can definitely take a look at it for scale once I need to go over something like 1-2 hours maybe! :D

te_chris#
Yep, definitely best to do somewhere else if you can and just need to iterate, but it’s a good option when you have to do a big one and eat some real GPU time.
tempaccount4201 reply#
Renting is always less economical than owning. You can always sell your Apple Studio and still pay less.
qeternity#
Perhaps on a per unit basis. But there's a reason I buy steaks and not cows.
flemhans#
Data will transmit to a third party, which may be a problem in some usecases