Instructions to use hardcoded74/tlc-gemma-4-e4b-hunter-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use hardcoded74/tlc-gemma-4-e4b-hunter-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("google/gemma-4-e4b-it") model = PeftModel.from_pretrained(base_model, "hardcoded74/tlc-gemma-4-e4b-hunter-lora") - Notebooks
- Google Colab
- Kaggle
File size: 3,329 Bytes
f9e7f06 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | ---
base_model: google/gemma-4-e4b-it
library_name: peft
license: mit
tags:
- lora
- peft
- gemma-4
- education
- lesson-planning
- tlc
language:
- en
---
# TLC — Hunter LoRA (Gemma 4 E4B)
QLoRA adapter for **Gemma 4 E4B** trained to play the **Hunter**
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).
Hunter is one of two collaborating Teacher's Assistants. **Hunter
owns structure and rigor** — the learning objective, the lesson
sequence, the assessment, the answer key, the time math, standards
alignment. Christine ([sibling adapter](https://huggingface.co/hardcoded74/tlc-gemma-4-e4b-christine-lora))
owns depth and engagement; 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` (lesson
steps, materials, assessment, vocabulary, misconceptions, 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
Hunter's structural 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-hunter-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 Christine
adapter and hot-swapped per request. Using it solo will work but
gives you only the structural 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-hunter-2026,
title = {TLC Hunter — Gemma 4 E4B QLoRA for K-12 lesson structure},
author = {Sam},
year = {2026},
url = {https://huggingface.co/hardcoded74/tlc-gemma-4-e4b-hunter-lora}
}
```
|