Skip to content
King Jin

JustOneGPT

A GPT trained on 明朝那些事儿, then upgraded to a LLaMA-style architecture.

About

Built from scratch to learn how GPTs are trained. It started as a re-implementation of Karpathy's nanoGPT with my own byte-level BPE tokenizer, trained on 明朝那些事儿, a long Chinese history of the Ming dynasty. I then moved it to a LLaMA-style architecture and ran ablations under a fixed compute budget to see what each part does to validation loss.

Key features

  1. 01Custom byte-level BPE tokenizer for a Chinese corpus
  2. 02LLaMA-style upgrades: RoPE, RMSNorm, SwiGLU, grouped-query attention
  3. 03Controlled ablations under a fixed compute budget
  4. 04KV-cache inference with top-k / top-p sampling
  5. 05bf16 mixed precision, FlashAttention (SDPA) and torch.compile

Details

Year
2026
Link
github.com/Kingjinsight/JustOneGPT ↗
  • PythonPython
  • PyTorchPyTorch
NextNordic AI Cup →