# Mortdecai

A 9B parameter language model fine-tuned for Minecraft server operations. Translates natural language to commands, controls an AI God character, manages plugins, writes mcfunction scripts, and learns from its mistakes.

**Base model:** Qwen3.5-9B | **Current version:** 0.5.0 | **Quantization:** Q4_K_M (5.6GB)

## Training Progress

![Training Progress](branding/training_progress.svg)

| Version | Base Model | Training Examples | Loss | Key Addition |
|---------|-----------|-------------------|------|-------------|
| 0.1.0 | Qwen3-8B | 500 | 2.10 | Seed data only |
| 0.2.0 | Qwen3-8B | 1,200 | 1.45 | +entities, +mobs |
| 0.3.0 | Qwen3-8B | 2,100 | 0.82 | +error correction |
| 0.4.0 | Qwen3.5-9B | 3,175 | 0.35 | +tool-calling, base model upgrade |
| **0.5.0** | **Qwen3.5-9B** | **4,358** | **0.16** | **+plugins, +memory, +scripts** |

## Bake-off: 0.5.0 vs 0.4.0

| Category | 0.4.0 | 0.5.0 | Change |
|----------|-------|-------|--------|
| Enchantments | 20% | 67% | **+47%** |
| EssentialsX | 0% | 60% | **+60%** |
| Effects | 0% | 25% | **+25%** |
| Basic commands | 75% | 75% | — |
| Teleport | 100% | 100% | — |
| Overall | 45.2% | 46.8% | +1.6% |

## Architecture

**17 tools** across 5 categories:

| Category | Tools |
|----------|-------|
| Execution | `rcon.execute` |
| Knowledge | `minecraft.wiki_lookup`, `plugin.docs_lookup`, `minecraft.changelog_lookup`, `paper.docs_lookup` |
| World | `world.player_info`, `world.server_state`, `world.nearby_entities` |
| Memory | `memory.read`, `memory.write` |
| Scripts | `script.write`, `script.validate`, `script.execute`, `script.read`, `script.list`, `script.delete`, `script.schedule` |

**Plugins:** FastAsyncWorldEdit, WorldGuard, CoreProtect, EssentialsX, Vault, LuckPerms

## Training Data

~20,000+ examples from:
- Hand-curated seed data (3,196)
- Tool-calling sequences with 17 tools (1,430)
- IGLU build dataset — Microsoft Research (4,656)
- RCON-validated plugin examples (104)
- Exploration self-play with wiki grounding (150)
- Self-play across 3 GPUs (2,900+)
- Live server audit from wolf bots + real players (8,000+)

## Infrastructure

| GPU | Role |
|-----|------|
| RTX 3090 Ti (24GB) | Training + self-play |
| RTX 2080 Ti (11GB) | Exploration self-play |
| Quadro RTX 4000 (8GB) | Production inference — 3 MC servers |
| GTX 1660 Super (6GB) | Prompt generation |

**GPU Scheduler:** [gpu.sethpc.xyz](https://gpu.sethpc.xyz) — preset-based job scheduler with live monitoring

## Links

- **Play:** `minecraft.mortdec.ai`
- **Model card:** [MODEL_CARD.md](MODEL_CARD.md)
- **Domain:** [mortdec.ai](https://mortdec.ai)
