Image-Text-to-Text
Transformers
Safetensors
intern_s2_preview
medical
healthcare
clinical-reasoning
conversational
custom_code
Instructions to use OpenMedZoo/intern-med with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenMedZoo/intern-med with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="OpenMedZoo/intern-med", trust_remote_code=True) 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)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForImageTextToText model = AutoModelForImageTextToText.from_pretrained("OpenMedZoo/intern-med", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use OpenMedZoo/intern-med with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OpenMedZoo/intern-med" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OpenMedZoo/intern-med", "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/OpenMedZoo/intern-med
- SGLang
How to use OpenMedZoo/intern-med 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 "OpenMedZoo/intern-med" \ --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": "OpenMedZoo/intern-med", "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 "OpenMedZoo/intern-med" \ --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": "OpenMedZoo/intern-med", "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 OpenMedZoo/intern-med with Docker Model Runner:
docker model run hf.co/OpenMedZoo/intern-med
|
Download README.md from OpenMedZoo/intern-med: direct link, hf CLI and curl.
- Browser
- Download file 2.78 kB
-
https://huggingface.co/OpenMedZoo/intern-med/resolve/main/README.md
- Command line
-
hf download hf://OpenMedZoo/intern-med/README.md
-
curl -L -o README.md https://huggingface.co/OpenMedZoo/intern-med/resolve/main/README.md
2.78 kB
| library_name: transformers | |
| license: apache-2.0 | |
| pipeline_tag: image-text-to-text | |
| tags: | |
| - medical | |
| - healthcare | |
| - clinical-reasoning | |
| # Intern-Med | |
| **Intern-Med** is a medical-domain large language model built upon [Intern-S2-Preview](https://huggingface.co/internlm/Intern-S2-Preview). It strengthens medical knowledge and clinical reasoning, and produces explicit multi-stage structured reasoning (checklist-style chain-of-thought) in thinking mode, while preserving the general and mathematical capabilities of the base model. | |
| **GitHub**: [OpenMedZoo/intern-med](https://github.com/OpenMedZoo/intern-med) | **Paper**: [arXiv:2611.37274](https://arxiv.org/abs/2611.37274) | |
| ## Usage | |
| The model ships custom code, so `trust_remote_code=True` is required. It supports both text-only and multimodal (image) inputs; the weights are in bfloat16. | |
| ### vLLM (recommended) | |
| ```python | |
| from openai import OpenAI | |
| # Serving example: | |
| # vllm serve <path-or-repo>/intern-med \ | |
| # --trust-remote-code --reasoning-parser qwen3 --max-model-len 8192 | |
| client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY") | |
| resp = client.chat.completions.create( | |
| model="intern-med", | |
| messages=[ | |
| {"role": "system", "content": "<your system prompt>"}, | |
| {"role": "user", "content": "<your question>"}, | |
| ], | |
| temperature=0.0, | |
| ) | |
| print(resp.choices[0].message) | |
| ``` | |
| ### Transformers | |
| ```python | |
| from transformers import AutoModelForImageTextToText, AutoProcessor | |
| model = AutoModelForImageTextToText.from_pretrained( | |
| "<path-or-repo>/intern-med", torch_dtype="bfloat16", | |
| device_map="auto", trust_remote_code=True, | |
| ) | |
| processor = AutoProcessor.from_pretrained("<path-or-repo>/intern-med", trust_remote_code=True) | |
| ``` | |
| ## Recommended decoding | |
| - Greedy / low-temperature decoding works best for structured reasoning and benchmark-style tasks. | |
| - Thinking mode: use a reasoning parser (e.g. `--reasoning-parser qwen3` in vLLM) to separate the reasoning trace from the final answer. | |
| ## Disclaimer | |
| Intern-Med is a research model. Its outputs are for informational purposes only and **do not constitute medical advice, diagnosis, or treatment**. Always consult a qualified healthcare professional. | |
| ## License | |
| Apache 2.0. This model is derived from Intern-S2-Preview; please also comply with the base model's license terms. | |
| ## Citation | |
| ```bibtex | |
| @misc{yang2026internmed, | |
| title={Intern-Med: Step-Level Credit Assignment for Medical Reasoning}, | |
| author={Shuyun Yang and Rongzhao Zhang and Tao Yang and Yiran Wang and Xiangyu Li and Lantian Zhang and Lu Lu and Yun Zhong and Jinru Ding and Mouxiao Bian and Yi Fu and Zhao Jin and Ming Hu and Yirong Chen and Jie Xu}, | |
| year={2026}, | |
| eprint={2611.37274}, | |
| archivePrefix={arXiv}, | |
| primaryClass={cs.CL} | |
| } | |
| ``` | |