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
Apply the GameDojo website palette
Browse files
README.md
CHANGED
|
@@ -11,29 +11,31 @@ tags:
|
|
| 11 |
- computer-use
|
| 12 |
---
|
| 13 |
|
|
|
|
| 14 |
<p align="center" style="margin-bottom: 8px;">
|
| 15 |
<img src="https://gamedojo-benchmark.github.io/assets/img/logo.webp" alt="GameDojo" width="520" style="display: inline-block; width: 520px; max-width: 100%; height: auto; margin: 0;">
|
| 16 |
</p>
|
| 17 |
-
<h1 align="center" style="font-size: 1.35em; line-height: 1.35; margin-top: 0; margin-bottom: 12px;">
|
| 18 |
|
| 19 |
-
<p align="center">
|
| 20 |
-
<span style="display: inline-block; margin: 2px;
|
| 21 |
-
<a
|
| 22 |
-
<span style="display: inline-block; margin: 2px;
|
| 23 |
-
<span style="display: inline-block; margin: 2px;
|
| 24 |
</p>
|
| 25 |
|
| 26 |
-
<p align="center" style="background-color: #fff; border-radius:
|
| 27 |
-
<img src="https://gamedojo-benchmark.github.io/assets/img/institutions/tsinghua.jpg" alt="Tsinghua University" height="30" style="display: inline-block; vertical-align: middle; height: 30px; width: auto; margin:
|
| 28 |
-
<img src="https://gamedojo-benchmark.github.io/assets/img/institutions/ucas.png" alt="University of Chinese Academy of Sciences" height="27" style="display: inline-block; vertical-align: middle; height: 27px; width: auto; margin:
|
| 29 |
-
<img src="https://gamedojo-benchmark.github.io/assets/img/institutions/nus.jpg" alt="National University of Singapore" height="34" style="display: inline-block; vertical-align: middle; height: 34px; width: auto; margin:
|
| 30 |
-
<img src="https://gamedojo-benchmark.github.io/assets/img/institutions/hku-bilingual.svg" alt="香港大學 · The University of Hong Kong" height="24" style="display: inline-block; vertical-align: middle; height: 24px; width: auto; margin:
|
| 31 |
-
<img src="https://gamedojo-benchmark.github.io/assets/img/institutions/macau.png" alt="University of Macau" height="30" style="display: inline-block; vertical-align: middle; height: 30px; width: auto; margin:
|
| 32 |
</p>
|
| 33 |
|
| 34 |
-
<p align="center" style="line-height: 1.65; margin-bottom: 6px;"><strong><span style="white-space: nowrap;">Kuan Zhang<sup>1,*</sup>,</span> <span style="white-space: nowrap;">Zhihao Yang<sup>2,*</sup>,</span> <span style="white-space: nowrap;">Yukun Chen<sup>2,*</sup>,</span> <span style="white-space: nowrap;">Xingyiliang Yin<sup>3</sup>,</span> <span style="white-space: nowrap;">Mingyu Ouyang<sup>4</sup>,</span> <span style="white-space: nowrap;">Yue Su<sup>5</sup>,</span> <span style="white-space: nowrap;">Xiangnan Wu<sup>2</sup>,</span> <span style="white-space: nowrap;">Jiaming Li<sup>2</sup>,</span> <span style="white-space: nowrap;">Longze Chen<sup>2</sup>,</span> <span style="white-space: nowrap;">Run Luo<sup>4</sup>,</span> <span style="white-space: nowrap;">Zirong Chen<sup>1</sup>,</span> <span style="white-space: nowrap;">Lu Wang<sup>1,†</sup>,</span> <span style="white-space: nowrap;">Yiming Li<sup>1,†</sup></span></strong></p>
|
| 35 |
-
<p align="center" style="font-size: 0.9em; line-height: 1.6; margin-top: 0; margin-bottom: 4px;"><span style="display: inline-block; margin: 0 5px;"><sup>1</sup> Tsinghua University</span> <span style="display: inline-block; margin: 0 5px;"><sup>2</sup> University of the Chinese Academy of Sciences</span> <span style="display: inline-block; margin: 0 5px;"><sup>3</sup> University of Macau</span> <span style="display: inline-block; margin: 0 5px;"><sup>4</sup> National University of Singapore</span> <span style="display: inline-block; margin: 0 5px;"><sup>5</sup> University of Hong Kong</span></p>
|
| 36 |
-
<p align="center" style="font-size: 0.85em; margin
|
|
|
|
| 37 |
|
| 38 |
## Overview
|
| 39 |
|
|
|
|
| 11 |
- computer-use
|
| 12 |
---
|
| 13 |
|
| 14 |
+
<div style="background-color: #0d0f17; border: 1px solid #232737; border-radius: 12px; color: #eef0f6; padding: 16px 10px; margin: 8px 0 22px;">
|
| 15 |
<p align="center" style="margin-bottom: 8px;">
|
| 16 |
<img src="https://gamedojo-benchmark.github.io/assets/img/logo.webp" alt="GameDojo" width="520" style="display: inline-block; width: 520px; max-width: 100%; height: auto; margin: 0;">
|
| 17 |
</p>
|
| 18 |
+
<h1 align="center" style="color: #eef0f6; font-size: 1.35em; line-height: 1.35; margin-top: 0; margin-bottom: 12px;"><span style="color: #ffd98a;">Game</span><span style="color: #3fd9c6;">Dojo</span>: Benchmarking Real-Time Interactive Agents in Video Games</h1>
|
| 19 |
|
| 20 |
+
<p align="center" style="margin: 6px 0 14px;">
|
| 21 |
+
<span title="Link pending" aria-disabled="true" style="display: inline-block; vertical-align: middle; margin: 3px 2px; padding: 8px 12px; border: 1px solid; border-radius: 999px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; font-weight: 650; line-height: 1.35; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; background-color: #161925; border-color: #232737; color: rgba(238, 240, 246, 0.72);">Paper</span>
|
| 22 |
+
<a href="https://gamedojo-benchmark.github.io/" style="display: inline-block; vertical-align: middle; margin: 3px 2px; padding: 8px 12px; border: 1px solid; border-radius: 999px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; font-weight: 650; line-height: 1.35; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; background-color: #e7b14c; border-color: #e7b14c; color: #07080d; text-decoration: none;">Project Page</a>
|
| 23 |
+
<span title="Link pending" aria-disabled="true" style="display: inline-block; vertical-align: middle; margin: 3px 2px; padding: 8px 12px; border: 1px solid; border-radius: 999px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; font-weight: 650; line-height: 1.35; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; background-color: #161925; border-color: #232737; color: rgba(238, 240, 246, 0.72);">GitHub</span>
|
| 24 |
+
<span title="Link pending" aria-disabled="true" style="display: inline-block; vertical-align: middle; margin: 3px 2px; padding: 8px 12px; border: 1px solid; border-radius: 999px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; font-weight: 650; line-height: 1.35; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; background-color: #161925; border-color: #232737; color: rgba(238, 240, 246, 0.72);">Dataset & Benchmark</span>
|
| 25 |
</p>
|
| 26 |
|
| 27 |
+
<p align="center" style="background-color: #fff; border-radius: 8px; padding: 4px 1px; margin: 0 auto 14px;">
|
| 28 |
+
<img src="https://gamedojo-benchmark.github.io/assets/img/institutions/tsinghua.jpg" alt="Tsinghua University" height="30" style="display: inline-block; vertical-align: middle; height: 30px; width: auto; margin: 4px 2px;">
|
| 29 |
+
<img src="https://gamedojo-benchmark.github.io/assets/img/institutions/ucas.png" alt="University of Chinese Academy of Sciences" height="27" style="display: inline-block; vertical-align: middle; height: 27px; width: auto; margin: 4px 2px;">
|
| 30 |
+
<img src="https://gamedojo-benchmark.github.io/assets/img/institutions/nus.jpg" alt="National University of Singapore" height="34" style="display: inline-block; vertical-align: middle; height: 34px; width: auto; margin: 4px 2px;">
|
| 31 |
+
<img src="https://gamedojo-benchmark.github.io/assets/img/institutions/hku-bilingual.svg" alt="香港大學 · The University of Hong Kong" height="24" style="display: inline-block; vertical-align: middle; height: 24px; width: auto; margin: 4px 2px;">
|
| 32 |
+
<img src="https://gamedojo-benchmark.github.io/assets/img/institutions/macau.png" alt="University of Macau" height="30" style="display: inline-block; vertical-align: middle; height: 30px; width: auto; margin: 4px 2px;">
|
| 33 |
</p>
|
| 34 |
|
| 35 |
+
<p align="center" style="line-height: 1.65; margin-bottom: 6px;"><strong style="color: #eef0f6;"><span style="white-space: nowrap;">Kuan Zhang<sup style="color: #ffd98a;">1,*</sup>,</span> <span style="white-space: nowrap;">Zhihao Yang<sup style="color: #ffd98a;">2,*</sup>,</span> <span style="white-space: nowrap;">Yukun Chen<sup style="color: #ffd98a;">2,*</sup>,</span> <span style="white-space: nowrap;">Xingyiliang Yin<sup style="color: #ffd98a;">3</sup>,</span> <span style="white-space: nowrap;">Mingyu Ouyang<sup style="color: #ffd98a;">4</sup>,</span> <span style="white-space: nowrap;">Yue Su<sup style="color: #ffd98a;">5</sup>,</span> <span style="white-space: nowrap;">Xiangnan Wu<sup style="color: #ffd98a;">2</sup>,</span> <span style="white-space: nowrap;">Jiaming Li<sup style="color: #ffd98a;">2</sup>,</span> <span style="white-space: nowrap;">Longze Chen<sup style="color: #ffd98a;">2</sup>,</span> <span style="white-space: nowrap;">Run Luo<sup style="color: #ffd98a;">4</sup>,</span> <span style="white-space: nowrap;">Zirong Chen<sup style="color: #ffd98a;">1</sup>,</span> <span style="white-space: nowrap;">Lu Wang<sup style="color: #ffd98a;">1,†</sup>,</span> <span style="white-space: nowrap;">Yiming Li<sup style="color: #ffd98a;">1,†</sup></span></strong></p>
|
| 36 |
+
<p align="center" style="color: rgba(238, 240, 246, 0.62); font-size: 0.9em; line-height: 1.6; margin-top: 0; margin-bottom: 4px;"><span style="display: inline-block; margin: 0 5px;"><sup style="color: #ffd98a;">1</sup> Tsinghua University</span> <span style="display: inline-block; margin: 0 5px;"><sup style="color: #ffd98a;">2</sup> University of the Chinese Academy of Sciences</span> <span style="display: inline-block; margin: 0 5px;"><sup style="color: #ffd98a;">3</sup> University of Macau</span> <span style="display: inline-block; margin: 0 5px;"><sup style="color: #ffd98a;">4</sup> National University of Singapore</span> <span style="display: inline-block; margin: 0 5px;"><sup style="color: #ffd98a;">5</sup> University of Hong Kong</span></p>
|
| 37 |
+
<p align="center" style="color: rgba(238, 240, 246, 0.62); font-size: 0.85em; margin: 0;"><span style="display: inline-block; margin: 0 5px;"><sup style="color: #ffd98a;">*</sup> Equal contribution</span> <span style="display: inline-block; margin: 0 5px;"><sup style="color: #ffd98a;">†</sup> Co-corresponding authors</span></p>
|
| 38 |
+
</div>
|
| 39 |
|
| 40 |
## Overview
|
| 41 |
|