HuatuoGPT-Vision-2-27B

GitHub | Paper | PubMedVision-Plus | PubMedVision-RL

โšก Introduction

HuatuoGPT-Vision-2-27B is a medical vision-language model in the HuatuoGPT-Vision-2 series. It is built on Qwen3.8-27B and keeps the architecture, tokenizer, and chat template of the base model.

It follows the two-stage recipe of HuatuoGPT-Vision-2:

  1. Medical multimodal pre-training on PubMedVision-Plus, large-scale medical image-caption pairs from PubMed, to inject medical visual knowledge.
  2. Reinforcement learning on PubMedVision-RL, with verifiable rewards for multiple-choice questions and rubric rewards from HuatuoGPT-Vision-2-Grader for open-ended questions, to elicit medical vision capabilities.

๐Ÿง  Thinking on or off. Like Qwen3.8-27B, the model reasons step by step inside <think>...</think> by default. Set enable_thinking=False to get a direct answer without the thinking part.

๐Ÿ‘จโ€โš•๏ธ Model

Model Base model Thinking Hugging Face
HuatuoGPT-Vision-2-27B Qwen3.8-27B On (default) / Off FreedomIntelligence/HuatuoGPT-Vision-2-27B
HuatuoGPT-Vision-2-8B Qwen3-VL-8B-Instruct No thinking FreedomIntelligence/HuatuoGPT-Vision-2-8B
HuatuoGPT-Vision-2-Grader Qwen3-VL-8B-Instruct No thinking FreedomIntelligence/HuatuoGPT-Vision-2-Grader

The weights are stored in BF16 (about 55 GB). The model can be used exactly like Qwen3.8-27B, so any framework that supports Qwen3.8 also supports this model. The MTP (multi-token prediction) layer is included for speculative decoding.

๐Ÿš€ Quick start with Transformers

Use a recent version of transformers that supports Qwen3.8.

from transformers import AutoModelForImageTextToText, AutoProcessor

model_id = "FreedomIntelligence/HuatuoGPT-Vision-2-27B"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(model_id, dtype="auto", device_map="auto").eval()

messages = [{"role": "user", "content": [
    {"type": "image", "image": "chest_xray.jpg"},  # local path, URL, or PIL image
    {"type": "text", "text": "What are the main findings in this chest X-ray?"},
]}]

inputs = processor.apply_chat_template(
    messages,
    tokenize=True,
    add_generation_prompt=True,
    return_dict=True,
    return_tensors="pt",
    enable_thinking=True,  # set to False to answer without thinking
).to(model.device)

outputs = model.generate(**inputs, max_new_tokens=8192)
print(processor.decode(outputs[0, inputs["input_ids"].shape[-1]:], skip_special_tokens=True))

With thinking on, the output has the form reasoning</think>\n\nanswer (the opening <think> is part of the prompt). Take the text after </think> as the final answer.

๐Ÿ–ฅ๏ธ Serving with vLLM or SGLang

vllm serve FreedomIntelligence/HuatuoGPT-Vision-2-27B --tensor-parallel-size 2 --max-model-len 32768 --reasoning-parser qwen3 --port 30000
# or
python -m sglang.launch_server --model-path FreedomIntelligence/HuatuoGPT-Vision-2-27B --tp 2 --context-length 32768 --reasoning-parser qwen3 --port 30000

To speed up decoding with MTP speculative decoding, add these flags to the SGLang command:

--speculative-algorithm NEXTN --speculative-num-steps 3 --speculative-eagle-topk 1 --speculative-num-draft-tokens 4

For vLLM, follow the MTP settings in the Qwen3.8 recipe.

from openai import OpenAI

client = OpenAI(base_url="http://127.0.0.1:30000/v1", api_key="EMPTY")
messages = [{"role": "user", "content": [
    {"type": "image_url", "image_url": {"url": "https://example.com/ct_scan.png"}},
    {"type": "text", "text": "Describe the abnormality in this CT image."},
]}]

# Thinking mode (default)
response = client.chat.completions.create(
    model="FreedomIntelligence/HuatuoGPT-Vision-2-27B",
    messages=messages,
    max_tokens=8192,
)
print(response.choices[0].message.content)

# Non-thinking mode
response = client.chat.completions.create(
    model="FreedomIntelligence/HuatuoGPT-Vision-2-27B",
    messages=messages,
    max_tokens=4096,
    extra_body={"chat_template_kwargs": {"enable_thinking": False}},
)
print(response.choices[0].message.content)

โš ๏ธ Disclaimer

HuatuoGPT-Vision-2 is intended for academic research only. It must not be used for diagnosis, treatment, triage, or any other clinical decision. The model can produce incorrect or fabricated findings.

๐Ÿฉบ HuatuoGPT Series

  • HuatuoGPT: Taming Language Models to Be a Doctor
  • HuatuoGPT-II: One-stage Training for Medical Adaptation of LLMs
  • HuatuoGPT-Vision: Injecting Medical Visual Knowledge into Multimodal LLMs at Scale
  • HuatuoGPT-o1: Towards Medical Complex Reasoning with LLMs
  • HuatuoGPT-3: OnePO: Direct One-stage Policy Optimization for SFT-free Domain Adaptation
  • HuatuoGPT-Vision-2: Incentivizing Medical Vision Capabilities from Large-Scale Multimodal Pre-training

๐Ÿ“– Citation

@inproceedings{chen2026incentivizing,
  title={Incentivizing Medical Vision Capabilities from Large-Scale Multimodal Pre-training},
  author={Chen, Junying and Cai, Zhenyang and Yang, Yunjin and Cai, Kunyuan and Wang, Rongsheng and Wang, Xidong and Yu, Geyang and Feng, Xiangyi and Wang, Benyou},
  booktitle={The Fortieth Annual Conference on Neural Information Processing Systems},
  year={2026}
}
Downloads last month
84
Safetensors
Model size
28B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for FreedomIntelligence/HuatuoGPT-Vision-2-27B

Base model

Qwen/Qwen3.8-27B
Finetuned
(1,080)
this model
Quantizations
2 models