Image-Text-to-Text
Transformers
Safetensors
PyTorch
qwen3_vl_moe
medical
multimodal
vision-language-model
image-to-text
video-understanding
3d-understanding
qwen
conversational
Instructions to use ZJU-AI4H/Hulu-Med-235A22 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ZJU-AI4H/Hulu-Med-235A22 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="ZJU-AI4H/Hulu-Med-235A22") 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("ZJU-AI4H/Hulu-Med-235A22") model = AutoModelForMultimodalLM.from_pretrained("ZJU-AI4H/Hulu-Med-235A22") 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 ZJU-AI4H/Hulu-Med-235A22 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ZJU-AI4H/Hulu-Med-235A22" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ZJU-AI4H/Hulu-Med-235A22", "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/ZJU-AI4H/Hulu-Med-235A22
- SGLang
How to use ZJU-AI4H/Hulu-Med-235A22 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 "ZJU-AI4H/Hulu-Med-235A22" \ --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": "ZJU-AI4H/Hulu-Med-235A22", "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 "ZJU-AI4H/Hulu-Med-235A22" \ --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": "ZJU-AI4H/Hulu-Med-235A22", "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 ZJU-AI4H/Hulu-Med-235A22 with Docker Model Runner:
docker model run hf.co/ZJU-AI4H/Hulu-Med-235A22
Add files using upload-large-folder tool
Browse files- model-00006-of-00096.safetensors +3 -0
- model-00007-of-00096.safetensors +3 -0
- model-00016-of-00096.safetensors +3 -0
- model-00027-of-00096.safetensors +3 -0
- model-00028-of-00096.safetensors +3 -0
- model-00031-of-00096.safetensors +3 -0
- model-00032-of-00096.safetensors +3 -0
- model-00040-of-00096.safetensors +3 -0
- model-00046-of-00096.safetensors +3 -0
- model-00054-of-00096.safetensors +3 -0
- model-00067-of-00096.safetensors +3 -0
- model-00079-of-00096.safetensors +3 -0
- model-00089-of-00096.safetensors +3 -0
model-00006-of-00096.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b45c7567a7b2bc5543e067f8b880c559b3be757e09a76000a38bd4d870d6b35f
|
| 3 |
+
size 4975511456
|
model-00007-of-00096.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7d6318fbc24ee2a9638e63b13a3d9822db06cb884e9d3e5416faffc983c004c8
|
| 3 |
+
size 4975511456
|
model-00016-of-00096.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:087a6120119bae9126e332e81aa0bc4437ede10215c3f6ffd9fa13bd594cce72
|
| 3 |
+
size 4975511464
|
model-00027-of-00096.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f3dd6ee9520c541d16fb76aac1cd26ac162b2b8a2ea708d405f98c8bb590f2ea
|
| 3 |
+
size 4975511464
|
model-00028-of-00096.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7e7f3d94e21bb5fd2231e8f270c5d45d92bf36e0c927c7a4988038657da2997c
|
| 3 |
+
size 4975511464
|
model-00031-of-00096.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c400a3d2ad6b5c0a33d8492c676c0178d4462d9218ed863da6a7324c658ab9ec
|
| 3 |
+
size 4975511464
|
model-00032-of-00096.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2d66dbfcdea4c6b964b66d5124fabf07b0ca329b554428836d766f82d00b7b8e
|
| 3 |
+
size 4975511464
|
model-00040-of-00096.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8227818f3078496b2ed2cdbc326176687cf736d232b56412e417e3398019c7d5
|
| 3 |
+
size 4975511464
|
model-00046-of-00096.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bbdb80f35eaf6b45968fee1509167ebd17f8bd486c8ee1cea3fe31da1f7915c3
|
| 3 |
+
size 4975511464
|
model-00054-of-00096.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3de83a46a90bff6f911b456e41345d5670cb3b600937ec4c83c06cf2a65c4cf1
|
| 3 |
+
size 4975511464
|
model-00067-of-00096.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5bf27a365929a6c833cf2c472735fbd9727c458dc76844a8443df95757eb4a88
|
| 3 |
+
size 4975511464
|
model-00079-of-00096.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f7a9cf8bcca25bf4bf603fa99bffd8b95a57288b58ace01ef05ab95f78220377
|
| 3 |
+
size 4975511464
|
model-00089-of-00096.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d80e6a8acf32429d4c48b3a6e026eacb47af7e4d61b4c9b5c57ee7bfdbc98f2e
|
| 3 |
+
size 4975511464
|