stockmark/Stockmark-DocReasoner-Qwen2.5-VL-32B
Stockmark-DocReasoner-Qwen2.5-VL-32B
   [](https://huggingface.co/models?pipelinetag=document-question-answering&sort=trending) ![License]()
Introduction
Stockmark-DocReasoner-Qwen2.5-VL-32B is a vision-language model specialized for Japanese document understanding and reasoning, particularly in the manufacturing domain.
Built on top of Qwen2.5-VL-32B-Instruct, the model is further trained to acquire:
- Explicit Chain-of-Thought (CoT) reasoning ("thinking") capability
- Multi-modal understanding across documents, charts, tables, and diagrams
- Domain-specific knowledge for manufacturing and business documents
It is designed to extract implicit knowledge from visually rich and structurally complex documents such as:
- Technical documentation
- Engineering design drawing
- Experimental reports
- Business documents
This project is supported by GENIAC.
Evaluation
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).
JA-Business-Doc-RQ-Bench
<table> <thead> <tr> <th rowspan="2">Model</th> <th rowspan="2">Overall</th> <th colspan="3">Answer Types</th> <th colspan="4">Image Types</th> </tr> <tr> <th>Yes/No</th> <th>Factoid</th> <th>Numerical</th> <th>Chart</th> <th>Document</th> <th>Table</th> <th>Diagram</th> </tr> </thead> <tbody> <tr> <td><a href="https://developers.openai.com/api/docs/models/gpt-5.2">gpt-5.2-2025-12-11 (reasoning high)</a></td> <td><strong>95.20</strong></td> <td><strong>93.22</strong></td> <td>96.55</td> <td><strong>95.54</strong></td> <td>98.25</td> <td><strong>96.61</strong></td> <td>94.64</td> <td><strong>91.23</strong></td> </tr> <tr> <td><a href="https://huggingface.co/Qwen/Qwen3-VL-32B-Thinking">Qwen3-VL-32B-Thinking</a></td> <td>94.32</td> <td>89.83</td> <td><strong>100</strong></td> <td>93.75</td> <td><strong>100</strong></td> <td><strong>96.61</strong></td> <td><strong>96.43</strong></td> <td>84.21</td> </tr> <tr> <td><a href="https://huggingface.co/stockmark/Stockmark-DocReasoner-Qwen2.5-VL-32B">Stockmark-DocReasoner-Qwen2.5-VL-32B</a></td> <td>85.15</td> <td>88.14</td> <td>87.93</td> <td>82.14</td> <td>78.95</td> <td><strong>96.61</strong></td> <td>82.14</td> <td>82.46</td> </tr> <tr> <td><a href="https://huggingface.co/Qwen/Qwen3-VL-32B-Instruct">Qwen3-VL-32B-Instruct</a></td> <td>83.84</td> <td>69.49</td> <td>96.55</td> <td>84.82</td> <td>87.72</td> <td>88.14</td> <td>78.57</td> <td>80.70</td> </tr> <tr> <td><a href="https://huggingface.co/Qwen/Qwen2.5-VL-32B-Instruct">Qwen2.5-VL-32B-Instruct</a></td> <td>79.04</td> <td>72.88</td> <td>81.03</td> <td>81.25</td> <td>82.46</td> <td>86.44</td> <td>67.86</td> <td>78.95</td> </tr> <tr> <td><a href="https://developers.openai.com/api/docs/models/gpt-4o">gpt-4o-2024-11-20</a></td> <td>59.39</td> <td>67.80</td> <td>51.72</td> <td>58.93</td> <td>56.14</td> <td>62.71</td> <td>55.36</td> <td>63.16</td> </tr> </tbody> </table>
JDocQA
<table> <thead> <th>Model</th> <th>LLM</th> <th>Acc</th> </thead> <tbody> <tr> <td><a href="https://huggingface.co/stockmark/Stockmark-DocReasoner-Qwen2.5-VL-32B">Stockmark-DocReasoner-Qwen2.5-VL-32B</a></td> <td>4.0</td> <td>0.31</td> </tr> <tr> <td><a href="https://huggingface.co/Qwen/Qwen3-VL-32B-Thinking">Qwen3-VL-32B-Thinking</a></td> <td>4.0</td> <td>0.29</td> </tr> <tr> <td><a href="https://huggingface.co/Qwen/Qwen3-VL-32B-Instruct">Qwen3-VL-32B-Instruct</a></td> <td>4.0</td> <td>0.25</td> </tr> <tr> <td><a href="https://huggingface.co/Qwen/Qwen2.5-VL-32B-Instruct">Qwen2.5-VL-32B-Instruct</a></td> <td>3.6</td> <td>0.25</td> </tr> <tr> <td><a href="https://developers.openai.com/api/docs/models/gpt-4o">gpt-4o-2024-11-20</a></td> <td>3.6</td> <td>0.22</td> </tr> </tbody> </table>
BusinessSlideVQA
<table> <thead> <th>Model</th> <th>Acc</th> </thead> <tbody> <tr> <td><a href="https://huggingface.co/stockmark/Stockmark-DocReasoner-Qwen2.5-VL-32B">Stockmark-DocReasoner-Qwen2.5-VL-32B</a></td> <td>77.27</td> </tr> <tr> <td><a href="https://huggingface.co/Qwen/Qwen3-VL-32B-Thinking">Qwen3-VL-32B-Thinking</a></td> <td>85.91</td> </tr> <tr> <td><a href="https://huggingface.co/Qwen/Qwen3-VL-32B-Instruct">Qwen3-VL-32B-Instruct</a></td> <td>82.27</td> </tr> <tr> <td><a href="https://huggingface.co/Qwen/Qwen2.5-VL-32B-Instruct">Qwen2.5-VL-32B-Instruct</a></td> <td>68.64</td> </tr> <tr> <td><a href="https://developers.openai.com/api/docs/models/gpt-4o">gpt-4o-2024-11-20</a></td> <td>63.18</td> </tr> </tbody> </table>
Quickstart
Inference using 🤗Transformers
Please make sure to have transformers>=4.49.0 installed.
pip install transformers>=4.49.0 accelerate torchvision qwen-vl-utils flash-attnThe following is a code snippet demonstrating how to use Stockmark-DocReasoner-Qwen2.5-VL-32B in pure transformers.
from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor
from qwen_vl_utils import process_vision_info
import torch
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
"stockmark/Stockmark-DocReasoner-Qwen2.5-VL-32B",
torch_dtype=torch.bfloat16,
attn_implementation="flash_attention_2",
device_map="auto",
)
processor = AutoProcessor.from_pretrained("stockmark/Stockmark-DocReasoner-Qwen2.5-VL-32B")
messages = [
{
"role": "user",
"content": [
{
"type": "image",
"image": "assets/demo.png",
},
{"type": "text", "text": "30歳未満の社員に対するアンケート回答結果で、最も割合が高かった「使用頻度」は何ですか?"},
],
}
]
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",
)
inputs = inputs.to("cuda")
generated_ids = model.generate(**inputs, max_new_tokens=1024)
generated_ids_trimmed = [
out_ids[len(in_ids) :] for in_ids, out_ids 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)
Inference using vLLM
The following is a code snippet demonstrating how to use Stockmark-DocReasoner-Qwen2.5-VL-32B in vLLM.
import os
from transformers import AutoProcessor
from qwen_vl_utils import process_vision_info
from vllm import LLM, SamplingParams
os.environ["VLLM_WORKER_MULTIPROC_METHOD"] = "spawn"
def main():
llm = LLM(
model="stockmark/Stockmark-DocReasoner-Qwen2.5-VL-32B",
trust_remote_code=True,
dtype="bfloat16",
)
processor = AutoProcessor.from_pretrained("stockmark/Stockmark-DocReasoner-Qwen2.5-VL-32B")
message = [
{
"role": "user",
"content": [
{
"type": "image",
"image": "assets/demo.png",
},
{"type": "text", "text": "30歳未満の社員に対するアンケート回答結果で、最も割合が高かった「使用頻度」は何ですか?"},
],
}
]
texts = processor.apply_chat_template(
message, tokenize=False, add_generation_prompt=True
)
image_inputs, video_inputs = process_vision_info(message)
mm_data = {}
if image_inputs is not None:
mm_data["image"] = image_inputs
if video_inputs is not None:
mm_data["video"] = video_inputs
inputs = {
"prompt": texts,
"multi_modal_data": mm_data,
}
sampling_params = SamplingParams(
temperature=0,
max_tokens=1024
)
outputs = llm.generate(
inputs,
sampling_params=sampling_params,
)
answer = outputs[0].outputs[0].text
print(answer)
if __name__ == "__main__":
main()Output Format
Default Thinking Mode
Stockmark-DocReasoner-Qwen2.5-VL-32B outputs structured reasoning by default:
<think>
...reasoning process...
</think>
<answer>
...final answer...
</answer>Special Inference Modes
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.
STMK HTML: Convert the input document into a structured HTML representation.STMK Markdown: Convert documents into Markdown format.STMK JSON: Extract document content into structured JSON.STMK SMILES: Extract chemical structures from diagrams into SMILES format.
Developed by
Citation
@misc{stockmark_docreasoner_2026,
title={Stockmark-DocReasoner-Qwen2.5-VL-32B},
author={Stockmark Inc.},
year={2026}
}