upvote
There's a Manning book on creating your own LLM from scratch which answers your question exactly. There's another book from the same publisher specifically about small language models for specialty purposes.
reply
Technically, you could do that, but we trained this one from the ground up!
reply
That sounds like an enormously expensive exercise.
reply
As someone who's done something similar (https://blog.lukesalamone.com/posts/creating-tiny-semantic-s...) the expensive part wasn't the training itself but the data curation and evaluation post-training. For this, getting a reasonable distribution of tool calls when the tool call can be anything isn't easy.

Once you have that, the model is small enough batch sizes are probably enormous and training can probably be done on a consumer-grade GPU in a week or less. Or even faster on a bigger GPU.

reply
At <50M parameters, training costs are completely trivial. You'll spend a lot more on your rent this month.
reply
Haha, my rent is cheap lol
reply
Training scales pretty badly, so smaller models like this are really not that bad in terms of cost.
reply
You can train a model of this size on your laptop in a day.
reply
Another option for something this small and narrowly specialized could be to get traditional LLMs to synthesize the training data. Model collapse is probably less of an issue at this size relative to terabyte sized models.
reply
Your thinking is correct haha
reply