Views
No views yet

The Lumian-VLR-7B-Thinking model is a high-fidelity vision-language reasoning (experimental model) system designed for fine-grained multimodal understanding. Built on Qwen2.5-VL-7B-Instruct, this model enhances image captioning, sampled video reasoning, and document comprehension through explicit grounded reasoning. It produces structured reasoning traces aligned with visual coordinates, enabling explainable multimodal reasoning. Trained via supervised fine-tuning (SFT) on visually-grounded reasoning traces and further refined using GRPO reinforcement learning, Lumian delivers superior step-by-step chain-of-thought reasoning with strong visual grounding.
[!NOTE] Model Subfolder: Lumian-VLR-7B-Thinking(think-preview)Model Folder: Lumian-VLR-7B-Thinking(no-think-single-shot)
pip install git+https://github.com/huggingface/transformers.git1# Load Lumian-VLR-7B-Thinking
2from transformers import Qwen2_5_VLForConditionalGeneration, AutoTokenizer, AutoProcessor
3from qwen_vl_utils import process_vision_info
4
5MODEL_ID = "prithivMLmods/Lumian-VLR-7B-Thinking"
6SUBFOLDER = "think-preview"
7processor = AutoProcessor.from_pretrained(MODEL_ID, trust_remote_code=True, subfolder=SUBFOLDER)
8model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
9 MODEL_ID,
10 trust_remote_code=True,
11 subfolder=SUBFOLDER,
12 torch_dtype=torch.float16
13).to(device).eval()<think>
Step 1: Identify the main elements in the image and their positions.
Step 2: Analyze the relationships between objects and surrounding context.
Step 3: Derive the final answer based on spatial reasoning and visual cues.
</think>
<answer>
The image depicts a person holding an open book with highlighted sections on the left page.
</answer>1from transformers import Qwen2_5_VLForConditionalGeneration, AutoTokenizer, AutoProcessor
2from qwen_vl_utils import process_vision_info
3
4model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
5 "prithivMLmods/Lumian-VLR-7B-Thinking", torch_dtype="auto", device_map="auto"
6)
7
8processor = AutoProcessor.from_pretrained("prithivMLmods/Lumian-VLR-7B-Thinking")
9
10messages = [
11 {
12 "role": "user",
13 "content": [
14 {
15 "type": "image",
16 "image": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg",
17 },
18 {"type": "text", "text": "Describe this image with thinking traces."},
19 ],
20 }
21]
22
23text = processor.apply_chat_template(
24 messages, tokenize=False, add_generation_prompt=True
25)
26image_inputs, video_inputs = process_vision_info(messages)
27inputs = processor(
28 text=[text],
29 images=image_inputs,
30 videos=video_inputs,
31 padding=True,
32 return_tensors="pt",
33)
34inputs = inputs.to("cuda")
35
36generated_ids = model.generate(**inputs, max_new_tokens=256)
37generated_ids_trimmed = [
38 out_ids[len(in_ids):] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
39]
40output_text = processor.batch_decode(
41 generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
42)
43print(output_text)