Instructions to use stockmark/Stockmark-DocReasoner-Qwen2.5-VL-32B-FP8-dynamic with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use stockmark/Stockmark-DocReasoner-Qwen2.5-VL-32B-FP8-dynamic with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="stockmark/Stockmark-DocReasoner-Qwen2.5-VL-32B-FP8-dynamic") 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, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("stockmark/Stockmark-DocReasoner-Qwen2.5-VL-32B-FP8-dynamic") model = AutoModelForImageTextToText.from_pretrained("stockmark/Stockmark-DocReasoner-Qwen2.5-VL-32B-FP8-dynamic") 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
- vLLM
How to use stockmark/Stockmark-DocReasoner-Qwen2.5-VL-32B-FP8-dynamic with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "stockmark/Stockmark-DocReasoner-Qwen2.5-VL-32B-FP8-dynamic" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "stockmark/Stockmark-DocReasoner-Qwen2.5-VL-32B-FP8-dynamic", "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/stockmark/Stockmark-DocReasoner-Qwen2.5-VL-32B-FP8-dynamic
- SGLang
How to use stockmark/Stockmark-DocReasoner-Qwen2.5-VL-32B-FP8-dynamic 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 "stockmark/Stockmark-DocReasoner-Qwen2.5-VL-32B-FP8-dynamic" \ --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": "stockmark/Stockmark-DocReasoner-Qwen2.5-VL-32B-FP8-dynamic", "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 "stockmark/Stockmark-DocReasoner-Qwen2.5-VL-32B-FP8-dynamic" \ --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": "stockmark/Stockmark-DocReasoner-Qwen2.5-VL-32B-FP8-dynamic", "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 stockmark/Stockmark-DocReasoner-Qwen2.5-VL-32B-FP8-dynamic with Docker Model Runner:
docker model run hf.co/stockmark/Stockmark-DocReasoner-Qwen2.5-VL-32B-FP8-dynamic
Stockmark-DocReasoner-Qwen2.5-VL-32B-FP8-dynamic
Introduction
This repository contains an FP8 quantized version of the Stockmark-DocReasoner-Qwen2.5-VL-32B model. This optimization reduces the number of bits used to represent weights and activations from 16 to 8, which can theoretically reduce GPU memory requirements by approximately 50% and increase matrix-multiply compute throughput by around 2× (the actual performance gains may vary depending on hardware and workload characteristics). Weight quantization also reduces disk size requirements by approximately 50%. The llm-compressor library is used for quantization.
This project is supported by GENIAC.
Quickstart
The following is a code snippet demonstrating how to use Stockmark-DocReasoner-Qwen2.5-VL-32B-FP8-dynamic 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-FP8-dynamic",
trust_remote_code=True,
)
processor = AutoProcessor.from_pretrained("stockmark/Stockmark-DocReasoner-Qwen2.5-VL-32B-FP8-dynamic")
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-FP8-dynamic 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-FP8-dynamic 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_fp8_2026,
title={Stockmark-DocReasoner-Qwen2.5-VL-32B-FP8-dynamic},
author={Stockmark Inc.},
year={2026}
}
- Downloads last month
- 357
Model tree for stockmark/Stockmark-DocReasoner-Qwen2.5-VL-32B-FP8-dynamic
Base model
Qwen/Qwen2.5-VL-32B-Instruct