For a full description of the assignment, see the assignment handout at cse599o_fall2025_assignment2_systems.pdf
If you see any issues with the assignment handout or code, please feel free to raise a GitHub issue or open a pull request with a fix.
This directory is organized as follows:
./cse599o-basics: directory containing a modulecse599o_basicsand its associatedpyproject.toml. This module contains the staff implementation of the language model from assignment 1. If you want to use your own implementation, you can replace this directory with your own implementation../cse599o_systems: This folder is basically empty! This is the module where you will implement your optimized Transformer language model. Feel free to take whatever code you need from assignment 1 (incse599o-basics) and copy it over as a starting point. In addition, you will implement distributed training and optimization in this module.
Visually, it should look something like:
.
├── cse599o_basics # A python module named cse599o_basics
│ ├── __init__.py
│ └── ... other files in the cse599o_basics module, taken from assignment 1 ...
├── cse599o_systems # TODO(you): code that you'll write for assignment 2
│ ├── __init__.py
│ └── ... TODO(you): any other files or folders you need for assignment 2 ...
├── README.md
├── pyproject.toml
└── ... TODO(you): other files or folders you need for assignment 2 ...If you would like to use your own implementation of assignment 1, replace the cse599o-basics
directory with your own implementation, or edit the outer pyproject.toml file to point to your
own implementation.
- We use
uvto manage dependencies. You can verify that the code from thecse599o-basicspackage is accessible by running:
$ uv run python
Using CPython 3.12.10
Creating virtual environment at: /path/to/uv/env/dir
Built cse599o-systems @ file:///path/to/systems/dir
Built cse599o-basics @ file:///path/to/basics/dir
Installed 85 packages in 711ms
Python 3.12.10 (main, Apr 9 2025, 04:03:51) [Clang 20.1.0 ] on linux
...
>>> import cse599o_basics
>>> uv run installs dependencies automatically as dictated in the pyproject.toml file.
To submit, run ./test_and_make_submission.sh . This script will install your
code's dependencies, run tests, and create a gzipped tarball with the output. We
should be able to unzip your submitted tarball and run
./test_and_make_submission.sh to verify your test results.
This assignment is adapted from Assignment 2 of Stanford CS336 (Spring 2025).