Hacker News
points by torben-friis 3 days ago | 0 comments
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?

[–] peterlk 3 days ago
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.
[–] billiam 3 days ago
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.
[–] giardini 3 days ago
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.

[–] jodrellblank 3 days ago
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

    # create HN user account
    # requires eye of newt and frog leg
    “Oh great spirit of the internet I request and command you make a new account…”
It’s a terrific amount of facts to be able to write even plausibly about tons of topics.
[–] giardini 3 days ago
We don't need LLMs that can "answer any question on any topic in a library"!

We don't even need machines that can answer any question in a specific topic area. But we could use machines that can answer "I don't know." when they cannot compute the answer.

Consider the possibility of much-smaller LLMs that answer questions only in limited domains (physics, chemistry, math, medicine, etc.)?

Could not such LLMs exist? If not, why not? Would they not likely be more useful and far, far easier and cheaper to create and run (possibly even with far less hardware) than the current "know-all" LLMs? Also might they possibly avoid certain problems ( e.g., hallucinations, deceit, apparently undesirable behavior, etc.) associated with the "know-all" LLMs we now have?

[–] jodrellblank 1 day ago
I do wonder if a medical LLM needs to know anything about popstars or films or classic literature. But your particular examples make me wonder how you could train an LLM to talk medically about "blood pressure" without knowing any physics about what pressure is, or any of the other ways the STEM subjects overlap and blend into each other without clear boundaries - chemistry of drugs, math of dose calculations, language of drug and disease naming etymology, etc.

If a patient with high blood pressure asks "will my face look like Dizzy Gillespie?" isn't it better to answer "No, that was air pressure and cheek damage" than to answer "I don't know who that is, call your doctor"?

[–] whatshisface 2 days ago
I feel the intuition leads us astray here because the combined text of every science book ever written is much less than the size of a complete description of the human brain. To the hamburger of reason the library is a sesame seed.
[–] reactordev 3 days ago
We need to up the ante, we all know it's the Mumbai Indians. ;)

One can train a decent model at home, for a specific task but you are absolutely correct that in order to have a model that's an expert in any topic it requires training and data on all topics.

[–] splatter9859 3 days ago
I nearly spit out coffee reading this. Amazing use of vocabulary; especially "... oh great spirit of the internet".

I sometimes jokingly explain to certain people not immersed in tech that sometimes saying the "magic words" (commands) from the "codex" (script) in the right sequence with a lot of hand waving allow "magic" (applications/web apps/etc.) to happen.

It generally brightens a patients day and makes things relatable to those non-technical, children, the elderly, or the like.

TLDR: thanks for the chuckle.

[–] tclancy 2 days ago
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?
[–] nextaccountic 2 days ago
We experience tons of data, but it's still much less than the pretraining step of LLMs

I think it's clear that LLMs are massively less intelligent than they could be, based on the amount of training data and compute they consume. Or rather, humans are orders of magnitude more efficient on training, and we don't know why

The answer is probably in the DNA. We are born highly intelligent and our brain is still growing. The DNA itself was optimized for billions of years

[–] tclancy 2 days ago
How have you quantified this that you are asserting it to me?
[–] nextaccountic 2 days ago
We have DNA though. It was subject to "pretraining" for billions of years. Alongside some epigenetic stuff

Maybe in the future we will have fewer robots interacting in the environment with continuous learning, to mimic the human experience, rather than a massive fleet of stateless, inference-only models

[–] ordersofmag 3 days ago
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.
[–] miki123211 3 days ago
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.

[–] viklove 3 days ago
Weird to put banking and trading on the same complexity level as medicine or ML.
[–] wanderingmind 3 days ago
Agreed trading and banking are social systems, more complex that biological systems
[–] nxobject 1 day ago
> more complex that biological systems

If that was the case, I wish that would translate itself to better understanding of dementia, as someone caretaking for a parent and at risk myself…

[–] potsandpans 3 days ago
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.

[–] ksh09 3 days ago
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.

[–] leonidasrup 2 days ago
Lot of effort and labor, not payed by commercial companies, went into your ability to compile and build from the source of most of the exciting cutting-edge software for free as a hobbyist. For example GCC:

" In late 1983, in an effort to bootstrap the GNU operating system, Richard Stallman asked Andrew S. Tanenbaum, the author of the Amsterdam Compiler Kit (also known as the Free University Compiler Kit), for permission to use that software for GNU. When Tanenbaum advised him that the compiler itself was not free, but rather only the university, Stallman decided to work on a different compiler. "

https://en.wikipedia.org/wiki/GCC

Also the whole reason for existence of GNU Project:

" According to Stallman, what prompted him to start the GNU Project was having previously had an experience with Xerox refusing to give him access to the source code of a laser printer used at the MIT Lab, now with the realization that this community of sharing software would end and noticing the advancing spread of proprietary software which had undone the culture of sharing software that had previously existed, Richard Stallman refused to adapt by continuing with proprietary software, and he instead decided that with this skills as an operating systems programmer, he would begin the development of a new free software operating system and to recreate a community of sharing software that was lost, called GNU. "

https://en.wikipedia.org/wiki/GNU

[–] fantispug 3 days ago
> 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, ...

[–] danielmarkbruce 3 days ago
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.
[–] torben-friis 3 days ago
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.

[–] kadoban 3 days ago
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.

[–] danielmarkbruce 3 days ago
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.
[–] throwaway219450 3 days ago
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.

[–] myegorov 3 days ago
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.
[–] dominotw 3 days ago
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.
[–] dtf 3 days ago
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...

[–] danielmarkbruce 3 days ago
You don't need to code to follow it, just read along
[–] ordersofmag 3 days ago
I read it in a cabin on a lake, far from any internet access, and without a computer. I still found it quite useful.
[–] 384028345 3 days ago
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[

[–] captainclam 3 days ago
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.

[–] reedwhistle 3 days ago
Ive been interested in exploring other domains as well, including biology, genomics, etc. Do you have any recommendations on where to get started?
[–] iqbal1980 2 days ago
Computer science turned bioinformatitian and AI engineer here. I have a BSc in Computer science since 2002 in 2013 I decided to start a Master in Bioinformatics and Computational biology and in 2018 did a PhD. Since my background is in CompSci, first before I started the master I just bought some popular science books about genetics, and biology the kind of books you see in bookstores like Barnes & Nobles, nothing too specialized. Then watched some videos about some things like Biochemistry, Genetics, DNA replication etc... then what really made a difference is taking a Mollecular Biology course, the one I took prepared me with all the pre-requisites and the book I used in the course are these : Essencial cell biology https://wwnorton.com/books/9781324033356

I feel that this book is clearly written and will give you all prerequisites to continue in a biotech, bioinformatics, computational biology or even biology graduate program if you come from a different discipline.

Good luck!

[–] globular-toast 3 days ago
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.
[–] russli1993 3 days ago
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.

[–] CamperBob2 3 days ago
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.

[–] yunwal 3 days ago
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
[–] bityard 3 days ago
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.

[–] CamperBob2 3 days ago
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.

[–] Krei-se 3 days ago
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.

[–] globular-toast 3 days ago
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.
[–] micoti 1 day ago
I am interested in this. Could you provide more info?

I know it is not related but I don't like any current available solution and also hate excell/sheets but used LLMs to handle this part for me so I can better organize my finances

[–] globular-toast 1 day ago
Sure. I use ledger so everything is plain text. The idea is I classify each transaction in my bank statement to work out what the "other side" of the transaction is. It could be an expense account like "Expenses:Groceries" or another asset like "Assets:Vanguard" or something.

I train an SVM on my previous year's ledger, then it interactively goes through the CSV bank statement showing the prediction for each transaction, and allows me to quickly change it if I don't agree, using fuzzy completion. I used scikit-learn for the machine learning. It's not "production grade" or anything, but it really doesn't matter.

All the code is here in case it's useful: https://github.com/georgek/accounts But it's very much made for me. It was all about making something with low enough friction that I'd actually use it. It won't necessarily work for anyone else. I'd imagine an LLM could pop out something very similar these days, but you wouldn't learn anything in the process, of course.

[–] micoti 23 hours ago
Thank you very much
[–] teravor 3 days ago
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.
[–] octoberfranklin 3 days ago
This.

Don't try to pretrain from scratch. Take an already-trained Qwen and give it new powers.

[–] ramity 3 days ago
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.
[–] catfood 3 days ago
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.
[–] sjdh76 2 days ago
To find good applicable problems you have to be inside or close to an eco system that is constantly working on these problems. Otherwise its like Napolean Dynamite trying to make Star Wars in Idaho because Uncle Rico gave him a free camera and Kip gave him an article about George Lucas. Got to move closer to Hollywood Napolean.
[–] esFran 2 days ago
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

[–] elzbardico 3 days ago
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.

[–] tracerbulletx 3 days ago
Try making a smaller classifier model for some random problem you have that's immediately useful and doesn't exist yet.
[–] dbtc 2 days ago
It may be inherent. Perhaps comparable to understanding/building a practical CPU.