Built on top of Qwen2.5-VL-32B-Instruct, the model is further trained to acquire:
This project is supported by
GENIAC.
We evaluated Japanese document understanding performance using the following three benchmarks:
All benchmark evaluation were performed using
llm-jp-eval-mm and adopted the LLM-as-a-judge score as the comparison metric (using
gpt-4o-2024-11-20 as judge model). Additionally, given the practical requirements for answer accuracy in business-domain VQA, we employed a binary scoring criterion when evaluating
JA-Business-Doc-RQ-Bench and
BusinessSlideVQA, and redesigned a prompt incorporating specific requirements (please refer to
JA-Business-Doc-RQ-Bench for details).
The following is a code snippet demonstrating how to use Stockmark-DocReasoner-Qwen2.5-VL-32B in pure transformers.
1from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor
2from qwen_vl_utils import process_vision_info
3import torch
4
5model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
6 "stockmark/Stockmark-DocReasoner-Qwen2.5-VL-32B",
7 torch_dtype=torch.bfloat16,
8 attn_implementation="flash_attention_2",
9 device_map="auto",
10)
11
12processor = AutoProcessor.from_pretrained("stockmark/Stockmark-DocReasoner-Qwen2.5-VL-32B")
13
14messages = [
15 {
16 "role": "user",
17 "content": [
18 {
19 "type": "image",
20 "image": "assets/demo.png",
21 },
22 {"type": "text", "text": "30歳未満の社員に対するアンケート回答結果で、最も割合が高かった「使用頻度」は何ですか?"},
23 ],
24 }
25]
26
27text = processor.apply_chat_template(
28 messages, tokenize=False, add_generation_prompt=True
29)
30image_inputs, video_inputs = process_vision_info(messages)
31inputs = processor(
32 text=[text],
33 images=image_inputs,
34 videos=video_inputs,
35 padding=True,
36 return_tensors="pt",
37)
38inputs = inputs.to("cuda")
39
40generated_ids = model.generate(**inputs, max_new_tokens=1024)
41generated_ids_trimmed = [
42 out_ids[len(in_ids) :] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
43]
44output_text = processor.batch_decode(
45 generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
46)
47print(output_text)
48
The following is a code snippet demonstrating how to use Stockmark-DocReasoner-Qwen2.5-VL-32B in vLLM.
1import os
2from transformers import AutoProcessor
3from qwen_vl_utils import process_vision_info
4from vllm import LLM, SamplingParams
5
6os.environ["VLLM_WORKER_MULTIPROC_METHOD"] = "spawn"
7
8def main():
9
10 llm = LLM(
11 model="stockmark/Stockmark-DocReasoner-Qwen2.5-VL-32B",
12 trust_remote_code=True,
13 dtype="bfloat16",
14 )
15 processor = AutoProcessor.from_pretrained("stockmark/Stockmark-DocReasoner-Qwen2.5-VL-32B")
16 message = [
17 {
18 "role": "user",
19 "content": [
20 {
21 "type": "image",
22 "image": "assets/demo.png",
23 },
24 {"type": "text", "text": "30歳未満の社員に対するアンケート回答結果で、最も割合が高かった「使用頻度」は何ですか?"},
25 ],
26 }
27 ]
28 texts = processor.apply_chat_template(
29 message, tokenize=False, add_generation_prompt=True
30 )
31 image_inputs, video_inputs = process_vision_info(message)
32
33 mm_data = {}
34 if image_inputs is not None:
35 mm_data["image"] = image_inputs
36 if video_inputs is not None:
37 mm_data["video"] = video_inputs
38
39 inputs = {
40 "prompt": texts,
41 "multi_modal_data": mm_data,
42 }
43
44 sampling_params = SamplingParams(
45 temperature=0,
46 max_tokens=1024
47 )
48
49 outputs = llm.generate(
50 inputs,
51 sampling_params=sampling_params,
52 )
53
54 answer = outputs[0].outputs[0].text
55 print(answer)
56
57if __name__ == "__main__":
58 main()
1<think>
2...reasoning process...
3</think>
4<answer>
5...final answer...
6</answer>
In addition to default reasoning outputs, Stockmark-DocReasoner-Qwen2.5-VL-32B supports prompt-based task switching to enable fast and structured inference for downstream applications.
1@misc{stockmark_docreasoner_2026,
2 title={Stockmark-DocReasoner-Qwen2.5-VL-32B},
3 author={Stockmark Inc.},
4 year={2026}
5}