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
TLC — Hunter LoRA (Gemma 4 E4B)
QLoRA adapter for Gemma 4 E4B trained to play the Hunter persona inside TLC — Teacher's Lesson Creator, 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) 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
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
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
PersonaScaffoldSchemaoutputs 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/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
combines both into a single lesson package.
License
MIT. Fork it, build on it, improve it.
Citation
@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}
}
- Downloads last month
- 18