Type dogfight and two saucer teams appear over a sleeping city. Team ZORB and team KRELL are each commanded by a different small language model running on your own machine. About once a second, each commander reads a short description of the field and gives every saucer an order: attack, hunt, flee, or go and steal a cow. When a team loses a ship its commander shouts a battle cry, then writes down one rule so the same mistake does not happen twice. Press any key and your terminal is back exactly as you left it.

LLM Dogfight is MIT licensed and part of Mr Pirate's tools. The directory lists it as LLM Dogfight.

Why it is worth ten minutes of your evening

Benchmarks tell you a model's score. LLM Dogfight shows you its character. In the README's own notes, Qwen3-0.6B answers in about a tenth of a second and rarely breaks the order format, SmolLM2-1.7B plays a cautious game, and DeepSeek-R1-Distill-Qwen-1.5B thinks out loud, so its orders arrive late. Watching two of them trade the lead is a fast, honest feel for how small models behave when they have to decide again every second.

It also runs on what you have:

  • Any terminal that shows truecolor text. The picture is half-blocks and braille, with no graphics protocol. The default Ubuntu terminal, GNOME Terminal, kitty, iTerm2 and Ghostty all work, on Linux and macOS.
  • Any GPU, or none. The default pair needs 2.2 GB and fits any CUDA card. dogfight models reads your GPU or unified memory and names the strongest pair it can hold, up to 14B models on large cards and Macs. With no GPU, dogfight cpu runs the real models slowly and dogfight ufo uses built-in pilots.
  • No accounts. Every model in the catalogue is ungated on Hugging Face: no licence click-through and no token.

The rules keep small models honest

Small models drift. Left alone they retreat with healthy saucers or follow a lesson off a cliff. So each team flies under a doctrine of six numbers with hard bounds, such as the hit points below which a saucer must flee and the share of the fleet that may flee at once. After every reply, orders that break the flee or focus rules are corrected before they are flown, and the model is told how many were corrected. Abduction is never corrected, because what a commander does with cows says the most about it.

The guardrail design follows AutoSafe (Zhang et al., 2025), mapped onto a game and without any fine-tuning. The models stay small and untouched. What learns is the safety envelope around them.

Evolve the tactics

dogfight evolve adds a genetic algorithm, written in Rust, with no extra model calls. Each team keeps a population of six doctrines. Each doctrine plays a window of up to 90 seconds and is scored on kills, losses, cows and game results per minute. The top three survive, and the bottom three are replaced by children made with crossover and mutation inside the bounds. Populations persist between sessions, so the next battle starts from the best doctrine found so far.

Built to be trusted with your terminal

The game is a 0.8 MB Rust binary with a single dependency, libc. Everything a model says is reduced to printable ASCII before it reaches the screen, models never get a tool, a file or a shell, and the binary never opens a network connection. The terminal is restored on every exit path, including SIGTERM and panics, and dogfight remove deletes everything the tool put on the machine, itself included.

Try it

cargo install --git https://github.com/AlveeeRahman/llm-dogfight
pip install torch transformers   # NVIDIA GPU, 8 GB or more
pip install mlx-lm               # or, on an Apple silicon Mac
dogfight

The first run downloads the two default models (2.2 GB). Release binaries for Linux and macOS are on the releases page, and the project site has screenshots of real battles. For a stronger fight, try dogfight --zorb qwen3-0.6b --krell gemma3-1b, which the README calls the most even of the small pairs.

If you run models locally for real work too, the guide to running LLMs locally covers the tools that load them.