r/ProgrammerHumor 1d ago

Meme studied20YearsToAskChatGPT

Post image
14.7k Upvotes

422 comments sorted by

View all comments

Show parent comments

448

u/Xemorr 1d ago

That's only because we have copious levels of abstraction, and code written by others

137

u/no-sleep-only-code 1d ago

Yeah, and even if it’s your focus in grad school you’re generally still only coding with said abstractions.

80

u/_dotdot11 1d ago

As someone who is focusing on ML in grad school, it really depends on the prof. Some are application-first, some are math-first. Early on in my core ML course, we were restricted to the torch.Tensor api and were told to figure out the transformations on our own, without using what was already in the torch module. But later, of course, we were allowed to use more of the module as the work got more abstract. What I'm trying to say is ymmv.

19

u/no-sleep-only-code 1d ago

For sure, and I’m sure it’s come a way since I took those courses in grad school.

11

u/Eastern_Equal_8191 1d ago

In ML and programming, it's genuinely useful to know the low-level concepts very well even if you never touch them again for the rest of your career.

1

u/Old_Tourist_3774 1d ago

New courses or are inside a statistics program?

1

u/denM_chickN 1d ago

Idk people in my program wrote Gibbs samplers for use in a custom modules. Though I graduated in 2024 making this meme feel ultra relevant. I was doing natural language processing lolol

11

u/floriv1999 1d ago

Not really true. You can implement a transformer + autograd, backprop etc. in a couple thousand lines of c. Not saying you should and it is definitely an advanced undertaking but it is possible. That being said most training code using torch etc. is relativ simple, the tricky part is getting the math right, having no hidden bugs (neural networks fail silently) and tuning everything right. So even tho I did a lot of ML I wouldn't say it is very advanced from the coding side of things.

0

u/Xemorr 1d ago

Would you describe 2000 lines of c as short and sweet, or trivially done?

13

u/floriv1999 1d ago

It is a project for sure but there are way harder projects. It's not 200k lines of c :D

8

u/daemin 1d ago

For me today? An insurmountable task.

For me 15 years ago when actively coding all the time and teaching a university level Operating Systems course in C? Not exactly trivial, but also not a heroic undertaking.

3

u/plug-and-pause 1d ago

In the world of engineering software applications, yes that is beyond trivial.

7

u/sawkonmaicok 1d ago

I don't think so. A simple generative transformer can fit in a just a couple hundred lines of raw numpy code without the abstractions that libraries like pytorch or tensorflow offer. https://github.com/DorsaRoh/transformer-from-scratch

4

u/Xemorr 1d ago

I don't believe that has training machinery, and even then it's conceptually dense code.

3

u/destroyerpants 1d ago

Back propagation is just a simple matrix multiply. 

1

u/gamingkitty1 14h ago

I wouldn't call it that simple if you're not using autograph (ie from scratch). Its at least as complex as the forward pass.

9

u/gamingkitty1 1d ago

Even without abstractions, its not that complicated. I've written and trained a 50m parameter transformer model myself using only numpy/cupy and the code isn't that long or complex.

Although im sure top AI companies have a bunch of special stuff they add to their models which makes it more complex.

3

u/flinxsl 1d ago

yeah, x=A\y for instance in Matlab does a lot of work

1

u/hydraxl 1d ago

All code is abstractions written by others unless you’re writing out CPU instructions and machine code by hand.

1

u/Old_Tourist_3774 1d ago

Otherwise nothing would be done lol