Skip to content
프로젝트

소개

Student version of Assignment 2 for Stanford CS336 - Language Modeling From Scratch

AI 및 머신러닝

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
+1
in 7 days
+2
in 15 days
+11
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

CS336 Spring 2026 Assignment 2: Systems

For a full description of the assignment, see the assignment handout at cs336_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.

Setup

This directory is organized as follows:

  • ./cs336-basics: directory containing a module cs336_basics and its associated pyproject.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.
  • ./cs336_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 (in cs336-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:

.
├── cs336_basics  # A python module named cs336_basics
│   ├── __init__.py
│   └── ... other files in the cs336_basics module, taken from assignment 1 ...
├── cs336_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 cs336-basics directory with your own implementation, or edit the outer pyproject.toml file to point to your own implementation.

  1. We use uv to manage dependencies. You can verify that the code from the cs336-basics package is accessible by running:
$ uv run python
Using CPython 3.13.13
Creating virtual environment at: /path/to/uv/env/dir
      Built cs336-systems @ file:///path/to/systems/dir
      Built cs336-basics @ file:///path/to/basics/dir
Installed 78 packages in 168ms
Python 3.13.13 (main, Apr  7 2026, 20:49:46) [Clang 22.1.1 ] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cs336_basics
...

uv run installs dependencies automatically as dictated in the pyproject.toml file.

Submitting

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.

관련 프로젝트 살펴보기

불러오는 중…