diff --git a/README.md b/README.md index 102021b..30a976f 100644 --- a/README.md +++ b/README.md @@ -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. \ No newline at end of file diff --git a/src/export.py b/src/export.py index 97a1b6e..bb6de39 100644 --- a/src/export.py +++ b/src/export.py @@ -20,7 +20,7 @@ import numpy as np import torch - +import argparse from model import Config, TinyLM from quantize import quantize_groupwise @@ -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"])