6 ms·
Using PyTorch is not "LLMs from the ground up". It's a fine PyTorch tutorial but let's not pretend it's something low level.
by alecco 2y ago
Using PyTorch is not "LLMs from the ground up".
It's a fine PyTorch tutorial but let's not pretend it's something low level.
- chuckSu 2y ago[dead]
- menzoic 2y agoIs this a joke? Can’t tell. OpenAI uses PyTorch to build LLMs
- jnhl 2y agoYou could always go deeper and from some points of view, it's not "from the ground up" enough unless you build your own autograd and tensors from plain numpy arrays.
- 0cf8612b2e1e 2y agoNumpy sounds like cheating on the backs of others. Going to need your own hand crafted linear algebra routines.
- TZubiri 2y agoSource please?
- leobg 2y agoPeople think of the Karpathy tutorials which do indeed build LLMs from the ground up, starting with Python dictionaries.
- krmboya 2y agoFrom scratch is relative. To a python programmer, from scratch may mean starting with dictionaries but a non-programmer will have to learn what python dicts are first. To someone who already knows excel, from scratch with excel sheets instead of python may work with them.
- wredue 2y agoFor the record, if you do not know what a dict actually is, and how it works, it is impossible to use it effectively. Although if your claim is then that most programmers do not care about being effective, that I would tend to agree with given the 64 gigs of ram my basic text editors need these days.
- carlmr 2y ago>For the record, if you do not know what a dict actually is, and how it works, it is impossible to use it effectively. While I agree it's good to know how your collections work. "Efficient key-value store" may be enough to use it effectively 80% of the time for somebody dabbling in Python. Sadly I've met enough people that call themselves programmers that didn't even have such a surface level understanding of it.
- atoav 2y agoNo it is not. From scratch has a meaning. To me it means: in a way that letxs you undrrstand the important details, e.g. using a programming language without major dependencies. Calling that from scratch is like saying "Just go to the store and tell them what you want" in a series called: "How to make sausage from scratch". When I want to know how to do X from scratch I am not interested in "how to get X the fastest way possible", to be frank I am not even interested in "How to get X in the way others typically get it", what I am interested in is learning how to do all the stuff that is normally hidden away in dependencies or frameworks myself — or, you know, from scratch. And considering the comments here I am not alone in that reading.
- kenjackson 2y agoYour definition doesn’t match mine. My definition is fuzzier. It is “building something using no more than the common tools of the trade”. The term “common” is very era dependent. For example, building a web server from scratch - I’d probably assume the presence of a sockets library or at the very least networking card driver support. For logging and configuration I’d assume standard I/o support. It probably comes down to what you think makes LLMs interesting as programs.
- atoav 2y agoIt is okay to differ on this. Language is not an exact science. It is however always good to factor in expectations when you describe things. E.g. when a title says it shows you how to do a thing in vanilla javascript from scratch bringing in jquery in the first step makes that tile a lie. If you bring in a hefty dependency on step 1 and run three imported function the vanilla javascript part might be fine, but the from scratch starts to do some heavy lifting.
- SirSegWit 2y agoI'm still waiting for an assembly language model tutorial, but apparently there are no real engineers out there anymore, only torch script kiddies /s
- sigmoid10 2y agoPfft. Assembly. I'm waiting for the real low level tutorial based on quantum electrodynamics.
- oaw-bct-ar-bamf 2y agoAutomotive actually uses ML in plain c with some inline assembly sprinkled on top run run models in embedded devices. It’s definitely out there and in productive use.
- mdp2021 2y ago> ML in plain c Which engines in particular? I never found especially flexible ones.
- wredue 2y agoIronically, slippery slope argumentation is a favourite style of kids. Unfortunately, your argument is a well known fallacy and carries no weight.
- bvrmn 2y agoIt's a natural response for "No true Scotsman" in the parent.
- botverse 2y ago#378
- alecco 2y agoI'll write a guide "no-code LLMs in CUDA".
- jb1991 2y agoLearn to play Bach: start with making your own piano.
- defrost 2y agoBach (Johann Sebastian .. there were many musical Bach's in the family) owned and wrote for harpsichords, lute-harpsichords, violin, viola, cellos, a viola da gamba, lute and spinet. Never had a piano, not even a fortepiano .. though reportedly he played one once.
- generic92034 2y agoHe had to improvise on the Hammerklavier when visiting Frederick the Great in Potsdam. That (improvising for Frederick) is also the starting point for the later creation of https://en.wikipedia.org/wiki/The_Musical_Offering https://en.wikipedia.org/wiki/The_Musical_Offering .
- vixen99 2y agoWe know what he meant.
- jb1991 2y agoYes, I know, but that’s irrelevant. You can replace the word piano in my comment with harpsichord if it makes you happy.
- jahdgOI 2y agoPianos are not proprietary in that they all have the same interface. This is like a web development tutorial in ColdFusion.
- maleldil 2y agoAre you implying that PyTorch is proprietary?
- jb1991 2y agoWe’re digressing to get way off the whole point of the comment, but to address your point, actually piano design has been an area of great innovation over the centuries, with different companies doing it in considerably different ways.
- deleted 2y ago[deleted]
- atoav 2y agoWanted to say the same thing. As an educator who once gave a course on a similar topic for non-programmers you need to start way, way earlier. E.g. 1. Programming basics 2. How to manipulate text using programs (reading, writing, tokenization, counting words, randomization, case conversion, ...) 3. How to extract statistical properties from texts (ngrams, etc, ...) 4. How to generate crude text using markov chains 5. Improving on markov chains and thinking about/trying out different topologies Etc. Sure markov chains are not exactly LLMS, but they are a good starting point to byild a intuition how programs can extract statistical properties from text and generate new text based on that. Also it gives you a feeling how programes can work on text. If you start directly with a framework there is some essential understanding missing.
- BaculumMeumEst 2y agoI really like Sebastian's content but I do agree with you. I didn't get into deep learning until starting with Karpathy's series, which starts by creating an autograd engine from scratch. Before that I tried learning with fast.ai, which dives immediately into building networks with Pytorch, but I noped out of there quickly. It felt about as fun as learning Java in high school. I need to understand what I'm working with!
- krmboya 2y agoMaybe it's just different learning styles. Some people, me included, like to start getting some immediate real world results to keep it relevant and form some kind of intuition, then start peeling back the layers to understand the underlying principles. With fastAI you are already doing this by the 3rd lecture. Like driving a car, you don't need to understand what's under the hood you start driving, but eventually understanding it makes you a better driver.
- BaculumMeumEst 2y agoFor sure! In both cases I imagine it is a conscious choice where the teachers thought about the trade-offs of each option. Both have their merits. Whenever you write learning material you have to decide where to draw the line of how far you want to break down the subject matter. You have to think quite hard about exactly who you are writing for. It's really hard to do!
- jph00 2y agoYou seem to be implying that the top-down approach is a trade off that involves not breaking down the subject matter into as lower level details. I think the opposite is true - when you go top down you can keep teaching lower and lower layers all the way down to physics if you like!
- jph00 2y agofast.ai also does autograd from scratch - and goes further than Karpathy since it even does matrix multiplication from scratch. But it doesn’t start there. It uses top-down pedagogy, instead of bottom up.
- delano 2y agoIf you want to make an apple pie from scratch, first you have to invent the universe.
- CamperBob2 2y agoAfter watching the Karpathy videos on the subject, of course.
- _giorgio_ 2y agoYour comment is one of the most pompous that I've ever read. NVDIA value lies only in pytorch and cuda optimizations with respect with pure c implementation, so saying that you need go lower level than cuda or pytorch means simply reinventing Nvidia. Good luck with that
- alecco 2y ago1. I only said the meaning of the title is wrong, and I praised the content 2. I didn't say CUDA wouldn't be ground up or low level (please re-read) (I say in another comment about a no-code guide with CUDA, but it's obviously a joke) 3. And finally, I think your comment comes out as holier than thou and finger pointing and making a huge deal out of a minor semantic observation.
- _giorgio_ 2y agoThere's always a lower level, until there's not. Pytorch is low level enough to understand and interpret each and every passage. In pytorch, you can use builtin transformers, or code them yourself down to the "lowest" level in which there's still a theoretical meaning. So pytorch is just a tool and your comment was just pompous and empty.
- nerdponx 2y agoLow level by what standards? Is writing an IRC client in Python using only the socket API also not "from scratch"?
- badsectoracula 2y agoConsidering i seem to be the minority here based on all the other responses the message you replied to, the answer i'd give is "by mine, i guess". At least when i saw the "Building LLMs from the Ground Up" what i expected was someone to open vim, emacs or their favorite text editor and start writing some C code (or something around that level) to implement, well, everything from the "ground" (the operating system's user space which in most OSes is around the overall level of C) and "up".
- nerdponx 2y agoThe problem with this line of thinking is that 1) it's all relative anyway, and 2) The notion of "ground" is completely different depending on which perspective you have. To a statistician or a practitioner approaching machine learning from a mathematical perspective, the computational details are a distraction. Yes, these models would not be possible without automatic differentiation and massively parallel computing. But there is a lot of rich detail to consider in building up the model from first mathematical principles, motivating design choices with prior art from natural language processing, various topics related to how input data is represented and loss is evaluated, data processing considerations, putting things into context of machine, learning more broadly, etc. You could fill half a book chapter with that kind of content (and people do), without ever talking about computational details beyond a passing mention. In my personal opinion, fussing over manual memory management is far afield from anything useful unless you want to actually work on hardware or core library implementations like Pytorch. Nobody else in industry is doing that.
- wredue 2y agoGluing together premade components is not “from the ground up” by most people’s definition. People are looking at the ground up for a clear picture of what the thing is actually doing, so masking the important part of what is actually happening, then calling it “ground up” is disingenuous.
- bvrmn 2y agoIn LLMs context pytorch.nn is low level. It's a crucial thing in education to not operate on too many abstraction levels.
- cruffle_duffle 2y agoNot just education but real life engineering too.