Views
No views yet
ShizhenGPT-7B-VL is a variant derived from ShizhenGPT-7B-Omni that includes only the LLM and vision encoder. It is recommended if your use case involves text or vision tasks exclusively. For broader multimodal needs, please select one of the versions below.
| Parameters | Supported Modalities | Link | |
|---|---|---|---|
| ShizhenGPT-7B-LLM | 7B | Text | HF Link |
| ShizhenGPT-7B-VL | 7B | Text, Image Understanding | HF Link |
| ShizhenGPT-7B-Omni | 7B | Text, Four Diagnostics (望闻问切) | HF Link |
| ShizhenGPT-32B-LLM | 32B | Text | HF Link |
| ShizhenGPT-32B-VL | 32B | Text, Image Understanding | HF Link |
| ShizhenGPT-32B-Omni | 32B | Text, Four Diagnostics (望闻问切) | Available soon |
transformers==4.51.0.1from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor
2from qwen_vl_utils import process_vision_info
3
4
5processor = AutoProcessor.from_pretrained("FreedomIntelligence/ShizhenGPT-7B-VL")
6model = Qwen2_5_VLForConditionalGeneration.from_pretrained("FreedomIntelligence/ShizhenGPT-7B-VL", torch_dtype="auto", device_map="auto")
7
8messages = [
9 {
10 "role": "user",
11 "content": [
12 {
13 "type": "image",
14 "image": "/path/to/your/image.png",
15 },
16 {"type": "text", "text": "请从中医角度解读这张舌苔。"},
17 ],
18 }
19]
20
21text = processor.apply_chat_template(
22 messages, tokenize=False, add_generation_prompt=True
23)
24image_inputs, video_inputs = process_vision_info(messages)
25inputs = processor(
26 text=[text],
27 images=image_inputs,
28 videos=video_inputs,
29 padding=True,
30 return_tensors="pt",
31)
32inputs = inputs.to("cuda")
33
34# Inference: Generation of the output
35generated_ids = model.generate(**inputs, max_new_tokens=128)
36generated_ids_trimmed = [
37 out_ids[len(in_ids) :] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
38]
39output_text = processor.batch_decode(
40 generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
41)
42print(output_text)@misc{chen2025shizhengptmultimodalllmstraditional,
title={ShizhenGPT: Towards Multimodal LLMs for Traditional Chinese Medicine},
author={Junying Chen and Zhenyang Cai and Zhiheng Liu and Yunjin Yang and Rongsheng Wang and Qingying Xiao and Xiangyi Feng and Zhan Su and Jing Guo and Xiang Wan and Guangjun Yu and Haizhou Li and Benyou Wang},
year={2025},
eprint={2508.14706},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2508.14706},
}