Case study — 02
A ~30M-parameter security model trained from scratch, answering only from its own corpus and saying so when it has no support.
Small security chatbots answer confidently from memory. For bug-bounty study a wrong answer costs more than no answer, so the model had to be grounded in a corpus and honest about its gaps.
A byte-level BPE tokenizer with 8,192 tokens and a decoder-only transformer, run through pre-training, supervised fine-tuning, and DPO alignment in one Colab notebook.
BM25 over per-section chunks supplies the answer. Each answer cites its source, and a question the corpus does not cover gets an honest "I don't know".
A ReAct loop wraps the model behind an authorization gate and an audit log, and any action waits for manual confirmation.
The pipeline runs end to end from one notebook. The test suite passes 133 of 133, and the model is served as a Gradio app on a Hugging Face Space with int8 quantization and streaming output.