Skip to content
hao-ai-labPublic

About

No description, website, or topics provided.

Resources

Stars

10 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

MCJev

Real-Time Decisions with Jev: Self-Evolution and a 24 ms Engine on NVIDIA Blackwell.

Blog post · X post · Play: mc.alexzms.com (Minecraft Java 1.9+)

  • A diffusion LLM fights real people in Minecraft. Jev bots play Block UHC (sword, bow, lava and water buckets, blocks) and Sumo on a public server, and every move is picked by the model; nobody steers them.
  • ~24 ms per decision. The model scores every move a bot could make in one forward pass, with zero tokens generated: up to ~40 decisions a second on one Blackwell GPU, faster than the server's own 20 Hz tick.
  • 54 people, 1,795 rounds, 70%. In the first 32 hours after release, 54 people played 1,795 rounds against Jev; in Block UHC it won 70% of its rounds against real human players.

The model is DJev by mmastrac: Google's open-weight text-diffusion LLM DiffusionGemma-26B-A4B, asked as a Jev-style decision model. It is served by DJev-serve, our inference engine, which answers 2.5× faster than the same model on a leading inference engine.

MCJev at a glance

What is in this repository

serving/ DJev-serve: DiffusionGemma as a decision model behind the POST /api/evaluate contract. A reference Hugging Face server, vLLM engines, and the fast path that runs one forward per decision from a single CUDA graph (prefix-cache slots, FlashAttention-2 on the sliding-window layers, tuned Triton for the global layers, batching of queued reads), plus a load-balancing gateway, benchmarks and performance notes.
harness/ The Jev harness: a mineflayer body that plays at 20 ticks a second (aim, arrow lead and dodge, lava and ledge guards) and a Python head that writes the fight as text, offers the moves, and asks DJev-serve. Every harness version from the first to the one that played the public (p_uhc_pro_v10), Sumo and 2v2, plus plugin-free arena referees.

How it works

A deciding head, an even faster actioner. A model call, however fast, is not a tick. The actioner runs the reflexes that must happen every 50 ms; the head picks the tactic, out of ~20 options, dozens of times a second.

The loop

Scoring, not generating. DiffusionGemma pairs a causal encoder over the prompt with a bidirectional decoder that denoises a canvas of answer tokens. DJev writes the answer scaffold into the canvas and leaves only the answer slot masked; one decoder pass fills it, and the logits at the slot, restricted to the options' tokens and renormalised, are a full distribution over the moves. Jev presses the top one and asks again ~24 ms later. This is how DJev works: mmastrac's Jev-style decision server for DiffusionGemma, built on the structured reads he added to vLLM (#57250, #58216).

From 174 ms to ~24 ms. Three steps:

One decision What changed
Hugging Face transformers 174 ms the first version: 10,340 kernel launches per forward for 55 ms of GPU work
a leading inference engine with the structured read ~60 ms no generation loop, but general-purpose scheduling
DJev-serve ~24 ms no scheduler: one forward per decision from one CUDA graph

The 174 ms is the first prototype on a short test request; ~60 and ~24 ms are medians in real rounds. On a controlled benchmark (the same recorded request on one B200) the speedup is the same 2.5×. Details in serving/docs/PERFORMANCE.md.

Quick start

You need an NVIDIA GPU with ~50 GB of memory, a Minecraft Java 1.11.2 server (Paper or Spigot, online-mode=false), Python 3.10+ and Node.js 22+.

# 1. Serve DJev (see serving/README.md for the vLLM nightly it needs)
pip install vllm --pre --extra-index-url https://wheels.vllm.ai/nightly
pip install -r serving/requirements.txt
serving/serve.sh                                 # http://127.0.0.1:8765, prints {"ready": true}
python serving/client.py                         # a test request

# 2. Run a Jev on your Minecraft server
cd harness/body && npm install && cd ..
echo 'JEV_URL=http://127.0.0.1:8765' > .env
python3 -u agent.py --name Jev1 --harness p_uhc_pro_v10 --vision off --host 127.0.0.1 --port 25565 --quiet

# 3. Start a fight (server console or RCON)
tell Jev1 fight Steve: kill Steve (Block UHC)

harness/scenes/uhc_arena.py builds a Block UHC arena and referees rounds over RCON; see harness/README.md.

Acknowledgements

We especially thank NVIDIA for providing the B200 GPUs that MCJev runs on. We thank Google for releasing DiffusionGemma with open weights; the vLLM, FlashAttention, FlashInfer and mineflayer projects that MCJev builds on; TypeSafe AI for the Jev idea; mmastrac, whose structured reads for DiffusionGemma in vLLM (#57250, #58216) the vLLM engines run on, and for DJev itself, the Jev-style decision server on DiffusionGemma that MCJev's head is; the NanoJev contributors, whose request contract DJev-serve implements (serving/server.py adapts their validate_request); and everyone who logged in and fought Jev.

Citation

If you use MCJev, please cite:

@misc{mcjev2026,
  title        = {Real-Time Decisions with {Jev}: Self-Evolution and a 24 ms Engine on {NVIDIA} {Blackwell}},
  author       = {Zhang, Minshen and Chen, Junda and Yang, Yuanbo and Zhang, Yuxuan and Sun, Yi and Duan, Shaoxiong and Hu, Lanxiang and Leng, Jiaqi and Wu, Yulun and Lin, Will and Zhang, Hao},
  year         = {2026},
  month        = oct,
  howpublished = {Hao AI Lab blog},
  url          = {https://haoailab.com/blogs/mcjev/}
}

MCJev builds on these works:

@misc{typesafe2026jev,
  title        = {Introducing System One Models and {Jev}},
  author       = {{TypeSafe AI}},
  year         = {2026},
  howpublished = {\url{https://typesafe.ai/blog/introducing-system-one-models-and-jev}}
}

@misc{nanojev2026,
  title        = {{NanoJev}: A Nano Replica of {Jev}},
  author       = {{OpenJev contributors}},
  year         = {2026},
  howpublished = {\url{https://github.com/TianyuCodings/NanoJev}}
}

@misc{diffusiongemma2026,
  title        = {{DiffusionGemma}},
  author       = {{Google}},
  year         = {2026},
  howpublished = {\url{https://huggingface.co/google/diffusiongemma-26B-A4B-it}}
}

@inproceedings{kwon2023vllm,
  title        = {Efficient Memory Management for Large Language Model Serving with {PagedAttention}},
  author       = {Kwon, Woosuk and Li, Zhuohan and Zhuang, Siyuan and Sheng, Ying and Zheng, Lianmin and Yu, Cody Hao and Gonzalez, Joseph E. and Zhang, Hao and Stoica, Ion},
  booktitle    = {Proceedings of the 29th Symposium on Operating Systems Principles (SOSP)},
  year         = {2023}
}

@inproceedings{dao2024flashattention2,
  title        = {{FlashAttention-2}: Faster Attention with Better Parallelism and Work Partitioning},
  author       = {Dao, Tri},
  booktitle    = {International Conference on Learning Representations (ICLR)},
  year         = {2024}
}

License

Apache License 2.0 (see LICENSE). Code adapted from other projects keeps its license; see THIRD_PARTY_NOTICES.md.

About

No description, website, or topics provided.

Resources

Stars

10 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages