Views
No views yet

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.
1from transformers import Qwen3VLForConditionalGeneration, AutoProcessor
2from qwen_vl_utils import process_vision_info
3import torch
4
5model = Qwen3VLForConditionalGeneration.from_pretrained(
6 "prithivMLmods/oMEGA-4B-SpatialThink-0804",
7 torch_dtype="auto",
8 device_map="auto"
9)
10
11processor = AutoProcessor.from_pretrained(
12 "prithivMLmods/oMEGA-4B-SpatialThink-0804"
13)
14
15messages = [
16 {
17 "role": "user",
18 "content": [
19 {
20 "type": "image",
21 "image": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg",
22 },
23 {
24 "type": "text",
25 "text": "Provide a detailed caption and reasoning for this image."
26 },
27 ],
28 }
29]
30
31text = processor.apply_chat_template(
32 messages,
33 tokenize=False,
34 add_generation_prompt=True
35)
36
37image_inputs, video_inputs = process_vision_info(messages)
38
39inputs = processor(
40 text=[text],
41 images=image_inputs,
42 videos=video_inputs,
43 padding=True,
44 return_tensors="pt",
45).to("cuda")
46
47generated_ids = model.generate(
48 **inputs,
49 max_new_tokens=128
50)
51
52generated_ids_trimmed = [
53 out[len(inp):]
54 for inp, out in zip(inputs.input_ids, generated_ids)
55]
56
57output_text = processor.batch_decode(
58 generated_ids_trimmed,
59 skip_special_tokens=True,
60 clean_up_tokenization_spaces=False
61)
62
63print(output_text)| 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 |