rasbt/LLMs-from-scratch ? reverse-engineered prompt
Reverse engineered prompt
I want to build my own simple large language model from scratch, kind of like a mini-ChatGPT, so I can really understand how they work. The main goal here is learning.
Let's use Python and PyTorch for everything. Can you structure the project into a series of steps, maybe in Jupyter notebooks? We should start with the fundamentals: how to process text data and build a tokenizer. Then, walk me through coding the key components like the self-attention mechanism and building up the full GPT architecture from those pieces.
Once the model is built, we'll need to pre-train it on some generic text data. After that, I want to see how to fine-tune our model for a couple of specific purposes: one for a simple text classification task, and another to make it follow instructions, more like a real chatbot. Please add plenty of comments to explain what each part of the code is doing.
Are you gonna build this?
make sure you review the code using coderabbit