Instructions to use minecartchris/cc-coder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use minecartchris/cc-coder with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/Qwen2.5-Coder-3B-Instruct-bnb-4bit") model = PeftModel.from_pretrained(base_model, "minecartchris/cc-coder") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Studio
How to use minecartchris/cc-coder with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for minecartchris/cc-coder to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for minecartchris/cc-coder to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for minecartchris/cc-coder to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="minecartchris/cc-coder", max_seq_length=2048, )
cc-coder — a CC: Tweaked (ComputerCraft) Lua coding model
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.
Evaluation (executable, in-emulator)
70 held-out prompts; a pass = the generated program parses and runs cleanly in CraftOS-PC (with stub turtle API and installed community libs):
| Metric | Training-loop start (iter 1) | This model (iter 9) |
|---|---|---|
| Everyday CC tasks (50 prompts, clean-run %) | 44% | 74% |
| Full set incl. library tasks (70 prompts) | — | 60% |
| Syntax-valid generations | 94% | 97% |
(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.)
Training data
- The CC: Tweaked ROM, official docs, and ~130 community repositories (Basalt, Pine3D, PixelUI, Opus OS, artist, ccryptolib, metis, and many more), each file validated in the emulator before inclusion; licenses of source repos include MPL-2.0, MIT, and LicenseRef-CCPL
- 112 hand-written, emulator-validated canonical examples targeting
observed failure modes (nil-guards, yield-correct event loops, exact API
signatures, library
requireidioms) - ~5,000 general programming samples (Magicoder-OSS-Instruct) to retain non-Lua skills
Usage
With PEFT / transformers (the adapter also loads onto the full-precision
Qwen/Qwen2.5-Coder-3B-Instruct base):
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base = AutoModelForCausalLM.from_pretrained("unsloth/Qwen2.5-Coder-3B-Instruct-bnb-4bit")
model = PeftModel.from_pretrained(base, "minecartchris/cc-coder")
tokenizer = 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.
Limitations
- 3B parameters: logic on complex multi-step tasks can be wrong even when the code runs; always review before letting a turtle loose on your base
- Library coverage (Basalt, Pine3D, etc.) is functional but weaker than vanilla-API coverage
- Inherits the Qwen Research license from its base model (non-commercial restrictions apply — see license link)
- Downloads last month
- 20