Comment by torben-friis
17 hours ago
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?
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.
I think the level of interaction on forums like HN is a great example of the still-yawning gulf between LLMs and humans when it comes to encoding reasoning into language. Even with the self-selection that comes with posting here, think of how many times it is almost impossible to tell if posters are shit-posting, serious, angry, sock puppets, or just weird.
You say "...because you actually need massive amounts of data to capture the nuance that language requires..." but humans don't require that! So why do LLMs?
How many books did you read in your education? Far fewer that what LLMs read, no doubt. Of course we "have a life" and so we interact with hundreds of people, which is also a form of learning.
But in any case there's are fundamental differences here between these two systems (LLMs and humans) that we have not yet discerned clearly.
Humans don’t need that? How many words have you taken in from all possible sources by the time you’re 18? And many of those words came with additional data due to tone of voice, inflection and context. And then some of those (in-person, filmed art) came with incredibly subtle data from body language and facial expressions. I think we take in a massive corpus of data every year. Think just of any book you re-read: why did you do it? Did you glean additional insight?
Far fewer than an LLM but then I “know” far less than an LLM. Sam Altman talked about a PhD level expert on any topic; if we expect a SOTA model to answer any question on any topic in a library, presumably that requires a library worth of books go into it?
Say I ask it who are the most beloved Indian cricketers and why, it might not be correct but it will have the right vocabulary - cricket terms and gameplay I’ve not heard of, player names and styles I don’t recognise, things critics and commentators like and dislike about game strategies. And it is like that for almost any topic.
If they hallucinate a Python function, it will look like a plausible function e.g. “hn.create_user_account()”. They don’t hallucinate like
It’s a terrific amount of facts to be able to write even plausibly about tons of topics.
4 replies →
I think it's more accurate to say that the fundamental differences (between LLM's and humans) are abundantly clear and what we haven't really got a handle on are the similarities. Why is it that an LLM's can so convincingly mimic some things that humans do? Of course the fact that we don't really understand how humans do it in the first place is a real barrier. Perhaps looking at the intersection will shed some light on how humans work.
Yes. That's why I'm studying a Master on AI!!
But you know what? There's a little secret. The whole bunch of tech consultants will throw everything and that,s all friends. And sadly, it will work.
Also, I believe that there are many bottlenecks because many parte are written in Python and by not so good programemos where you and ohters can shine
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.
Kind of sounds like a truism. You make the claim, but you don't explain why. Also, the analogies at the end are... odd.
Maybe you are right! I'd like to hear the justifications more though.
Simply put, I could compile and build from the source of most of the exciting cutting-edge software for free as a hobbyist once I own the computer.
But I can't do the same for things that excite me in this DL domain, even running pretrained models requires hardware that most hobbyists can't afford.
Cloud solutions exist but unlike traditional dev where we could test almost everything about the application locally, only thing unsolved was deployment and distribution in some cases, which is a sensible spend on infrastructure.
1 reply →
Weird to put banking and trading on the same complexity level as medicine or ML.
Agreed trading and banking are social systems, more complex that biological systems
> 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'm OK going through the learning itself (will definitely check out the book though, since it's so well liked!). The question is more, what do you do with that once the book or course is done?
For a junior coder, there's usually a path to recommend, joining some open source project or doing some home scripting, etc. Something where you can be useful even if it's not your full time job.
I'm wondering whether there's some similar hobbyist path available here, or whether there's too much of a jump between the educational/pop sci stuff and the professional realm. If it's the second, that's also fine, I just want to know if I'm missing something.
One practical-ish thing you could reasonably do with this (beyond just better understanding how models work so you can make better choices/tradeoffs), is post-train some of the small-to-medium models, fine-tune them on your own data or priorities.
You don't need to change many weights, relatively, to add capabilities or modify behavior. Look up LoRas for instance.
I'm of the opinion that post-training existing models is an area with a lot of benefit and fun in the near future (it's already being done here and there of course).
I doubt you _really_ have to know everything in this course to know how to do that, but I'd want this as background personally for it.
You included machine learning in with LLMs in your root post. Try training a supervised model for some task, like an image classifier or a detector. LLMs have not replaced convolutional models, and even transformers can be used for non-NLP tasks. The idea this is somehow not professional is not true. Despite what people would have you believe, ResNet50 fine-tuned on a good dataset is still competent. In many environments there isn’t enough compute for bigger models, and large language models aren’t always the best choice.
You also don’t have to go straight into LLMs. You can learn most of the training mechanics via classic deep learning. It isn’t much different with LLMs except the training data and losses are specific and the models are much larger.
The comment below/above is right. Pre-training isn't the path (but you really do need to learn how it's done). Learn how it works, learn the architecture, then take models and do post training. Fine tuning and RL on them. There was a fun/clever/useless project recently posted here about building a terminal emulating model thing, as an example.
In many cases if you follow a recipe without understanding you're no better off in the end. In cooking at least you can have a cake and eat it too.
i am actually looking for a book that follows like sebastian books but without any hands on coding . i am hoping to read in bed.
There's a note in Sebastian Raschka's LLMs-from-scratch github repository - "Recommendations for Getting the Most Out of a Technical Book".
He recommends reading offline and code-free first (although chapter-by-chapter).
https://github.com/rasbt/LLMs-from-scratch/blob/cdbd33e6d57a...
You don't need to code to follow it, just read along
1 reply →
Ask and... ye shall receive! Check out `Hands-On Large Language Models: Language Understanding and Generation`.
...I wanna mention this book as well, although it doesn't fit the criteria: https://www.thelittlelearner.com[
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.
Ive been interested in exploring other domains as well, including biology, genomics, etc. Do you have any recommendations on where to get started?
For genomics, look into viruses, in particular RNA viruses like influenza and HIV. You can fit the entire genome on your screen and learn to read it like code! There are some good text books about viruses that include genomics from scratch (I can't find the one I used now but could look later if you're interested). My advice would be to learn the biology first and understand why we care about genomes before looking into the computational stuff.
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.
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.
This.
Don't try to pretrain from scratch. Take an already-trained Qwen and give it new powers.
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.
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.
This is still pointless though. I mean it's valuable from a learning perspective but the parent is saying they want to contribute somehow. You can only learn so much from toy examples
Once you learn how an LLM works, you can likely _begin_ to contribute meaningfully to numerous open-source AI projects: inference engines, training frameworks, etc. Or try to find an area of AI that is lacking research and start your own experiments. Or (potentially) go to work for a company doing similar or adjacent work.
Opportunity knocks, but you have to build the door first.
The prereqs aren't as extensive as people fear, but they are important. Starting out by building a scratch-trained GPT3-scale model is always an option, but anyone who's going to succeed at that doesn't need to watch any YouTube videos.
For the rest of us, the sense of discovery that we get from training and running toy models is a big part of the reward. This stuff is not an exact science, at least not yet, so time spent building intuition with small-scale models is an incredibly important part of the learning process. Not pointless at all.
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]