~/chandan-satwani/projects/whybook $
// case study

WhyBook

A chemistry tutor that explains the what, the why and the real world, small enough to run on a laptop.

role
Solo build
base model
gemma-4-e2b
method
QLoRA with Unsloth
output
Q4_K_M GGUF
stack
Python, Unsloth, PEFT, Kaggle T4, Gradio, Hugging Face

The problem

Textbooks are good at definitions. Students studying NCERT chemistry often still can't see why a concept matters, or where it shows up in everyday life.

The idea

Every answer follows the same three parts: what the concept is, why it matters, and a real-world example. A small model is fine-tuned to answer in exactly that shape, then compressed so it runs on consumer hardware.

From textbook to laptop

see finetuning-spec.md
  1. station 1DataA synthetic dataset built from NCERT Class 11 and 12 chemistry, with a strict schema (concept, chapter, class, what, why, real world) and validation gates for length, boilerplate and duplicates.
  2. station 2QLoRAFine-tuning gemma-4-e2b with Unsloth on a single Kaggle T4 GPU, targeting every attention and feed-forward projection (rank 16, alpha 32).
  3. station 3GGUFAdapters merged into the model, then quantized to Q4_K_M GGUF for fast local inference.

Shipped in the open

4published artifacts on Hugging Face: the dataset, LoRA adapters, the GGUF model and a Gradio demo.
1 GPUThe whole fine-tune runs on a single Kaggle T4.
3 partsWhat, why and real world, enforced by the dataset schema rather than by prompting.

What I learned

WhyBook taught me that a small tutor becomes much more useful when its answer shape is designed before its model is trained. Encoding What, Why and Real World in the dataset made the behavior more consistent than relying on a prompt alone, while validation gates kept the synthetic data focused and usable.

Next: Finish the LiteRT and Edge Gallery export path so the tutor can run on more local and mobile devices.

Links