MaVi-0.1-65M

MaVi is a small language model that turns a plain-English game idea into a playable 2D game. It was trained from scratch, together with its own game engine: the model writes GSL, a compact game-specification language (see GSL.md), and the engine plays it, validates it and exports it to Godot 4 and Ren'Py. It can also draw pixel-art sprites in PXL, a small drawing language, and edit existing games and levels.

This is an alpha release (version 0.1, 64.7M parameters).

Model

Architecture decoder-only transformer, 12 layers, 10 heads, d_model 640, d_ff 1728 (RoPE, RMSNorm, SwiGLU, tied embeddings)
Parameters 64,732,800
Tokenizer byte-level BPE, 8,192 tokens, trained on GSL + English
Context 4,096 tokens (NTK RoPE base 27524)
Training English pretraining on public-domain books, then a fine-tune on game tasks; single RTX 4060 Ti
Skills create (prompt โ†’ game), edit, repair, GDScript, draw / redraw (pixel art), level edits

Use

pip install torch safetensors
python generate.py "a platformer where an orange fox collects cherries and avoids bees and snakes, 3 lives"
python generate.py --task draw "orange fox side view, walk cycle"

The output is GSL (or PXL for sprites). The model alone only writes the spec: playing it needs the MaVi engine, which also checks it and repairs errors with the model. Prompt format (see formats.py): <|bos|><|create|>{prompt}<|gsl|> โ†’ game, <|bos|><|r2|>{prompt}<|gsl|> โ†’ sprite.

Training data

All training data is generated or openly licensed:

  • Game tasks: synthetic prompt โ†’ game examples from a procedural generator (16 genres, everyday vocabulary, casual phrasing); every example was played by a headless playtester and kept only if valid and playable.
  • English: public-domain books from Project Gutenberg.
  • Code: GDScript and Ren'Py files from MIT / CC0 licensed GitHub repositories.
  • Pixel art: procedurally drawn sprites, plus sprites from Kenney (CC0) and OpenGameArt (CC0 and CC-BY, credited in ATTRIBUTION.md).

Evaluation

Evaluated on 200 held-out tasks (each output checked by the engine's validator and a headless playtester):

MaVi v3.2 MaVi-0.1 (v3.3)
valid and playable 91.5% 93.0%
new-game (create) tasks 88.2% 90.3%
repair tasks 100% 100%
edit tasks 100% 100%

Single attempt, no retries; the MaVi Studio additionally retries and repairs with the engine's feedback.

Limitations

  • Alpha quality: it sometimes leaves out something the prompt asked for, or repeats itself on long levels.
  • It draws familiar subjects (animals, characters, items, vehicles) well and unfamiliar ones poorly.
  • It writes GSL v0.3 games. The engine's v0.4 mechanics (melee, dash, keys and doors, talking characters) arrive with the next model.
  • English only. Not meant for anything beyond making small games.

Licence

Weights and code: Apache-2.0. Training art credits: ATTRIBUTION.md.

Downloads last month
35
Safetensors
Model size
64.7M params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support