Image-Text-to-Text
Transformers
Safetensors
qwen3_vl
vision-language
video
spatial-reasoning
embodied-ai
qwen
conversational
Instructions to use kagakouko/Spatial-Interactor-Qwen3-VL-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kagakouko/Spatial-Interactor-Qwen3-VL-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="kagakouko/Spatial-Interactor-Qwen3-VL-8B") 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("kagakouko/Spatial-Interactor-Qwen3-VL-8B") model = AutoModelForMultimodalLM.from_pretrained("kagakouko/Spatial-Interactor-Qwen3-VL-8B", 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 kagakouko/Spatial-Interactor-Qwen3-VL-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kagakouko/Spatial-Interactor-Qwen3-VL-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kagakouko/Spatial-Interactor-Qwen3-VL-8B", "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/kagakouko/Spatial-Interactor-Qwen3-VL-8B
- SGLang
How to use kagakouko/Spatial-Interactor-Qwen3-VL-8B 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 "kagakouko/Spatial-Interactor-Qwen3-VL-8B" \ --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": "kagakouko/Spatial-Interactor-Qwen3-VL-8B", "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 "kagakouko/Spatial-Interactor-Qwen3-VL-8B" \ --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": "kagakouko/Spatial-Interactor-Qwen3-VL-8B", "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 kagakouko/Spatial-Interactor-Qwen3-VL-8B with Docker Model Runner:
docker model run hf.co/kagakouko/Spatial-Interactor-Qwen3-VL-8B
Simplify model cards and add direct loading examples
#4
by kagakouko - opened
README.md
CHANGED
|
@@ -52,39 +52,24 @@ trajectories.
|
|
| 52 |
<img src="https://raw.githubusercontent.com/ZJU-OmniAI/Spatial-Interactor/main/assets/readme/presentation-preview.webp?v=20260916" width="100%" alt="Spatial-Interactor 20-page presentation">
|
| 53 |
</p>
|
| 54 |
|
| 55 |
-
##
|
| 56 |
-
|
| 57 |
-
<p align="center">
|
| 58 |
-
<img src="https://raw.githubusercontent.com/ZJU-OmniAI/Spatial-Interactor/main/assets/readme/opd.webp" width="100%" alt="On-Policy Distillation pipeline">
|
| 59 |
-
</p>
|
| 60 |
-
|
| 61 |
-
L1 and L2 establish local state-transition modeling. On L3, verifiable answer
|
| 62 |
-
rewards supervise the result while same-prefix privileged distillation guides
|
| 63 |
-
the intermediate reasoning process.
|
| 64 |
-
|
| 65 |
-
## Usage
|
| 66 |
-
|
| 67 |
-
All four checkpoints are listed in the
|
| 68 |
-
[Spatial-Interactor collection](https://huggingface.co/collections/kagakouko/spatial-interactor).
|
| 69 |
-
|
| 70 |
-
Use the standard Transformers interface for the base model and load this
|
| 71 |
-
repository in place of the base identifier:
|
| 72 |
|
| 73 |
```python
|
|
|
|
|
|
|
|
|
|
| 74 |
model_id = "kagakouko/Spatial-Interactor-Qwen3-VL-8B"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
```
|
| 76 |
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
The SFT stage uses the reported L1-L2 split of LSI-108K together with the public
|
| 84 |
-
spatial QA mixture described in the paper. OPD starts from that SFT checkpoint
|
| 85 |
-
and combines verifiable answer rewards with CoT-only privileged
|
| 86 |
-
self-distillation on long-horizon video questions. The visual encoder remains
|
| 87 |
-
frozen while the language model and multimodal projector are updated.
|
| 88 |
|
| 89 |
## Citation
|
| 90 |
|
|
|
|
| 52 |
<img src="https://raw.githubusercontent.com/ZJU-OmniAI/Spatial-Interactor/main/assets/readme/presentation-preview.webp?v=20260916" width="100%" alt="Spatial-Interactor 20-page presentation">
|
| 53 |
</p>
|
| 54 |
|
| 55 |
+
## Load
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
|
| 57 |
```python
|
| 58 |
+
import torch
|
| 59 |
+
from transformers import AutoModelForImageTextToText, AutoProcessor
|
| 60 |
+
|
| 61 |
model_id = "kagakouko/Spatial-Interactor-Qwen3-VL-8B"
|
| 62 |
+
processor = AutoProcessor.from_pretrained(model_id)
|
| 63 |
+
model = AutoModelForImageTextToText.from_pretrained(
|
| 64 |
+
model_id, torch_dtype=torch.bfloat16, device_map="auto",
|
| 65 |
+
)
|
| 66 |
```
|
| 67 |
|
| 68 |
+
Use the base model's [image/video input format](https://huggingface.co/Qwen/Qwen3-VL-8B-Instruct).
|
| 69 |
+
No privileged trace or additional teacher is needed for inference.
|
| 70 |
+
Weights, tokenizer, processor, and chat template are included.
|
| 71 |
+
See the [training guide](https://github.com/ZJU-OmniAI/Spatial-Interactor/blob/main/docs/TRAINING.md)
|
| 72 |
+
for SFT and OPD.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
|
| 74 |
## Citation
|
| 75 |
|