Lion Cipher Lab

Fine-tune a small AI model with LoRA

Why it matters

Fine-tuning used to mean a research budget and a rack of GPUs, so most people treated the model they were given as fixed. LoRA changed that: you can now adapt an open model to your own task by training a tiny set of extra weights, cheaply, on your own hardware. That is a genuinely useful skill for security work, where the tasks are narrow and the data is often too sensitive to send to a hosted service. But the same capability carries a real risk that beginners are rarely told about at the same time: a model can memorize its training data and later reproduce it, so training on secrets or…

What you'll learn

Steps in this lab

  1. Fine-tuning vs RAG — decide before you train
  2. Why LoRA: cheap to train, small to ship
  3. The data is the lab: hygiene before you train
  4. Set up a local training environment
  5. Prepare your own small dataset
  6. Fine-tune with LoRA using PEFT + TRL
  7. Evaluate the result — including for leakage
  8. What you just built — and the judgment that goes with it

Open the full interactive lab →