I've got a question. I'm having a bit of trouble phrasing it, so please don't assume I'm against learning for learning's sake, that's not the point.
Whenever I've tried to learn about LLMs, machine learning, etc. I always come out with a bad feeling, compared to learning about software.
Theoretical courses make me feel like it's all baby steps, unless you assume a level of commitment equivalent to a math degree. Practical/applied stuff seems to require levels of compute, training data, etc. that make it unapproachable for a home hacker for everything beyond basic exercises like a handwritten digit classifier.
Now this feeling of "impracticality" is perfectly fine. It would be the expected outcome if I was taking a course on classic literature or modern art. But machine learning stuff feels like it could have room for learning-by-doing applications that aren't entirely pointless, so I wonder if there's some way to approach the topic I'm simply not finding.
Did anyone have the same experience? any tips if so?
Machine learning is more like biology, physics or law than like CS or math.
In the software engineering world, we're accustomed to the reality that to do great work, all you need is a sharp mind and a cheap laptop. Better tools help, but aren't really a necessity. You could probably become a top-notch Linux kernel engineer with nothing but dedication and self-study, a $300 laptop and a shabby apartment with internet access.
You just can't really learn ML that way, just like you can't do it with banking, professional trading or medicine.
> Practical/applied stuff seems to require levels of compute, training data, etc. that make it unapproachable for a home hacker for everything beyond basic exercises like a handwritten digit classifier.
Compute is only an issue if you want to train large foundational models from scratch. You can easily train non-neural models on CPU, and fine-tune smaller models (say <4B) on a commodity GPU.
For training data there's lots of datasets online (like Kaggle), but you can build your own and can label things yourself or get a language model to label them for you. Getting good data is the hardest part of ML so this is a good exercise.
Then do some hobby projects: classify whether your photos contain a photo of you or a particular friend/family member, predict the expense category from bank transaction exports, classify your emails into categories, extract book recommendations from Hacker News, ...
Get Sebastian's book and build an LLM from scratch. The problem with most textbooks (on any subject, it's not unique to ML/AI) is they usually try to build the theoretical foundations first. In many cases things are better taught top down.
I completely understand where you're coming from. While understanding the math and architectures of these large models can be edifying, it lacks some of the liberating/empowering spirit of traditional software. You can build a bespoke to-do app that is better suited to your needs than anything produced by some productivity software company, but you're totally beholden to one of the few big players for access to an effective LLM.
But there is so, so much interesting work and research to do at a much smaller scale. I work on drug discovery models, and none of my work requires data or infrastructure that are not generally accessible to the public (it's nice to have the computing resources of my institution but there are other ways to access a GPU).
So if you are really interested in this stuff, I would suggest looking at the endless supply of interesting problems in domains that are not dominated by huge frontier labs.
I have the books on my shelf for 5 years now and never encountered the need to build an AI so i haven't touched it yet. Don't feel bad about using AI to learn but not build one.
You can google stuff to learn without the need to build a search engine too.
I have however learned a lot about math! And other related stuff. I'd argue if you extend your low level skills in math and code when the need for an AI comes up, simple weather / sales forecast, who knows, you'll have an easier time building one.
In my experience, until you implement the math of a NN in numpy or something similar, it's easy to feel like a library is abstracting something away from you. Many people in ML focused academia stand on those libraries. They may conceptually understand chain rule but do not manually implement the math. The same feeling exists for encryption. There is a culture of shying away from rolling out your own ops, so it can easily feel like your understanding is segmented to some degree.
I think it's one of those things where you have to work in the field to really get it and be productive. You just don't have the time or resources otherwise.
Several years ago I put together a classifier for putting my bank account statements into categories (groceries, housing etc). I use it for doing my accounts and budgeting. Maybe you have a similar problem? There are still lots of applications for small classifiers, you don't need a SOTA LLM for everything.
if you are willing to put in the work you can devise a hyper specialization for which you can create an RL playground (which is likely absent in the frontier labs), then you can obtain cutting edge results on it by post training an open weights model using minimal resources.
Try making a smaller classifier model for some random problem you have that's immediately useful and doesn't exist yet.
But machine learning stuff feels like it could have room for learning-by-doing applications that aren't entirely pointless, so I wonder if there's some way to approach the topic I'm simply not finding.
That's what Karpathy's videos are for. You end up with a GPT-2.0 equivalent if you follow them to the end.
I feel the same. I feel machine learning is 1) you need strong math knowledge but also intuition. 2) You need actual production level data, a lot of the nuances of machine learning, applied scientists' roles are how to build strong models with real world, messy, inconvenient data. You need to apply various techniques and not just memorize a specific formula.
Compared to software coding, you build websites, apps etc. The barrier to entry is much higher.
I am trying to pivot into machine learning myself, so far my understanding is try to find a software engineer role where you deal with data, model infra, data pipeline, etc. Then within the same company, try to do more modeling work and build intuition and resume credentials in this area. Someone correct me if I am wrong.
Machine learning IS applied mathematics, especially statistics, probability, and optimization. Period.
The "baby steps" are not there just for intelectual satisfaction, the baby steps give you the building blocks to understand things that become progressively more complex. The baby steps are tools, that once you get familiar with them, you'll find new and new uses everywhere.
A good practical illustration of this: It is pretty hard to figure out how differential equations can be useful if you don't understand what they are. And yet, I bet that on january of 2020, there was at least one math teacher deep down in the amazonian jungle playing with a compartimental model based on a system of ordinary differential equations, to figure out the diverse scenarios this new epidemic could play out if that scary new virus escaped China and those few cruise ships.
Another example: take the concept of backpropagation: the underlying idea behind it is the chain rule from calculus, used to work backward through a computation and calculate how each parameter affects the error. Now, it is way easier to understand it in a small CNN that you are training to recognize handwritten digits than trying to understand it in the context of a full transformer model. A digit classifier is something that is way easier and affordable for you to fiddle with stuff and develop and intuition on loss functions, gradients, backpropagation and overfitting.
[flagged]
I think this is an outcome of playing with systems that we don’t actually understand very well on a deep level. We have found recipes that work, and have used graduate descent (so many PhD theses) to understand and optimize these systems, but we’ve built a model of language that also encodes reasoning, and those things are extraordinarily complex. Providing proper mathematical rigor for their explanation requires, as you say, the level of commitment equivalent to a math degree. Also, because language is so complicated and subtle, you need highly precise statistical models of it, and that just takes a shitload of data; hence the scale. You can train toy models at home, but they will suck because you actually need massive amounts of data to capture the nuance that language requires. And that’s to say nothing of multimodal models.