#!/usr/bin/env bash
set -euo pipefail

source "$(cd "$(dirname "$0")" && pwd)/_common.sh"
require_venv
cd_nanogpt

if [[ ! -f "out-shakespeare-char/ckpt.pt" ]]; then
  echo "ERROR: ckpt.pt not found. Run training first:" >&2
  echo "  bash oss_llm/testNanoGPT/30_train_cpu_quick.sh" >&2
  exit 1
fi

"${VENV_PY}" sample.py --out_dir=out-shakespeare-char --device=cpu --max_new_tokens=200
