Model reference · open weights

Lingshu

LLMs lingshu-medical-mllm Vision + text 1 build Open weights 6k dl/mo

Lingshu is an open-weight language model from lingshu-medical-mllm. Lingshu-7B (BF16) weighs 16.6 GB; the smallest configuration that runs it is 2× RTX 3060 12 GB.

For self-hosting, compare this build's requirements below with the GPU you plan to rent.

  • Lingshu is a multimodal large language model developed by lingshu-medical-mllm for medical image understanding and reasoning.
  • The Lingshu-7B variant contains 8.3B parameters, supports a context length of 128,000 tokens, and is released under the MIT licence.
  • It is designed to process more than 12 medical imaging modalities, including X-Ray, CT Scan, and MRI, for tasks such as visual question answering and report generation.

Summary of the lingshu-medical-mllm/Lingshu-7B model card, 2026-10-01

What it is

Released bylingshu-medical-mllm
Released2025-06-05
Parameters8.3B
VRAM16.6 GB for the weights

What it runs on

Memory and cards for Lingshu-7B (BF16)

16.6 GBweights, file size
57 MBcache per 1K tokens
2.1 GBruntime overhead, at least
128,000 tokenscontext max
CardRequests at onceContext maxMemory
8K each32K each
RTX 3060 12 GB … RTX 4060 Ti 16 GB
2 smaller cards
RTX 3090 24 GB10280K23.4 GB
RTX 4090 24 GB9279K23.4 GB
RTX 5090 32 GB266all 125K31.0 GB
L40S 48 GB5313all 125K44.0 GB
A100 80 GB12631all 125K78.2 GB
H100 80 GB11729all 125K78.1 GB
RTX PRO 6000 Blackwell 96 GB15037all 125K93.8 GB
DGX Spark (GB10) 128 GB unified17944all 125K107 GB
H200 141 GB24461all 125K138 GB
B200 180 GB32380all 125K176 GB
2× RTX 3060 12 GB
tensor parallel
5142K11.6 GB a card
2× RTX 4060 Ti 16 GB
tensor parallel
215all 125K15.4 GB a card
Memory needed at each load
Requests at once8K tokens each32K tokens each
119.1 GB20.6 GB
521.0 GB28.1 GB
822.4 GB33.7 GB
1626.2 GB48.7 GB
3233.7 GB78.8 GB
6448.7 GB139 GB

One card, with vLLM's small-card settings.

From the model card

What lingshu-medical-mllm says about Lingshu

Read the model card

              

Lingshu - SOTA Multimodal Large Language Models for Medical Domain

BIG NEWS: Lingshu is released with state-of-the-art performance on medical VQA tasks and report generation.

This repository contains the model of the paper Lingshu: A Generalist Foundation Model for Unified Multimodal Medical Understanding and Reasoning. We also release a comprehensive medical evaluation toolkit in MedEvalKit, which supports fast evaluation of major multimodal and textual medical tasks.

Highlights

  • Lingshu models achieve SOTA on most medical multimodal/textual QA and report generation tasks for 7B and 32 model sizes.
  • Lingshu-32B outperforms GPT-4.1 and Claude Sonnet 4 in most multimodal QA and report generation tasks.
  • Lingshu supports more than 12 medical imaging modalities, including X-Ray, CT Scan, MRI, Microscopy, Ultrasound, Histopathology, Dermoscopy, Fundus, OCT, Digital Photography, Endoscopy, and PET.

Release

Disclaimer: We must note that even though the weights, codes, and demos are released in an open manner, similar to other pre-trained language models, and despite our best efforts in red teaming and safety fine-tuning and enforcement, our models come with potential risks, including but not limited to inaccurate, misleading or potentially harmful generation. Developers and stakeholders should perform their own red teaming and provide related security measures before deployment, and they must abide by and comply with local governance and regulations. In no event shall the authors be held liable for any claim, damages, or other liability arising from the use of the released weights, codes, or demos.

Evaluation

Medical Multimodal VQA

Medical Textual QA

Medical Report Generation

Usage

Using transformers (version 4.52.1 is recommended)
from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor
from qwen_vl_utils import process_vision_info

# We recommend enabling flash_attention_2 for better acceleration and memory saving, especially in multi-image and video scenarios.
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
    "lingshu-medical-mllm/Lingshu-7B",
    torch_dtype=torch.bfloat16,
    attn_implementation="flash_attention_2",
    device_map="auto",
)

processor = AutoProcessor.from_pretrained("lingshu-medical-mllm/Lingshu-7B")

messages = [
    {
        "role": "user",
        "content": [
            {
                "type": "image",
                "image": "example.png",
            },
            {"type": "text", "text": "Describe this image."},
        ],
    }
]

# Preparation for inference
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(model.device)

# Inference: Generation of the output
generated_ids = model.generate(**inputs, max_new_tokens=128)
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)
Using vLLM
from vllm import LLM, SamplingParams
from qwen_vl_utils import process_vision_info
import PIL
from transformers import AutoProcessor

processor = AutoProcessor.from_pretrained("lingshu-medical-mllm/Lingshu-7B")
llm = LLM(model="lingshu-medical-mllm/Lingshu-7B", limit_mm_per_prompt = {"image": 4}, tensor_parallel_size=2, enforce_eager=True, trust_remote_code=True,)
sampling_params = SamplingParams(
            temperature=0.7,
            top_p=1,
            repetition_penalty=1,
            max_tokens=1024,
            stop_token_ids=[],
        )

text = "What does the image show?"
image_path = "example.png"
image = PIL.Image.open(image_path)

message = [
    {
        "role":"user",
        "content":[
            {"type":"image","image":image},
            {"type":"text","text":text}
            ]
            }
]
prompt = processor.apply_chat_template(
    message,
    tokenize=False,
    add_generation_prompt=True,
)
image_inputs, video_inputs = process_vision_info(message)
mm_data = {}
mm_data["image"] = image_inputs
processed_input = {
  "prompt": prompt,
  "multi_modal_data": mm_data,
}

outputs = llm.generate([processed_input], sampling_params=sampling_params)
print(outputs[0].outputs[0].text)

Citation

If you find our project useful, we hope you would kindly star our repo and cite our work as follows:

@article{xu2025lingshu,
  title={Lingshu: A Generalist Foundation Model for Unified Multimodal Medical Understanding and Reasoning},
  author={Xu, Weiwen and Chan, Hou Pong and Li, Long and Aljunied, Mahani and Yuan, Ruifeng and Wang, Jianyu and Xiao, Chenghao and Chen, Guizhen and Liu, Chaoqun and Li, Zhaodonghui and others},
  journal={arXiv preprint arXiv:2506.07044},
  year={2025}
}

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms