--- base_model: google/gemma-4-e4b-it library_name: peft license: mit tags: - lora - peft - gemma-4 - education - lesson-planning - tlc language: - en --- # TLC — Christine LoRA (Gemma 4 E4B) QLoRA adapter for **Gemma 4 E4B** trained to play the **Christine** persona inside [TLC — Teacher's Lesson Creator](https://github.com/hardcoded74/tlc), an open-source lesson-building tool for the Kaggle Gemma 4 Good Hackathon (Impact Track). Christine is one of two collaborating Teacher's Assistants. **Christine owns depth and engagement** — the engagement moment, hands-on demonstrations, teacher delivery notes, discussion prompts, differentiation, misconceptions. Hunter ([sibling adapter](https://huggingface.co/hardcoded74/tlc-gemma-4-e4b-hunter-lora)) owns structure and rigor; the two outputs are merged by deterministic field-ownership rules at Phase 3. ## What this adapter is for TLC requires the model to emit strict JSON via Gemma 4's native function-calling. Stock Gemma 4 E4B can produce loose JSON but struggles to hit a deeply nested `PersonaScaffoldSchema` (engagement hooks, demonstrations, vocabulary with examples, misconceptions with corrections, source provenance per field) from zero-shot. With ~250 schema-validated golden outputs synthesized from cloud Gemma 4 31B as teacher, this adapter learns the strict-schema discipline end-to-end while keeping Christine's pedagogical voice. ## Quick start ```python from peft import PeftModel from transformers import AutoModelForCausalLM, AutoTokenizer base = AutoModelForCausalLM.from_pretrained("google/gemma-4-e4b-it") tok = AutoTokenizer.from_pretrained("google/gemma-4-e4b-it") model = PeftModel.from_pretrained(base, "hardcoded74/tlc-gemma-4-e4b-christine-lora") ``` For llama.cpp serving (the way TLC actually deploys it), convert the adapter to GGUF via `llama.cpp/convert_lora_to_gguf.py` and load with `--lora`. See [TLC's `scripts/run_local_llama.sh`](https://github.com/hardcoded74/tlc/blob/main/scripts/run_local_llama.sh) for the exact serving config (Hunter at adapter id 0, Christine at id 1, both loaded with `--lora-init-without-apply` so the worker can hot-swap per request). ## Training details - **Base:** `google/gemma-4-e4b-it` - **Method:** SFT (TRL) over QLoRA, NF4 base + bf16 compute - **Data:** ~250 schema-validated `PersonaScaffoldSchema` outputs generated by Gemma 4 31B (dense) acting as the teacher model on a curated K-12 topic x grade matrix - **Hardware:** Intel Arc B570 (10 GB) via Intel Extension for PyTorch - **Pipeline:** Fully reproducible from [`training/`](https://github.com/hardcoded74/tlc/tree/main/training) in the TLC repo — topic matrix, data-gen script, Arc training notebook, GGUF conversion ## Pairing This adapter is designed to be served *alongside* the Hunter adapter and hot-swapped per request. Using it solo will work but gives you only the depth/engagement half of TLC's output. The deterministic merge in [`lib/merge.ts`](https://github.com/hardcoded74/tlc/blob/main/lib/merge.ts) combines both into a single lesson package. ## License MIT. Fork it, build on it, improve it. ## Citation ```bibtex @misc{tlc-christine-2026, title = {TLC Christine — Gemma 4 E4B QLoRA for K-12 lesson depth and engagement}, author = {Sam}, year = {2026}, url = {https://huggingface.co/hardcoded74/tlc-gemma-4-e4b-christine-lora} } ```