Image-Text-to-Text
Transformers
Safetensors
qwen3_vl
medical
multimodal
grounding
report-generation
radiology
clinical-reasoning
mri
ct
histopathology
x-ray
fundus
conversational
Instructions to use MBZUAI/MedMO-4B-Next with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MBZUAI/MedMO-4B-Next with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="MBZUAI/MedMO-4B-Next") 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, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("MBZUAI/MedMO-4B-Next") model = AutoModelForImageTextToText.from_pretrained("MBZUAI/MedMO-4B-Next") 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
- vLLM
How to use MBZUAI/MedMO-4B-Next with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MBZUAI/MedMO-4B-Next" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MBZUAI/MedMO-4B-Next", "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/MBZUAI/MedMO-4B-Next
- SGLang
How to use MBZUAI/MedMO-4B-Next 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 "MBZUAI/MedMO-4B-Next" \ --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": "MBZUAI/MedMO-4B-Next", "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 "MBZUAI/MedMO-4B-Next" \ --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": "MBZUAI/MedMO-4B-Next", "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 MBZUAI/MedMO-4B-Next with Docker Model Runner:
docker model run hf.co/MBZUAI/MedMO-4B-Next
Add MediX-R1-8B model performance data
Browse files
README.md
CHANGED
|
@@ -48,6 +48,7 @@ MedMO-8B-Next sets a new state-of-the-art across the board, achieving the highes
|
|
| 48 |
|---|---|---|---|---|---|---|---|---|
|
| 49 |
| Lingshu-7B | 54.0 | 77.2 / 43.0 | 82.4 / 33.2 | 41.9 | 54.2 | 82.9 | 26.9 | 55.1 |
|
| 50 |
| Fleming-VL-8B | 63.3 | 78.4 / 56.4 | <u>86.9 / 80.0</u> | 56.5 | 64.3 | 88.2 | 21.6 | 66.1 |
|
|
|
|
| 51 |
| MedMO-4B | 54.6 | 50.9 / 35.0 | 41.0 / 30.0 | 42.4 | 50.6 | 79.7 | 24.8 | 45.4 |
|
| 52 |
| MedMO-8B | <u>64.6</u> | 72.3 / 64.7 | 70.6 / 70.0 | 56.3 | 59.4 | 84.8 | 26.2 | 63.2 |
|
| 53 |
| MedMO-4B-Next | 58.7 | <u>79.7 / 59.6</u> | 78.0 / 74.0 | **73.3** | **75.7** | <u>90.6</u> | <u>27.0</u> | <u>68.5</u> |
|
|
@@ -59,6 +60,7 @@ MedMO-8B-Next sets a new state-of-the-art across the board, achieving the highes
|
|
| 59 |
|---|---|---|---|---|---|---|---|---|
|
| 60 |
| Lingshu-7B | 69.6 | 75.8 | 56.3 | 63.5 | 62.0 / 53.8 | 16.4 | 27.5 | 53.1 |
|
| 61 |
| Fleming-VL-8B | 71.8 | 74.0 | 51.8 | 53.7 | 40.5 / 37.3 | 12.1 | 24.9 | 45.7 |
|
|
|
|
| 62 |
| MedMO-4B | 75.7 | <u>78.0</u> | 58.0 | 78.5 | 57.5 / 47.7 | 16.4 | 29.4 | 55.1 |
|
| 63 |
| MedMO-8B | **81.0** | 77.6 | **65.0** | **84.3** | **66.5 / 60.2** | <u>19.9</u> | **36.0** | **61.3** |
|
| 64 |
| MedMO-4B-Next | 74.8 | **78.2** | 58.1 | 78.3 | 57.4 / 47.6 | 16.5 | 29.5 | 55.0 |
|
|
|
|
| 48 |
|---|---|---|---|---|---|---|---|---|
|
| 49 |
| Lingshu-7B | 54.0 | 77.2 / 43.0 | 82.4 / 33.2 | 41.9 | 54.2 | 82.9 | 26.9 | 55.1 |
|
| 50 |
| Fleming-VL-8B | 63.3 | 78.4 / 56.4 | <u>86.9 / 80.0</u> | 56.5 | 64.3 | 88.2 | 21.6 | 66.1 |
|
| 51 |
+
| MediX-R1-8B | 63.3 | 75.2/51.6 | 70.3/54.4 | 41.0 | 55.3 | 73.8 | 24.9 | 57.1 |
|
| 52 |
| MedMO-4B | 54.6 | 50.9 / 35.0 | 41.0 / 30.0 | 42.4 | 50.6 | 79.7 | 24.8 | 45.4 |
|
| 53 |
| MedMO-8B | <u>64.6</u> | 72.3 / 64.7 | 70.6 / 70.0 | 56.3 | 59.4 | 84.8 | 26.2 | 63.2 |
|
| 54 |
| MedMO-4B-Next | 58.7 | <u>79.7 / 59.6</u> | 78.0 / 74.0 | **73.3** | **75.7** | <u>90.6</u> | <u>27.0</u> | <u>68.5</u> |
|
|
|
|
| 60 |
|---|---|---|---|---|---|---|---|---|
|
| 61 |
| Lingshu-7B | 69.6 | 75.8 | 56.3 | 63.5 | 62.0 / 53.8 | 16.4 | 27.5 | 53.1 |
|
| 62 |
| Fleming-VL-8B | 71.8 | 74.0 | 51.8 | 53.7 | 40.5 / 37.3 | 12.1 | 24.9 | 45.7 |
|
| 63 |
+
| MediX-R1-8B | 79.0 | 73.4 | 60.1 | 85.8 | 55.1/47.0 | 14.4 | 34.3 | 56.1 |
|
| 64 |
| MedMO-4B | 75.7 | <u>78.0</u> | 58.0 | 78.5 | 57.5 / 47.7 | 16.4 | 29.4 | 55.1 |
|
| 65 |
| MedMO-8B | **81.0** | 77.6 | **65.0** | **84.3** | **66.5 / 60.2** | <u>19.9</u> | **36.0** | **61.3** |
|
| 66 |
| MedMO-4B-Next | 74.8 | **78.2** | 58.1 | 78.3 | 57.4 / 47.6 | 16.5 | 29.5 | 55.0 |
|