Image-Text-to-Text
Transformers
Safetensors
English
qwen3_vl
text-generation-inference
spatial-reasoning
vision-language
multimodal
image-captioning
visual-question-answering
conditional-generation
vision
language-model
sft
fine-grained-captioning
computer-vision
vllm
conversational
Instructions to use prithivMLmods/oMEGA-4B-SpatialThink-0804 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/oMEGA-4B-SpatialThink-0804 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="prithivMLmods/oMEGA-4B-SpatialThink-0804") 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("prithivMLmods/oMEGA-4B-SpatialThink-0804") model = AutoModelForMultimodalLM.from_pretrained("prithivMLmods/oMEGA-4B-SpatialThink-0804", 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 prithivMLmods/oMEGA-4B-SpatialThink-0804 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prithivMLmods/oMEGA-4B-SpatialThink-0804" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/oMEGA-4B-SpatialThink-0804", "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/prithivMLmods/oMEGA-4B-SpatialThink-0804
- SGLang
How to use prithivMLmods/oMEGA-4B-SpatialThink-0804 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 "prithivMLmods/oMEGA-4B-SpatialThink-0804" \ --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": "prithivMLmods/oMEGA-4B-SpatialThink-0804", "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 "prithivMLmods/oMEGA-4B-SpatialThink-0804" \ --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": "prithivMLmods/oMEGA-4B-SpatialThink-0804", "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 prithivMLmods/oMEGA-4B-SpatialThink-0804 with Docker Model Runner:
docker model run hf.co/prithivMLmods/oMEGA-4B-SpatialThink-0804
File size: 5,886 Bytes
dc41b82 ad11401 5b35e20 933d125 d92f11b e867126 708895b d579106 cfadc7d e867126 708895b e867126 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | ---
license: apache-2.0
base_model:
- Qwen/Qwen3-VL-4B-Instruct
language:
- en
pipeline_tag: image-text-to-text
library_name: transformers
tags:
- text-generation-inference
- spatial-reasoning
- vision-language
- multimodal
- image-captioning
- visual-question-answering
- conditional-generation
- vision
- language-model
- sft
- fine-grained-captioning
- computer-vision
- vllm
datasets:
- prithivMLmods/OpenCaption-FineGrained
- remyxai/SpaceThinker
---

# **oMEGA-4B-SpatialThink-0804**
> **oMEGA-4B-SpatialThink-0804** is a vision-language model built on top of **Qwen/Qwen3-VL-4B-Instruct** and fine-tuned for **spatial reasoning with concise notes for unfiltered vision tasks**. The model is trained to produce concise yet informative reasoning for spatial understanding while maintaining strong image captioning capabilities. Training is based on **remyxai's SpaceThinker** and **OpenCaption-FineGrained**, enabling efficient spatial reasoning and detailed image understanding across diverse visual domains.
> [!NOTE]
> This model is an experimental release and may generate unexpected behaviors or reasoning artifacts in certain scenarios.
## **Key Highlights**
* **Qwen3-VL Foundation**: Built directly on top of **Qwen/Qwen3-VL-4B-Instruct**.
* **Spatial Reasoning**: Optimized for spatial understanding with concise reasoning notes for unfiltered vision tasks.
* **Concise Reasoning**: Generates compact reasoning while preserving essential spatial information.
* **Image Captioning**: Produces detailed and context-aware image captions.
* **Vision-Language Fine-Tuning**: Trained on high-quality spatial reasoning and fine-grained image caption datasets.
* **Research-Focused Release**: Designed for multimodal reasoning, spatial understanding, and image captioning research.
* **Efficient 4B Deployment**: Suitable for local multimodal inference and research environments.
## **Quick Start with Transformers**
```python
from transformers import Qwen3VLForConditionalGeneration, AutoProcessor
from qwen_vl_utils import process_vision_info
import torch
model = Qwen3VLForConditionalGeneration.from_pretrained(
"prithivMLmods/oMEGA-4B-SpatialThink-0804",
torch_dtype="auto",
device_map="auto"
)
processor = AutoProcessor.from_pretrained(
"prithivMLmods/oMEGA-4B-SpatialThink-0804"
)
messages = [
{
"role": "user",
"content": [
{
"type": "image",
"image": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg",
},
{
"type": "text",
"text": "Provide a detailed caption and reasoning for this image."
},
],
}
]
text = processor.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
image_inputs, video_inputs = process_vision_info(messages)
inputs = processor(
text=[text],
images=image_inputs,
videos=video_inputs,
padding=True,
return_tensors="pt",
).to("cuda")
generated_ids = model.generate(
**inputs,
max_new_tokens=128
)
generated_ids_trimmed = [
out[len(inp):]
for inp, out in zip(inputs.input_ids, generated_ids)
]
output_text = processor.batch_decode(
generated_ids_trimmed,
skip_special_tokens=True,
clean_up_tokenization_spaces=False
)
print(output_text)
```
## **Training Details**
| Setting | Value |
| :---------------------- | :--------------------------------------------------------------- |
| **Base Model** | **Qwen/Qwen3-VL-4B-Instruct** |
| **Training Method** | Supervised Fine-Tuning (SFT) |
| **Primary Objective** | Spatial Reasoning with Concise Notes for Unfiltered Vision Tasks |
| **Secondary Objective** | Efficient Spatial Reasoning and Image Captioning |
| **Training Framework** | TRL + Transformers |
| **Training Precision** | BF16 |
## **Intended Use**
* **Spatial Reasoning**: Understanding spatial relationships, object layouts, and geometric reasoning.
* **Image Captioning**: Producing detailed and fine-grained image descriptions.
* **Multimodal Reasoning**: Combining visual understanding with concise reasoning.
* **Vision Research**: Benchmarking and evaluating vision-language reasoning capabilities.
* **Local Deployment**: Efficient inference for multimodal applications.
## **Limitations**
* **Experimental Model**: Performance may vary across different visual domains.
* **Reasoning Artifacts**: Generated reasoning may occasionally contain incorrect intermediate interpretations.
* **Vision Ambiguity**: Highly ambiguous or low-quality images may reduce reasoning accuracy.
## **Acknowledgements**
* **[Qwen/Qwen3-VL-4B-Instruct](https://huggingface.co/Qwen/Qwen3-VL-4B-Instruct)**: Base vision-language model used for this project.
* **[SpaceThinker](https://huggingface.co/datasets/remyxai/SpaceThinker)** by remyxai: A spatial reasoning dataset used to improve concise visual reasoning capabilities.
* **[OpenCaption-FineGrained](https://huggingface.co/datasets/prithivMLmods/OpenCaption-FineGrained)**: A fine-grained image captioning dataset used to enhance detailed visual understanding and caption generation.
* **TRL - [Transformers Reinforcement Learning](https://huggingface.co/docs/trl/en/index)**: Used for supervised fine-tuning and multimodal training.
* **[Transformers](https://huggingface.co/docs/transformers/en/index)**: Provides the model architecture, training, and inference framework for multimodal transformer models. |