Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,11 @@ I left the messy history in the repo on purpose. That includes a bug I found in
own parameter accounting, which had inflated an early number, and the corrected
result that followed once I fixed it. The commit history and `RESULTS.md` show where
the numbers moved and why.

### Quick sanity check
Before a full training run, you can confirm your environment is set up correctly with a fast smoke test:
\`\`\`
uv run python data/prepare.py
uv run python src/train.py --arm ple --steps 20 --batch-size 4 --seq-len 64 --eval-every 10 --tag smoke-test
\`\`\`
This runs in under a minute and confirms data prep, model build, and the training loop all work end to end.
8 changes: 6 additions & 2 deletions src/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import numpy as np
import torch

import argparse
from model import Config, TinyLM
from quantize import quantize_groupwise

Expand Down Expand Up @@ -71,7 +71,11 @@ def quant_pack(w, group=GROUP):


def main():
tag = sys.argv[1] if len(sys.argv) > 1 else "ple-cleandeploy-s0"
ap = argparse.ArgumentParser()
ap.add_argument("--tag", default="ple-cleandeploy-s0",
help="run tag to export, matches runs/{tag}.pt")
args = ap.parse_args()
tag = args.tag
os.makedirs(OUT, exist_ok=True)
ck = torch.load(os.path.join(RUNS, f"{tag}.pt"), map_location="cpu", weights_only=False)
cfg = Config(**ck["cfg"])
Expand Down