← All writing

potichat (nanochat) - lets remake chatgpt ?!

1 min read

  • In progress
  • Coding
  • ML

making a chatgpt like from scratch to naviguate the whole stack

Inspired by karapathy’s awesome blog post about nanochat, and then followed by the ppl from hugging face. I will try to train an LLM from scratch, to better understand the ins and outs. I will be following HF’s free course at first you can find it here

Starting

The architecture type.

I’ve chosen to take the same baseline as google’s Gemma or Alibaba’s Qwen or even HF’s SmolLM. The architecture baseline will be Dense. I’ve Chosen to go with this one rather than an MOE or hybrid because of the final size and parameters of the model. I still would like to avoid training a 400B model, because it will take too much time, and therefore would be too costy for an experiment (and because I’m impatient :p) So Let’s aim for a >10B model.

The training framework

In the same spirit as before, I’ve chosen to go with TorchTitan (here) because while It was only tested by the pytorch team and is relatively new, It is optimized for Dense type. It is also much lighter, and therefore (I hope) will take me less time to go through if needed.

WIP