# weiruihhh/cs336_note_and_hw

记录我在cs336学习时的笔记和作业

Repository: https://github.com/weiruihhh/cs336_note_and_hw
Canonical: https://ross.abutalabs.com/products/cs336_note_and_hw
Language: Python
License: NOASSERTION
License Family: other
Last push: 2026-05-02T09:14:07+00:00

## Health v2 (maintenance only)
Score: 55/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 80, release rhythm 35, longevity 32
- inputs: {"age_days": 458, "days_push": 123, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1088, forks 45 (observed 2026-08-28T04:03:32.455660+00:00)

## What it is
A collection of personal course notes and completed homework solutions for Stanford CS336: Building Large Language Models from scratch. It covers Transformer fundamentals, training optimization with Triton and Flash Attention, scaling laws, data cleaning pipelines, and RL-based alignment methods like GRPO and DPO.

## Use cases
- study notes for stanford cs336 building large language models
- learn how to build an llm from scratch
- reference solutions for cs336 assignments
- understand flash attention and triton kernel implementation
- learn scaling laws for large language models
- implement GRPO and DPO for LLM alignment
- learn the LLM training data cleaning pipeline

## When to choose
- you are taking or self-studying Stanford CS336 and want notes and worked assignments
- you want a structured path to building LLM components from scratch in PyTorch
- you want reference implementations of GRPO, DPO, or Flash Attention exercises

## When to avoid
- you need a production-ready LLM training framework
- you want fully polished, complete notes - the author states several chapters are unfinished
- you need commercially licensed material - it is CC BY-NC-SA 4.0, non-commercial only

## Facets
- artifact type: learning-resource
- maturity: active
- function: llm-training, deep-learning, machine-learning, prompt-engineering
- domain: large-language-models, deep-learning, tutorials, machine-learning
- platform: python
- tags: cs336, stanford, course-notes, homework-solutions, transformers, pytorch, triton, flash-attention, scaling-laws, grpo, dpo, reinforcement-learning, data-cleaning, tokenizer

## Member repositories
- weiruihhh/cs336_note_and_hw (main) score 55

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:32.455660+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:49:23.673337+00:00, confidence not recorded.
  - readme: https://github.com/weiruihhh/cs336_note_and_hw (fetched 2026-08-28T04:03:32.455660+00:00, sha 92f86535f0bc)
- Data as of 2026-08-30T08:39:29.467469+00:00.
