Image-Text-to-Text
Transformers
Safetensors
English
Chinese
qwen3_vl
text-generation
Vision-Language-Model
Vision-Language-Action
conversational
Instructions to use zzzrw/GEM-2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zzzrw/GEM-2B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="zzzrw/GEM-2B") 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)# Load model directly from transformers import AutoProcessor, AutoModelForSeq2SeqLM processor = AutoProcessor.from_pretrained("zzzrw/GEM-2B") model = AutoModelForSeq2SeqLM.from_pretrained("zzzrw/GEM-2B", 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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use zzzrw/GEM-2B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zzzrw/GEM-2B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zzzrw/GEM-2B", "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/zzzrw/GEM-2B
- SGLang
How to use zzzrw/GEM-2B 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 "zzzrw/GEM-2B" \ --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": "zzzrw/GEM-2B", "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 "zzzrw/GEM-2B" \ --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": "zzzrw/GEM-2B", "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 zzzrw/GEM-2B with Docker Model Runner:
docker model run hf.co/zzzrw/GEM-2B
Update README.md
Browse files
README.md
CHANGED
|
@@ -8,4 +8,35 @@ language:
|
|
| 8 |
base_model:
|
| 9 |
- Qwen/Qwen3-VL-2B-Instruct
|
| 10 |
pipeline_tag: image-text-to-text
|
| 11 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
base_model:
|
| 9 |
- Qwen/Qwen3-VL-2B-Instruct
|
| 10 |
pipeline_tag: image-text-to-text
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
<div align="center">
|
| 14 |
+
<h1>GEM: Generative Supervision Helps Embodied Intelligence</h1>
|
| 15 |
+
|
| 16 |
+
<p align="center">
|
| 17 |
+
<a href="https://zhaorw02.github.io/">Ruowen Zhao</a><sup>1</sup>,
|
| 18 |
+
Bangguo Li<sup>1</sup>,
|
| 19 |
+
<a href="https://liuzuyan.github.io/">Zuyan Liu</a><sup>1,2,†</sup>,
|
| 20 |
+
Yinan Liang<sup>1</sup>,
|
| 21 |
+
<a href="https://jamesyjl.github.io/">Junliang Ye</a><sup>1</sup>,
|
| 22 |
+
<a href="https://liuff19.github.io/">Fangfu Liu</a><sup>1</sup>,
|
| 23 |
+
<br>
|
| 24 |
+
Diankun Wu<sup>1</sup>,
|
| 25 |
+
<a href="https://thuwzy.github.io/">Zhengyi Wang</a><sup>1</sup>,
|
| 26 |
+
<a href="https://yuxumin.github.io/">Xumin Yu</a><sup>2</sup>,
|
| 27 |
+
<a href="https://raoyongming.github.io/">Yongming Rao</a><sup>2,✉</sup>,
|
| 28 |
+
<a href="https://ancientmooner.github.io/">Han Hu</a><sup>2</sup>,
|
| 29 |
+
<a href="https://ml.cs.tsinghua.edu.cn/~jun/index.shtml">Jun Zhu</a><sup>1,✉</sup>
|
| 30 |
+
<br>
|
| 31 |
+
<sup>†</sup>Project Lead.<sup>✉</sup>Corresponding Author.
|
| 32 |
+
<br>
|
| 33 |
+
<sup>1</sup>Tsinghua University,
|
| 34 |
+
<sup>2</sup>Tencent Hunyuan
|
| 35 |
+
</p>
|
| 36 |
+
<a href='https://zhaorw02.github.io/GEM/'><img src="https://img.shields.io/badge/Project-Page-Green" alt="Project Page"></a>
|
| 37 |
+
<a href=""><img src="https://img.shields.io/badge/Paper-Arxiv-red?logo=arxiv" alt="Paper"></a>
|
| 38 |
+
<a href="https://github.com/zhaorw02/GEM/"><img src="https://img.shields.io/badge/GitHub-Repo-181717?logo=github&logoColor=white" alt="GitHub"></a>
|
| 39 |
+
<a href="https://huggingface.co/zzzrw/GEM-2B/"><img src="https://img.shields.io/badge/Models-HuggingFace-yellow?logo=huggingface" alt="Models"></a>
|
| 40 |
+
<a href="https://huggingface.co/datasets/zzzrw/GEM-250K/"><img src="https://img.shields.io/badge/Dataset-HuggingFace-yellow?logo=huggingface" alt="Dataset"></a>
|
| 41 |
+
|
| 42 |
+
</div>
|