Skip to content

swzhangf/nanoGPT-Test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 NanoGPT Deployment & Smoke Test

Python PyTorch Status License

πŸ“– Introduction

This repository is a lightweight deployment and verification implementation based on Andrej Karpathy's nanoGPT.

The primary goal of this project is to demonstrate a complete end-to-end LLM lifecycleβ€”from data generation to model training and inferenceβ€”verified within a minimal compute environment (e.g., Google Colab T4 or local CPU/GPU).

We utilize a synthetic "Tick Tock" pattern dataset (or arithmetic logic) to conduct a "Smoke Test," ensuring that the model architecture, optimizer, and training loop are functioning correctly before scaling up to larger datasets like OpenWebText.

πŸš€ Features

  • Automated Data Pipeline: Scripts to generate synthetic training data instantly.
  • Minimalist Configuration: A tuned smoke_test.py config optimized for speed (trains in <30 seconds).
  • Deployment Ready: Verified on Cloud (Colab) and Local environments.
  • Inference Verification: Includes scripts to validate if the model has "learned" the pattern.

πŸ“‚ Project Structure

nanoGPT/
β”œβ”€β”€ config/
β”‚   β”œβ”€β”€ smoke_test.py      # <--- Custom config for rapid testing
β”‚   └── train_shakespeare.py
β”œβ”€β”€ data/
β”‚   └── smoke_test/        # Generated binary data (excluded from git)
β”œβ”€β”€ model.py               # GPT Model Definition
β”œβ”€β”€ train.py               # Training Script
β”œβ”€β”€ sample.py              # Inference/Sampling Script
β”œβ”€β”€ test_deploy.py         # Unit tests for environment checks
└── README.md

About

The simplest, fastest repository for training/finetuning medium-sized GPTs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published