News for hackers. Stuff that matters.
Re:All You Need Is 4x 4090 GPUs to Train Your Own Model by _just7_ on Saturday December 28, 2024 @06:11PM (#42535692)
I would be much more intrested in a piece on what you can train with this kind of rig, rather than the rig itself
Re:All You Need Is 4x 4090 GPUs to Train Your Own Model by minimaxir on Saturday December 28, 2024 @06:24PM (#42535770)
The bottleneck for most model training sizes is VRAM, and since each 4090 has 24 GB VRAM, that's 96 GB VRAM total. The article mentions that it can train LLMs from scratch up to 1 billion hyperparameters, which tracks.

Nowadays that's not a lot: a single H100 that you can now rent has 80 GB VRAM, and doesn't have the technical overhead of handling work across GPUs.

Re:All You Need Is 4x 4090 GPUs to Train Your Own Model by sabareesh on Saturday December 28, 2024 @06:37PM (#42535876)
Definitely agree but part of the reason why i built this to learn about all the overhead and gotchas
Re:All You Need Is 4x 4090 GPUs to Train Your Own Model by Bancakes on Saturday December 28, 2024 @10:09PM (#42537122)
I doubt the RAM is added up. I think that’s only a feature reserved for their NVLinked HPC series cards. In fact, without nvlink, I don’t see how you’d connect them together to compute a single task in a performant and efficient way.
Re:All You Need Is 4x 4090 GPUs to Train Your Own Model by minimaxir on Sunday December 29, 2024 @12:54AM (#42537927)
It depends on how the parallelism is implemented, e.g. distributed data parallel (DDP) to synchronize gradients: https://pytorch.org/tutorials/intermediate/ddp_tutorial.html

It's a rabbit hole I stay away from for pragmatic reasons.

Re:All You Need Is 4x 4090 GPUs to Train Your Own Model by whimsicalism on Sunday December 29, 2024 @12:12PM (#42541224)
yeah essentially this
Re:All You Need Is 4x 4090 GPUs to Train Your Own Model by tmostak on Saturday December 28, 2024 @10:19PM (#42537182)
You should be able to train/full-fine-tune (i.e. full weight updates, not LoRA) a much larger model with 96GB of VRAM. I generally have been able to do a full fine-tune (which is equivalent to training a model from scratch) of 34B parameter models at full bf16 using 8XA100 servers (640GB of VRAM) if I enable gradient checkpointing, meaning a 96GB VRAM box should be able to handle models of up to 5B parameters. Of course if you use LoRA, you should be able to go much larger than this, depending on your rank.
Re:All You Need Is 4x 4090 GPUs to Train Your Own Model by llm_nerd on Saturday December 28, 2024 @10:39PM (#42537307)
Is there a reason you used hyperparameters rather than parameters? I was going to politely correct the terminology but you seem to be in AI for some time so either it was a mistype or I am misunderstanding what you are referencing.
Re:All You Need Is 4x 4090 GPUs to Train Your Own Model by didgeoridoo on Saturday December 28, 2024 @11:05PM (#42537431)
I imagine that when you get really deep into model training, it can seem like there are a billion hyperparameters you have to worry about.
Re:All You Need Is 4x 4090 GPUs to Train Your Own Model by minimaxir on Sunday December 29, 2024 @12:50AM (#42537905)
It's a force of habit, parameters would be more accurate (almost everyone uses them interchangeably nowadays)
Re:All You Need Is 4x 4090 GPUs to Train Your Own Model by unixpickle on Sunday December 29, 2024 @01:56AM (#42538189)
Wait what? Who actually calls trainable params "hyperparameters"? Nobody at OpenAI does, as far as I know.
Re:All You Need Is 4x 4090 GPUs to Train Your Own Model by minimaxir on Sunday December 29, 2024 @02:04AM (#42538240)
People who are making quick social media posts while taking a casual walk outside on websites that don't make it easy to edit posts and are not expecting to be nitpicked about it.

Overall, it's something I've seen very often on social media and less technical articles about LLMs. OpenAI would fall into the "almost" category.

Re:All You Need Is 4x 4090 GPUs to Train Your Own Model by llm_nerd on Sunday December 29, 2024 @12:31PM (#42541349)
It's okay to say that you mistyped or whatever, while taking a casual walk outside on websites that don't make it easy to edit posts and are not expected to be nitpicked about it. Throwing in that everyone uses them interchangeably, however, is just profoundly wrong on every level.

I wasn't nitpicking. It is a HUGE differentiation, and I pointed it out specifically because people pick up on terminology so people who might not know better will go forward and just drop in the more super duper hyperparameter, not realizing that it makes them look like they don't know what they're talking about. As I said in the other post, no one who knows anything uses them interchangeably. It is just completely wrong.

Re:All You Need Is 4x 4090 GPUs to Train Your Own Model by minimaxir on Sunday December 29, 2024 @03:42PM (#42542886)
Again, I've heard and used the terminology "model hyperparameter" in place of "model parameter", and I've also heard "model parameter" in place of "model hyperparameter" because not every human interaction is a paper on arXiv and the terms are obviously very similar. The context of the term is what matters in the end (as demonstrated by other comments following my correct intent), and society will not crumble if using either term incorrectly in casual conversation. No one intentionally uses the wrong term, but as jokingly said in another comment "when you get really deep into model training, it can seem like there are a billion hyperparameters you have to worry about."

You are the one who asked for my opinion based on my extensive time in AI, you can choose to believe it or not.

Re:All You Need Is 4x 4090 GPUs to Train Your Own Model by sabareesh on Saturday December 28, 2024 @06:25PM (#42535777)
Here is some additional journey apart from the rig. https://sabareesh.com/posts/llm-intro/
Re:All You Need Is 4x 4090 GPUs to Train Your Own Model by layer8 on Saturday December 28, 2024 @07:19PM (#42536175)
How long does training a 1B or 500M model take approximately on the 4-GPU setup? Or does that dramatically depend on the training data? I didn’t see that info on your pages.
Re:All You Need Is 4x 4090 GPUs to Train Your Own Model by sabareesh on Saturday December 28, 2024 @08:22PM (#42536532)
Roughly it takes 7 days to train on 100B tokens on 500M model
Re:All You Need Is 4x 4090 GPUs to Train Your Own Model by paxys on Saturday December 28, 2024 @10:28PM (#42537245)
And where you get the training data from.
Re:All You Need Is 4x 4090 GPUs to Train Your Own Model by sabareesh on Saturday December 28, 2024 @10:30PM (#42537257)
Start with FineWebEdu