Building a GPT from Scratch with yoctoGPT in PyTorch (3)

The Python Quants
164 views β€’

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

Keyboard shortcuts

On. Switch them off if they collide with your assistive tools; ? still opens this sheet.

Go to

Press g then the letter.

  • gh Latest
  • gs Sources
  • gm Media
  • gv Videos
  • gp Podcasts
  • gc Calendar
  • gd Decoder
  • gz Dataviz
  • ga Datasets
  • gb Blog
  • gk Markets
  • gj Careers
  • gn Prompt Notebook

On this page

  • / Focus search, where there is one
  • t Back to top
  • ? This list
  • Esc Close