maagdeveloper/transformers-nlp-lab — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a small notebook based NLP lab that teaches and demonstrates a mini transformer system from end to end.

I want it to let someone train a tiny decoder model and encoder model, train tokenizers, fine tune the models for things like chat, sentiment classification, named entity recognition, question answering, and embeddings, then combine the pieces into a simple app that decides whether a user question should go to chat, direct QA, or document retrieval.

Please include a lightweight RAG flow where documents get chunked, embedded, searched, and the best matching chunk can be returned as the answer. Also include a simple TF IDF based router with a few example routes like chat, direct QA, and retrieve from documents.

Make it notebook first and easy to run locally with Python. Include clear run order, setup instructions, and small inference demos. If full training is heavy, include baseline models or saved checkpoints so someone can still try the mini app without retraining everything.

Want more depth? Deep Reverse