How stanford-cs336/spring2025-lectures works
This repository is a Stanford CS336 lecture-materials project, not a general language-model training application. Its main workflow is to run an executable lecture, generate a trace JSON and cached assets, then open the trace in the browser-based viewer to inspect code and rendered explanations. The lecture scripts cover course foundations, modeling and systems topics; PDFs provide non-executable lectures. The graph preserves the documented lecture and viewer capabilities. Some lecture internals and trace-generation details were not sampled, so uncertain runtime links are omitted.
Main entry points: execute_util.py Rendering helpers · arxiv_util.py arXiv metadata · file_util.py File cache · lecture_01.py Intro and tokens
Components 24
Lecture materials
- PDF lectures
nonexecutable - Intro and tokens
lecture_01.py - Model primitives
lecture_02.py - GPU kernels
lecture_06.py - Lecture 08
lecture_08.py - Lecture 10
lecture_10.py - Lecture 12
lecture_12.py - Lecture 13
lecture_13.py - Lecture 14
lecture_14.py - Lecture 17
lecture_17.py
Trace execution
- Lecture runner
execute.py - Trace output
var/traces - Cluster execution
remote_execute.sh
Content support
- Data helpers
data.py - Rendering helpers
execute_util.py - Lecture links
lecture_util.py - Reference catalog
references.py - arXiv metadata
arxiv_util.py - File cache
file_util.py - Reference model
reference.py
Trace viewer
- Viewer app
trace-viewer/src/App.jsx - Trace inspector
trace-viewer/src/TraceViewer.jsx - Viewer utilities
trace-viewer/src/utils.js
Other components
- Learner
Connections 31
- Learner → Lecture runner: runs lecture
README.md - Lecture runner → Trace output: writes trace
README.md - Learner → Cluster execution: runs remotely
README.md - Cluster execution → Trace output: returns results
README.md - Learner → PDF lectures: reads materials
README.md - Learner → Intro and tokens: studies
README.md - Learner → Model primitives: studies
README.md - Learner → GPU kernels: studies
README.md - Learner → Lecture 08: studies
README.md - Learner → Lecture 10: studies
README.md - Learner → Lecture 12: studies
README.md - Learner → Lecture 13: studies
README.md - Learner → Lecture 14: studies
README.md - Learner → Lecture 17: studies
README.md - Lecture runner → Rendering helpers: uses
execute.py - Rendering helpers → File cache: caches assets
execute_util.py - Rendering helpers → arXiv metadata: resolves links
execute_util.py - arXiv metadata → File cache: fetches metadata
arxiv_util.py - arXiv metadata → Reference model: creates metadata
arxiv_util.py - Reference catalog → Reference model: defines entries
references.py - Reference catalog → arXiv metadata: loads papers
references.py - Intro and tokens → Rendering helpers: emits content
lecture_01.py - Intro and tokens → Lecture links: uses links
lecture_01.py - Model primitives → Rendering helpers: emits content
lecture_02.py - GPU kernels → Rendering helpers: emits content
lecture_06.py - GPU kernels → File cache: creates directory
lecture_06.py - Data helpers → File cache: uses files
data.py - Learner → Viewer app: opens viewer
README.md - Viewer app → Trace inspector: routes to
trace-viewer/src/App.jsx - Trace inspector → Trace output: loads trace
README.md - Trace inspector → Viewer utilities: uses helpers
trace-viewer/src/TraceViewer.jsx