CoolFace
Modelpublic

BotGoesBrrr/nitrogen-sonic3-ft

sourceHugging Faceotherupdated 3mo agoView on Hugging Face
0likes
Model Card

NitroGen-Sonic3-FT

Fine-tuned version of `nvidia/NitroGen` (493M-parameter vision-action foundation model) on 27 minutes of human gameplay of Sonic the Hedgehog 3 (Genesis), Level 1.

The vision tower (SigLIP2) is frozen; all other parameters (468M) were fine-tuned for 1 epoch (~24k steps, batch size 4) using the model's own rectified-flow loss, on a single RTX 4070 Ti Super (16GB), in under an hour.

TL;DR

AgentAvg max-xBest max-xDeath rateCleared the loop wall (11,630)?
Random6,6938,100–✗
NitroGen zero-shot (base model)7,78810,2930.30✗
PPO specialist (5,000,000 env steps, from scratch)11,51311,6320.02✗ stuck at the loop
This model (27 min demo, 1 fine-tuning epoch)11,36912,3440.35✅

max-x = furthest in-level x-position reached, read directly from game RAM, SonicTheHedgehog3-Genesis/Level1, 20–50 stochastic episodes per agent. Same evaluation harness across all rows.

One-line summary: a foundation model + 27 minutes of demonstrations roughly matches a specialist trained for 5M RL steps from scratch, and clears an obstacle (a momentum "loop") that the specialist never does — at the cost of being less consistent (it dies more often).

Model Details

  • —Base model: `nvidia/NitroGen`, 493M params, SigLIP2 vision encoder + flow-matching (DiT-style) action head, trained on ~40,000 hours across 1,000+ games. Outputs Xbox-style gamepad actions: [j_left(2), j_right(2), buttons(21)].
  • —Fine-tuning task: imitation learning (rectified-flow behavioral cloning) on a single human demo of Sonic 3, Level 1.
  • —Frozen: vision tower (SigLIP2).
  • —Trained: action head / DiT (468M params), full fine-tune (no LoRA — fits in 16GB at bs=1 without it).
  • —Training data: 27 minutes of human gameplay (~96,860 training samples after windowing), recorded via stable-retro .bk2 and converted to NitroGen's native format (256x256 RGB + 25-dim actions per frame).
  • —Hardware: 1x RTX 4070 Ti Super, 16GB VRAM. 1 epoch, batch size 4, <1 hour wall-clock.
  • —Eval protocol: same simulator-truth metric (max_x) for all baselines — see the code repo's EVALS.md.

How to Use

This checkpoint is a drop-in replacement for the base nvidia/NitroGen weights in NitroGen's own inference server (ng.pt format). Load it the same way you'd load the base model, pointing at this checkpoint instead:

bash
hf download BotGoesBrrr/nitrogen-sonic3-ft ng.pt --local-dir /models/nitrogen-sonic3-ft
# then start the NitroGen inference server with /models/nitrogen-sonic3-ft/ng.pt

For the full eval / gamepad-mapping client used to produce the numbers above, see `training/rl/eval_nitrogen.py` in the code repo.

Intended Use

  • —Research / demonstration of foundation-model fine-tuning for game-playing agents with very small (minutes-scale) human demo datasets.
  • —AI-agent gameplay content (streaming, video) — see @BotGoesBrrr.

This is not a competitive Sonic-playing agent, a general-purpose production game agent, or a benchmark-beating model — see Limitations.

Limitations

  • —Single game, single level: only validated on SonicTheHedgehog3-Genesis/Level1. No claims about other games or levels.
  • —Less stable than the from-scratch specialist: death rate 0.35 vs the PPO specialist's 0.02. It matches the specialist on average distance and clears the loop more often, but it dies far more frequently — equal on progress, not on reliability.
  • —Demo-capped: the fine-tuned model's best run (12,344) matches the best run in its own training demo. It learned to imitate the demonstrator, including the point where the demonstrator stopped. It does not exceed its teacher — it reproduces the teacher's ceiling more reliably than the base model does.
  • —Small n: fine-tuned eval is 20 stochastic episodes (single seed). Treat the headline numbers as a strong signal, not a tight statistical bound.
  • —Imitation, not exploration: behavioral cloning via the model's flow-matching loss, not RL — it cannot discover strategies absent from the demo.

Training Details

LossModel's native NitroGen.forward(data) -> {"loss"} (rectified-flow BC)
Frozen paramsVision tower (SigLIP2)
Trainable params~468M (everything except vision tower)
Epochs / batch size / steps1 / 4 / ~24,000
Hardware1x RTX 4070 Ti Super (16GB)
Data27 min human demo -> 96,860 windowed samples (256x256 RGB + 25-dim action)

License

This model is a derivative of `nvidia/NitroGen` and is distributed under the same NVIDIA Open Model License, which permits commercial use and derivative works.

Disclosure

All gameplay shown in associated content is AI agent gameplay. Training data is a human demonstration recorded by the repo owner; the model was not trained on any other person's data.