Image-Text-to-Text
Transformers
Safetensors
English
qwen2_5_vl
medical
multimodal
vqa
visual-grounding
chain-of-thought
reinforcement-learning
grpo
conversational
text-generation-inference
Instructions to use IQuestLab/UniReason-Med with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use IQuestLab/UniReason-Med with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="IQuestLab/UniReason-Med") 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, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("IQuestLab/UniReason-Med") model = AutoModelForMultimodalLM.from_pretrained("IQuestLab/UniReason-Med") 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 Settings
- vLLM
How to use IQuestLab/UniReason-Med with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "IQuestLab/UniReason-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": "IQuestLab/UniReason-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/IQuestLab/UniReason-Med
- SGLang
How to use IQuestLab/UniReason-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 "IQuestLab/UniReason-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": "IQuestLab/UniReason-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 "IQuestLab/UniReason-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": "IQuestLab/UniReason-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 IQuestLab/UniReason-Med with Docker Model Runner:
docker model run hf.co/IQuestLab/UniReason-Med
Add link to research paper
#5
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,28 +1,28 @@
|
|
| 1 |
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
base_model:
|
| 4 |
-
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
| 6 |
library_name: transformers
|
|
|
|
|
|
|
| 7 |
tags:
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
language:
|
| 17 |
-
- en
|
| 18 |
-
datasets:
|
| 19 |
-
- IQuestLab/UniReason-Med-Data
|
| 20 |
---
|
| 21 |
|
| 22 |
# UniReason-Med
|
| 23 |
|
| 24 |
UniReason-Med is a medical multimodal model that accompanies the paper
|
| 25 |
-
**"UniReason-Med: A Shared Grounded Reasoning Interface for 2D-to-3D Transfer in Medical VQA"**.
|
| 26 |
|
| 27 |
It studies whether grounded reasoning supervision from abundant 2D medical images can improve
|
| 28 |
3D medical VQA when both modalities share a common reasoning interface. A single checkpoint
|
|
@@ -90,4 +90,4 @@ If you use this model, please cite the UniReason-Med paper:
|
|
| 90 |
author = {UniReason-Med Team},
|
| 91 |
year = {2025}
|
| 92 |
}
|
| 93 |
-
```
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
base_model:
|
| 3 |
+
- Qwen/Qwen2.5-VL-7B-Instruct
|
| 4 |
+
datasets:
|
| 5 |
+
- IQuestLab/UniReason-Med-Data
|
| 6 |
+
language:
|
| 7 |
+
- en
|
| 8 |
library_name: transformers
|
| 9 |
+
license: apache-2.0
|
| 10 |
+
pipeline_tag: image-text-to-text
|
| 11 |
tags:
|
| 12 |
+
- medical
|
| 13 |
+
- multimodal
|
| 14 |
+
- vqa
|
| 15 |
+
- visual-grounding
|
| 16 |
+
- chain-of-thought
|
| 17 |
+
- reinforcement-learning
|
| 18 |
+
- grpo
|
| 19 |
+
- qwen2_5_vl
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
---
|
| 21 |
|
| 22 |
# UniReason-Med
|
| 23 |
|
| 24 |
UniReason-Med is a medical multimodal model that accompanies the paper
|
| 25 |
+
**["UniReason-Med: A Shared Grounded Reasoning Interface for 2D-to-3D Transfer in Medical VQA"](https://huggingface.co/papers/2606.11740)**.
|
| 26 |
|
| 27 |
It studies whether grounded reasoning supervision from abundant 2D medical images can improve
|
| 28 |
3D medical VQA when both modalities share a common reasoning interface. A single checkpoint
|
|
|
|
| 90 |
author = {UniReason-Med Team},
|
| 91 |
year = {2025}
|
| 92 |
}
|
| 93 |
+
```
|