PlanckGPT

PlanckGPT is a ~540M-parameter language model trained from scratch on a single laptop GPU (RTX 5070 Mobile, 8GB), aiming to achieve the best quality over training time possible.

Code, training scripts and full details on Github: https://github.com/nguyenphuminh/planckgpt.

Model details

Parameters ~540M
Layers / heads / dim 14 / 7 / 896 (FFN 3584)
Context length 1024 tokens
Tokenizer GPT-2 via tiktoken (50,257 vocab)
Pretraining data ~2B tokens of FineWeb-Edu
Chat data smol-smoltalk + ~1k identity examples
Training compute ~28h pretraining + ~4h SFT on one RTX 5070 Mobile 8GB
Format Raw PyTorch checkpoint (.pth), not transformers-compatible

Results

Model Eval set Val loss BPB
Base FineWeb-Edu 2.9711 0.9203
Chat smol-smoltalk 1.1286 0.3556

The base model performs roughly on par with GPT-2 Medium.

Usage

First, clone the Github repo:

git clone https://github.com/nguyenphuminh/planckgpt
cd planckgpt

Next, set up the environment as described in the GitHub README.

Then, download planckgpt-chat.pth from this repo, or planckgpt.pth if you want the pretrained version, and place them in ./artifacts.

Finally, run:

# or python -m scripts.inference for the pretrained version
python -m scripts.sft_inference

Configuration

  • Chat format: User: ...\n\nAssistant: ...<|endoftext|>.
  • Default sampling (chat): temperature 0.6, top-k 50, top-p 0.9, repetition penalty 1.15 over a 128-token window, max 256 new tokens.
  • Default sampling (pretrained): temperature 1.0, top-k 50, top-p 0.95, repetition penalty 1.2 over a 64-token window, max 1024 new tokens.

Citation

@misc{planckgpt,
  author = {Phu Minh Nguyen},
  title = {PlanckGPT: Train a GPT from scratch on your laptop},
  year = {2025},
  publisher = {GitHub},
  url = {https://github.com/nguyenphuminh/planckgpt}
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Datasets used to train cattonpm/PlanckGPT-v0.13.1

Collection including cattonpm/PlanckGPT-v0.13.1