Instructions to use THUSI-Lab/GameDojo-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use THUSI-Lab/GameDojo-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="THUSI-Lab/GameDojo-4B") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("THUSI-Lab/GameDojo-4B") model = AutoModelForMultimodalLM.from_pretrained("THUSI-Lab/GameDojo-4B", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use THUSI-Lab/GameDojo-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "THUSI-Lab/GameDojo-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "THUSI-Lab/GameDojo-4B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/THUSI-Lab/GameDojo-4B
- SGLang
How to use THUSI-Lab/GameDojo-4B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "THUSI-Lab/GameDojo-4B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "THUSI-Lab/GameDojo-4B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "THUSI-Lab/GameDojo-4B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "THUSI-Lab/GameDojo-4B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use THUSI-Lab/GameDojo-4B with Docker Model Runner:
docker model run hf.co/THUSI-Lab/GameDojo-4B
Update GameDojo-4B model card
Browse files
README.md
CHANGED
|
@@ -11,17 +11,33 @@ tags:
|
|
| 11 |
- computer-use
|
| 12 |
---
|
| 13 |
|
| 14 |
-
|
|
|
|
| 15 |
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
## Training
|
| 19 |
|
| 20 |
-
We fine-tuned [Qwen3.5-4B](https://huggingface.co/Qwen/Qwen3.5-4B) with supervised learning on 240
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
## Download
|
| 23 |
|
| 24 |
-
The checkpoint is distributed as BF16 Safetensors. Download
|
| 25 |
|
| 26 |
```bash
|
| 27 |
hf download iTheresaApocalypse/GameDojo-4B --local-dir GameDojo-4B
|
|
@@ -40,4 +56,4 @@ model = Qwen3_5ForConditionalGeneration.from_pretrained(
|
|
| 40 |
).eval()
|
| 41 |
```
|
| 42 |
|
| 43 |
-
Use the bundled `chat_template.jinja` to format
|
|
|
|
| 11 |
- computer-use
|
| 12 |
---
|
| 13 |
|
| 14 |
+
<h1 align="center">GameDojo-4B</h1>
|
| 15 |
+
<p align="center"><strong>GameDojo · Benchmarking Real-Time Interactive Agents in Video Games</strong></p>
|
| 16 |
|
| 17 |
+
<p align="center">
|
| 18 |
+
<img src="https://img.shields.io/badge/Paper-6B7280?style=for-the-badge&logo=arxiv&logoColor=white" alt="Paper (link pending)">
|
| 19 |
+
<a href="https://gamedojo-benchmark.github.io/"><img src="https://img.shields.io/badge/Project%20Page-2563EB?style=for-the-badge&logo=githubpages&logoColor=white" alt="Project Page"></a>
|
| 20 |
+
<img src="https://img.shields.io/badge/GitHub-6B7280?style=for-the-badge&logo=github&logoColor=white" alt="GitHub (link pending)">
|
| 21 |
+
<img src="https://img.shields.io/badge/Dataset%20%26%20Benchmark-6B7280?style=for-the-badge&logo=huggingface&logoColor=white" alt="Dataset & Benchmark (link pending)">
|
| 22 |
+
</p>
|
| 23 |
+
|
| 24 |
+
## Overview
|
| 25 |
+
|
| 26 |
+
GameDojo-4B is a vision-language model for video game boss encounters. It takes game observations and task context and generates keyboard and mouse actions for the GameDojo computer-use (CUA) interface. Each action chunk covers 200 ms of game control.
|
| 27 |
+
|
| 28 |
+
GameDojo provides 120 boss encounters across 20 game environments, split evenly between 2D and 3D. Its CUA and Semantic interfaces expose different levels of action abstraction. Real-time and time-paused modes let researchers vary whether the simulation advances during inference.
|
| 29 |
|
| 30 |
## Training
|
| 31 |
|
| 32 |
+
We fine-tuned [Qwen3.5-4B](https://huggingface.co/Qwen/Qwen3.5-4B) with supervised learning on a balanced 240-hour subset of GameDojo-Data. The subset contains 40 minutes of gameplay for each of the 120 bosses at each of three difficulty levels (Easy, Medium, and Hard).
|
| 33 |
+
|
| 34 |
+
## Evaluation
|
| 35 |
+
|
| 36 |
+
We evaluate GameDojo-4B through CUA in both timing modes at all three difficulty levels. We report average win rate and average progress. A win requires defeating the boss, and progress measures the fraction of total boss health removed during the episode.
|
| 37 |
|
| 38 |
## Download
|
| 39 |
|
| 40 |
+
The checkpoint is distributed as BF16 Safetensors. Download it together with its configuration and processor files.
|
| 41 |
|
| 42 |
```bash
|
| 43 |
hf download iTheresaApocalypse/GameDojo-4B --local-dir GameDojo-4B
|
|
|
|
| 56 |
).eval()
|
| 57 |
```
|
| 58 |
|
| 59 |
+
Use the bundled `chat_template.jinja` to format observations and task context. Pass the generated actions to the GameDojo CUA executor to advance the encounter.
|