Skip to content
FDFerdinand Dero Saputra
All workid

Case study — 02

AegisX-Mini

A ~30M-parameter security model trained from scratch, answering only from its own corpus and saying so when it has no support.

Role
Machine learning · personal project
Year
2026
Stack
PythonGradioBM25

01 — Context

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.

02 — Approach

  1. 01

    Trained from zero

    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.

  2. 02

    Retrieval without dependencies

    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".

  3. 03

    Agent layer with a human gate

    A ReAct loop wraps the model behind an authorization gate and an audit log, and any action waits for manual confirmation.

03 — Outcome

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.

parameters, trained from scratch
~30M
tests passing
133/133
token context window
768
Source on GitHub
PreviousJASAKITENextftrack
  • Blog
  • Contact
  • Resume

© 2026 Ferdinand Dero Saputra — built in Next.js & Tailwind

--:--Back to top ↑