Building a GPT from Scratch with yoctoGPT in PyTorch (3)
Applications and Production with yoctoGPT: Finance, Chat, and Deployment β Session 3 π§ Take yoctoGPT from training to deployment β domain-specific finance training, an interactive chat REPL, and production guidance for GPU servers. In this final session of our free 3-part webinar series, Dr. Yves J. Hilpisch shows how to train a GPT model on a finance corpus, wrap it into a chat interface, and deploy beyond ephemeral Colab sessions. π Topics in this session: β’ Notebook 4: finance token corpus with 18 texts and 2.83M tokens β’ Corpus preparation: formula dropping, BPE vocab 4000, EMA smoothing β’ Multi-GPU benchmarking: T4, L4, A100, and G4 (RTX PRO 6000 Blackwell) β’ Resume from best.pt with lower learning rate for fine-grained improvement β’ Interactive chat REPL with raw mode for base language models β’ Checkpoint management: warm start vs full resume, best.pt vs latest.pt β’ Avoiding overfitting: regularisation toolkit, LR schedules, early stopping β’ Metrics logging and reading training curves β’ GPU server deployment and production considerations β‘ Measured results across Colab GPUs: β’ Finance token val loss: 4.22 (T4) β 3.67 (L4) β 3.28 (A100) β 3.28 (G4) β’ No early stopping on any GPU β the 2.83M-token corpus keeps all models learning β’ A100 and G4 produce identical results (same 8L/512d model); G4 is 20% faster β’ G4 names the Second Fundamental Theorem of Asset Pricing in generated text β’ T4 has best Char-KL (0.19) despite worst val loss β conservative output matches corpus style β’ Train/val gap scales with model size: 0.02 (T4) β 0.13 (L4) β 0.43 (A100/G4) π Resources: π Slides: https://tpq.io/tpq_yoctogpt_3.pdf π Notebook repo: https://github.com/yhilpisch/yoctoGPT π TDS: https://thedatascientist.dev π CPF: https://python-for-finance.com π€ TAE: https://theaiengineer.dev βΏ TCE: https://thecryptoengineer.dev π Disclaimer: This content is provided solely for illustration and educational purposes. Training texts consist primarily of public-domain works. A small number of finance texts may still be subject to copyright; they are included for educational purposes only. No warranties or guarantees of any kind are given. Use at your own risk. #GPT #PyTorch #Transformer #Finance #LanguageModel #GoogleColab #AIEngineering #LLM #DeepLearning #yoctoGPT #ChatBot #Deployment #GPU #Benchmarking