Image-Text-to-Text
Transformers
Safetensors
qwen3_vl
graph
multi-task
multi-modal
scene-graph
event-graph
molecular-graph
conversational
Instructions to use zmli/G-Substrate-Qwen3-VL-2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zmli/G-Substrate-Qwen3-VL-2B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="zmli/G-Substrate-Qwen3-VL-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, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("zmli/G-Substrate-Qwen3-VL-2B") model = AutoModelForMultimodalLM.from_pretrained("zmli/G-Substrate-Qwen3-VL-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 zmli/G-Substrate-Qwen3-VL-2B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zmli/G-Substrate-Qwen3-VL-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": "zmli/G-Substrate-Qwen3-VL-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/zmli/G-Substrate-Qwen3-VL-2B
- SGLang
How to use zmli/G-Substrate-Qwen3-VL-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 "zmli/G-Substrate-Qwen3-VL-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": "zmli/G-Substrate-Qwen3-VL-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 "zmli/G-Substrate-Qwen3-VL-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": "zmli/G-Substrate-Qwen3-VL-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 zmli/G-Substrate-Qwen3-VL-2B with Docker Model Runner:
docker model run hf.co/zmli/G-Substrate-Qwen3-VL-2B
Improve metadata and model card
#1
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,23 +1,26 @@
|
|
| 1 |
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
base_model: Qwen/Qwen3-VL-2B-Instruct
|
|
|
|
|
|
|
|
|
|
| 4 |
tags:
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
pipeline_tag: text-generation
|
| 12 |
---
|
| 13 |
|
| 14 |
# G-Substrate (Qwen3-VL-2B)
|
| 15 |
|
| 16 |
Multi-task fine-tuned model from the paper **"Graph is a Substrate Across Data Modalities"** (ICML 2026).
|
| 17 |
|
|
|
|
|
|
|
| 18 |
## Model Description
|
| 19 |
|
| 20 |
-
This model is fine-tuned from [Qwen3-VL-2B-Instruct](https://huggingface.co/Qwen/Qwen3-VL-2B-Instruct) using the G-Substrate framework
|
| 21 |
|
| 22 |
### Training Details
|
| 23 |
|
|
@@ -43,11 +46,11 @@ This model is fine-tuned from [Qwen3-VL-2B-Instruct](https://huggingface.co/Qwen
|
|
| 43 |
```python
|
| 44 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 45 |
|
| 46 |
-
model = AutoModelForCausalLM.from_pretrained("
|
| 47 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
| 48 |
```
|
| 49 |
|
| 50 |
-
For batch inference with vLLM, see the [G-Substrate repository](https://github.com/
|
| 51 |
|
| 52 |
## Results
|
| 53 |
|
|
@@ -55,11 +58,6 @@ For batch inference with vLLM, see the [G-Substrate repository](https://github.c
|
|
| 55 |
|----:|----:|----:|----:|-------:|--------:|----------:|--------:|--------:|--------:|-------:|
|
| 56 |
| 98.41 | 96.97 | 48.59 | 94.54 | 51.53 | 68.47 | 25.38 | 52.20 | 42.68 | 40.91 | 25.15 |
|
| 57 |
|
| 58 |
-
## Links
|
| 59 |
-
|
| 60 |
-
- Code: [zmli6/G-Substrate](https://github.com/zmli6/G-Substrate)
|
| 61 |
-
- Dataset: [zmli/G-Substrate-Data](https://huggingface.co/datasets/zmli/G-Substrate-Data)
|
| 62 |
-
|
| 63 |
## Citation
|
| 64 |
|
| 65 |
```bibtex
|
|
@@ -69,4 +67,4 @@ For batch inference with vLLM, see the [G-Substrate repository](https://github.c
|
|
| 69 |
booktitle={ICML},
|
| 70 |
year={2026}
|
| 71 |
}
|
| 72 |
-
```
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
base_model: Qwen/Qwen3-VL-2B-Instruct
|
| 3 |
+
license: apache-2.0
|
| 4 |
+
pipeline_tag: image-text-to-text
|
| 5 |
+
library_name: transformers
|
| 6 |
tags:
|
| 7 |
+
- graph
|
| 8 |
+
- multi-task
|
| 9 |
+
- multi-modal
|
| 10 |
+
- scene-graph
|
| 11 |
+
- event-graph
|
| 12 |
+
- molecular-graph
|
|
|
|
| 13 |
---
|
| 14 |
|
| 15 |
# G-Substrate (Qwen3-VL-2B)
|
| 16 |
|
| 17 |
Multi-task fine-tuned model from the paper **"Graph is a Substrate Across Data Modalities"** (ICML 2026).
|
| 18 |
|
| 19 |
+
[[Paper](https://huggingface.co/papers/2601.22384)] [[Code](https://github.com/zmli6/G-Substrate)] [[Dataset](https://huggingface.co/datasets/zmli/G-Substrate-Data)]
|
| 20 |
+
|
| 21 |
## Model Description
|
| 22 |
|
| 23 |
+
This model is fine-tuned from [Qwen3-VL-2B-Instruct](https://huggingface.co/Qwen/Qwen3-VL-2B-Instruct) using the G-Substrate framework. G-Substrate treats graph structure as a persistent structural substrate that accumulates knowledge across heterogeneous data modalities and tasks. It employs a unified structural schema for compatibility and an interleaved role-based training strategy.
|
| 24 |
|
| 25 |
### Training Details
|
| 26 |
|
|
|
|
| 46 |
```python
|
| 47 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 48 |
|
| 49 |
+
model = AutoModelForCausalLM.from_pretrained("zmli/G-Substrate-Qwen3-VL-2B", trust_remote_code=True)
|
| 50 |
+
tokenizer = AutoTokenizer.from_pretrained("zmli/G-Substrate-Qwen3-VL-2B", trust_remote_code=True)
|
| 51 |
```
|
| 52 |
|
| 53 |
+
For batch inference with vLLM, see the [G-Substrate repository](https://github.com/zmli6/G-Substrate).
|
| 54 |
|
| 55 |
## Results
|
| 56 |
|
|
|
|
| 58 |
|----:|----:|----:|----:|-------:|--------:|----------:|--------:|--------:|--------:|-------:|
|
| 59 |
| 98.41 | 96.97 | 48.59 | 94.54 | 51.53 | 68.47 | 25.38 | 52.20 | 42.68 | 40.91 | 25.15 |
|
| 60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
## Citation
|
| 62 |
|
| 63 |
```bibtex
|
|
|
|
| 67 |
booktitle={ICML},
|
| 68 |
year={2026}
|
| 69 |
}
|
| 70 |
+
```
|