For Instructors

WarningPilot Testing and Classroom Evaluation

TinyTorch’s instructor workflows, grading harness, and nbgrader integrations are currently undergoing active pilot testing and pedagogical evaluation. Turn-key classroom packages, LMS grading templates, and autograding infrastructure will be ready for official course adoption in 2027.

TinyTorch runs as a course: twenty modules, seven milestones, autograded notebooks through nbgrader, and a companion book. This page covers what you need to decide and run. The full reference, including grading policy and the hardware extensions, is INSTRUCTOR.md in the repository.

What students write

Each module’s source marks its solution regions. The student release clears 52 of them across the twenty modules, and every module page lists its own under What you write. The other 189 regions are secondary helpers, shape checks, and repeated patterns; they ship already solved, so a student implements each concept once rather than retyping it. Solutions stay in src/; only the notebooks generated for students have them removed.

tito nbgrader generate stages a module at one of three tiers:

Table 1: Assignment staging tiers.
Tier Flag What students implement
Student (default) --tier student The 52 core regions
Challenge --tier challenge Regions marked role="challenge"; none are marked yet, so this tier currently refuses to generate
Instructor --tier instructor Nothing: the complete reference, for answer keys and TAs

The companion book prints the solutions

TinyTorch: From Tensors to Transformers explains each module by walking through its working code, so it prints the reference implementation of every function students write. Module pages link to it under Finished? Read why, after the work. If your course grades the modules, decide when students get the book: after each module’s deadline, or at the end of the course.

Set up grading

git clone https://github.com/harvard-edge/cs249r_book.git
cd cs249r_book/tinytorch
python -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
python -m pip install -e ".[grading]"   # adds nbgrader and its notebook tooling
tito nbgrader init                      # creates assignments/ and nbgrader_config.py
tito system health

Run an assignment

tito nbgrader generate 01_tensor --tier student   # stage the source assignment
tito nbgrader release 01_tensor                   # write the student version to assignments/release/
tito nbgrader collect 01_tensor                   # gather submissions from nbgrader's exchange
tito nbgrader autograde 01_tensor                 # run each submission's test cells and score them
tito nbgrader feedback 01_tensor                  # write feedback files
tito nbgrader report --assignment 01_tensor       # export grades

collect reads nbgrader’s exchange directory, which release does not fill, and the exchange is not supported on Windows. If you distribute assignments some other way (GitHub Classroom, an LMS, a zip file), skip collect and place each submission at assignments/submitted/<student_id>/01_tensor/ yourself, then run autograde. nbgrader formgrader opens nbgrader’s web interface for manual review of written answers.

What else is available

  • Slides. Each module page embeds an AI-generated slide deck, and the PDFs are downloadable from the viewer.
  • Audio. Each module page has a short AI-generated audio overview.
  • Milestones. Seven landmark milestones students run on their own framework, from 1958 Perceptron to 2024 Custom Kernels; see Historical Milestones.
  • Extensions. tinytorch.extensions includes hardware acceleration kernels (C++ SIMD, Triton, Apple MPS) and systems modules (Activation Checkpointing, LoRA, Graph Compiler, Loss Scaler) for advanced capstones and student exploration. See Extending TinyTorch.
  • Community. Students who log in with tito community login can sync progress to the TinyTorch website. A sync uploads the student’s account email (as user ID), which modules and milestones they completed and when, their completion percentage, and their streak. It never uploads code or notebooks. Login asks before enabling automatic sync; TITO_NO_SYNC=1 or tito community sync --disable-auto turns it off. If your institution restricts sharing student data, tell students not to log in.

Changing TinyTorch

Contributors changing modules, tests, or tito itself should run the development test suite (tito dev test --all) before opening a pull request.

Back to top