Skaldic Gemma 4 E4B
NPCs that write their own plans. Skaldic Gemma 4 E4B is Gemma 4 E4B fine-tuned to think as an NPC in any game that uses ArcDirector: it reads what a character sees, remembers and wants, thinks it through, and responds with an Arc, a short plan of commands like go here, pick that up, bring it to him, craft this, buy that, which the game then plays out.
It is small enough to run in a web browser on an ordinary gaming GPU, and locally on almost any recent card.
Made by Daniel Sigurdsson for ArcDirector.
What it was trained for
- Strategy (RTS): running an economy, building, training an army, and expanding.
- Tactics: commanding a squad, focusing the right target, falling back, and spreading out.
- Board games: reading the board and choosing the winning move.
- Squads: keeping a team alive, reviving the fallen, and holding ground.
- Fighting: picking the right move, healing in time, and knowing when to run.
- RPG: class advantages, the right gear, the safe route, and when to rest.
- Puzzles: riddles, sequences and devices, solved step by step.
- Roleplay: staying in character, no matter what is said to it.
- Social: talking, helping, persuading, and reading what others want.
- Business: buying, selling and bargaining for a fair price.
- Questing: finding out what a job needs and seeing it through, even when it is buried in old memories.
- Adventuring: exploring, finding the way, and getting past what blocks it.
- Crafting: gathering what a recipe takes and making it.
Results
The ArcDirector Bench (v2, part of ArcDirector library) with every case played 10 times at temperature 1. Each cell is the share of goals reached. Tested on a RTX 5090 GPU with 32GB of VRAM.
| Skaldic Gemma 4 E4B | Gemma 4 31B | Gemma 4 E4B (base) | |
|---|---|---|---|
| Total | 55% ±4 | 63% ±3 | 16% ±3 |
| Easy | 64% | 73% | 18% |
| Medium | 59% | 59% | 22% |
| Hard | 42% | 58% | 8% |
| Chain | 63% | 75% | 25% |
| Trade | 83% | 100% | 17% |
| Social | 88% | 100% | 25% |
| Lookup | 67% | 100% | 33% |
| Questing | 100% | 100% | 38% |
| Reactions | 17% | 0% | 0% |
| Fight | 60% | 60% | 20% |
| Tactics | 33% | 8% | 0% |
| Economy | 10% | 40% | 0% |
| Planning | 50% | 83% | 17% |
| Harm rate | 1.3% | 1.5% | 5.5% |
| Time/response | 17.1 s | 64.5 s | 37.1 s |
Totals are ± one standard error over 10 runs. Each skill rests on 3–6 situations, so skill gaps under about 20 percentage points are within noise.
How to use it
In ArcDirector
The ArcDirector library recognizes Skaldic models by name: it gives them the compact prompt they were trained on and asks them for JSON Arcs. This reduces the amount of time it takes to get a response from the model by a factor of 3–4.
This is the simplest way to use it:
import { ArcDirector, BrowserProvider, Skaldic } from 'arc-director';
import wasm from '@wllama/wllama/esm/wasm/wllama.wasm?url'; // vite
// const wasm = new URL('@wllama/wllama/esm/wasm/wllama.wasm', import.meta.url).href; // webpack
BrowserProvider.shared = new BrowserProvider({ wasm });
const director = new ArcDirector()
.withLoadingBar() // Shows a loading bar on screen while it downloads
.addBrowserModel('main', Skaldic.Gemma4E4B);
await director.start();
Anywhere else
It is an ordinary Gemma 4 E4B: the GGUFs run in llama.cpp, LM Studio, Ollama and other GGUF runners, and the safetensors in 🤗 Transformers. Out of ArcDirector it still chats, but it is at its best with ArcDirector's prompts.
Files
| File | Size | For |
|---|---|---|
skaldic-gemma-4-e4b-Q8_0.gguf | 7.9 GB | best quality |
skaldic-gemma-4-e4b-Q4_K_M.gguf | 4.6 GB | smaller GPUs |
mmproj-gemma-4-E4B-it-BF16.gguf | 1.0 GB | image input, beside either GGUF |
browser/skaldic-gemma-4-e4b-Q4_K_M-*-of-00009.gguf | 4.6 GB in 9 parts | the browser (each file under 2 GB) |
model.safetensors and configs | 15.9 GB | 🤗 Transformers, further fine-tuning, your own quantizations |
How it was made
Fine-tuned on thousands of game situations across multiple genres, each played out in ArcDirector, keeping only the plans that reached their goal. It was trained on ArcDirector's compact prompt and answers in JSON Arcs.
It also works as ArcDirector's decision model (System One), though it has had only light training for that.
Questions and issues: ArcDirector on GitHub.
License
Apache 2.0, as Gemma 4.