Image-Text-to-Text
Transformers
Safetensors
English
qwen3_5
gamescaling
game-agent
embodied-agent
keyboard-mouse
continued-pretraining
conversational
Instructions to use THUSI-Lab/GameScaling-2B-S1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use THUSI-Lab/GameScaling-2B-S1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="THUSI-Lab/GameScaling-2B-S1") 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/GameScaling-2B-S1") model = AutoModelForMultimodalLM.from_pretrained("THUSI-Lab/GameScaling-2B-S1", 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/GameScaling-2B-S1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "THUSI-Lab/GameScaling-2B-S1" # 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/GameScaling-2B-S1", "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/GameScaling-2B-S1
- SGLang
How to use THUSI-Lab/GameScaling-2B-S1 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/GameScaling-2B-S1" \ --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/GameScaling-2B-S1", "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/GameScaling-2B-S1" \ --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/GameScaling-2B-S1", "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/GameScaling-2B-S1 with Docker Model Runner:
docker model run hf.co/THUSI-Lab/GameScaling-2B-S1
Card: aligned with THUSI-Lab/GameScaling
Browse files
README.md
CHANGED
|
@@ -48,12 +48,12 @@ tags:
|
|
| 48 |
<img src="https://huggingface.co/THUSI-Lab/GameScaling/resolve/main/assets/teaser.jpg" alt="From one physical world to diverse virtual worlds" width="100%">
|
| 49 |
</p>
|
| 50 |
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
|
| 58 |
## Overview
|
| 59 |
|
|
|
|
| 48 |
<img src="https://huggingface.co/THUSI-Lab/GameScaling/resolve/main/assets/teaser.jpg" alt="From one physical world to diverse virtual worlds" width="100%">
|
| 49 |
</p>
|
| 50 |
|
| 51 |
+
**This repository: GameScaling-2B-S1.** Qwen3.5-2B continued pre-trained on Minecraft gameplay only
|
| 52 |
+
(S1), 1,600 h of gameplay, 6,736 training steps; 5.4 GB of bfloat16 weights on
|
| 53 |
+
1 GPU. Serve it with
|
| 54 |
+
`bash scripts/serve_vllm.sh THUSI-Lab/GameScaling-2B-S1 8000` (§1). The inference client, prompts and
|
| 55 |
+
scripts are in [THUSI-Lab/GameScaling](https://huggingface.co/THUSI-Lab/GameScaling); all eight checkpoints are in the
|
| 56 |
+
[GameScaling collection](https://huggingface.co/collections/THUSI-Lab/gamescaling-model-6acf7c0c6500ebee61a7f872).
|
| 57 |
|
| 58 |
## Overview
|
| 59 |
|