A QLoRA adapter for
Qwen2.5-Coder-3B-Instruct specialized in writing
CC: Tweaked Lua programs for Minecraft — turtles,
peripherals, rednet, monitors, and the wider CC library ecosystem — while
retaining general programming ability.
Trained entirely on a single RTX 5060 (8GB) using
Unsloth, and iterated against an
executable benchmark: every evaluation generation is run inside a real
CraftOS-PC emulator with syntax + runtime
checking, and every hand-written training example was validated the same
way before it was allowed into the dataset.
(3 of the 20 library prompts are unwinnable in the harness — broken
vendored dependency, internet-requiring font, nonexistent module — so the
effective library ceiling is 17/20.)
1from peft import PeftModel
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4base = AutoModelForCausalLM.from_pretrained("unsloth/Qwen2.5-Coder-3B-Instruct-bnb-4bit")
5model = PeftModel.from_pretrained(base, "minecartchris/cc-coder")
6tokenizer = AutoTokenizer.from_pretrained("minecartchris/cc-coder")
Prompt in plain chat format, e.g. "Write a CC: Tweaked turtle program
that digs a 1x2 tunnel 16 blocks long and returns home."
A GGUF build (q4_k_m, runs in Ollama / LM Studio on ~2GB) is planned as a
companion repo.