Live data from Hacker News

CS336: Language Modeling from Scratch

cs336.stanford.edu

31–40 of 56 posts

Re: CS336: Language Modeling from Scratch

#31
Oh this is brilliant, I've spent the last month doing something just like this. As a challenge, no libraries allowed besides Python standard libs (so no numpy).

Started with Word2Vec, built an RNN, then LSTM and am halfway through building transformer architecture.

Re: CS336: Language Modeling from Scratch

#34
post #30

I recently completed the 2025 version of this course (video + most assignments, skipping some of the most costly part of the tasks). That's quite something. There is a lot going on in the first two assignments which required a ton of thinking and debugging. Despite having a decent foundation in deep learning, it took me several months to finish it using bits of my after-work hours and weekends. (I am not a model part…

TA here. Noted! I now have more resources to test more environments, and will do so whenever possible. I think freezing due to memory overuse is going to be a problem with anything you code yourself, but I do think we could be more rigorous with guiding people to achieve limited memory use for the tokenizer task.

IMO the cost of renting GPUs is a bit overstated in these comments. Generally almost all of the development can be done locally, and then ran for a short period of time using on-demand GPUs. For assignment 1, you can run everything on your local machine, even if you don't have a GPU. For A1 and A2, you can do (most of) the tasks with only a few hours of renting. Without being too careful using rental GPUs throughout will net you around $200 of a compute budget, but you can easily get this under $50 if you're willing to scale down many of the problems. I think we could work on making this clear and charting what these changes are.

If you have further feedback or encounter problems, feel free to open issues in the repos so we can resolve them! It's hard for us to fix issues we're not aware of.

Re: CS336: Language Modeling from Scratch

#35
post #33

Can anyone answer question - whats the minimum viable GPU to follow along with this course at home? I have a 5080 16GB, are they really needing more than that in this course?

The first section can be done on a M1 chip, I think the second one needs Triton support, so your 5080 should be fine.

Re: CS336: Language Modeling from Scratch

#36
post #30

I recently completed the 2025 version of this course (video + most assignments, skipping some of the most costly part of the tasks). That's quite something. There is a lot going on in the first two assignments which required a ton of thinking and debugging. Despite having a decent foundation in deep learning, it took me several months to finish it using bits of my after-work hours and weekends. (I am not a model part…

TA here. Noted! I now have more resources to test more environments, and will do so whenever possible. I think freezing due to memory overuse is going to be a problem with anything you code yourself, but I do think we could be more rigorous with guiding people to achieve limited memory use for the tokenizer task. IMO the cost of renting GPUs is a bit overstated in these comments. Generally almost all of the developme…

Memory overuse: for context, it's about parallelism on gloo backend with CPU. My observation is that on Linux, the same (bad) python code will result in the process getting killed quickly, saving user the trouble of rebooting. Not sure if MacOS behavior is expected in the first place.

GPU cost: most of us will spend at least a few hours of troubleshooting to get started on a leased GPU, including but not limited to figuring out how much storage is needed, if CUDA version works well etc. No GPU is definitely possible but difficult. Plus, one issue might be that most of us just don't have enough experience working with them, resulting in more time figuring things out.

Github issues -- noted, will create any issue that I can think of.

Re: CS336: Language Modeling from Scratch

#37
post #9

> GPU compute for self-study Those suggestions they make for a B200 start at $4.99 an hour. Is that really required, for starting out? I've been tinkering with my own from-scratch LLM, but in the early phases I don't need anything more than a 4090 on Vast.ai

It seems strange that the required resources aren't provided by the educational institution?

It says it's for self-study, ie. those who are not enrolled in the course.

Re: CS336: Language Modeling from Scratch

#38
post #35
post #33

Can anyone answer question - whats the minimum viable GPU to follow along with this course at home? I have a 5080 16GB, are they really needing more than that in this course?

The first section can be done on a M1 chip, I think the second one needs Triton support, so your 5080 should be fine.

Thank you
Post reply on HN