Image-Text-to-Text
Transformers
Safetensors
qwen3_5
medical
multimodal
vision-language-model
image-to-text
video-understanding
3d-understanding
qwen
conversational
Instructions to use ZJU-AI4H/Hulu-Med-Flash-Preview-27B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ZJU-AI4H/Hulu-Med-Flash-Preview-27B 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-Flash-Preview-27B") 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-Flash-Preview-27B") model = AutoModelForMultimodalLM.from_pretrained("ZJU-AI4H/Hulu-Med-Flash-Preview-27B", device_map="auto") 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-Flash-Preview-27B 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-Flash-Preview-27B" # 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-Flash-Preview-27B", "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-Flash-Preview-27B
- SGLang
How to use ZJU-AI4H/Hulu-Med-Flash-Preview-27B 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-Flash-Preview-27B" \ --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-Flash-Preview-27B", "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-Flash-Preview-27B" \ --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-Flash-Preview-27B", "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-Flash-Preview-27B with Docker Model Runner:
docker model run hf.co/ZJU-AI4H/Hulu-Med-Flash-Preview-27B
| { | |
| "axis:accuracy": 0.6802249601322042, | |
| "axis:accuracy:bootstrap_std": 0.006935855810939086, | |
| "axis:accuracy:n_samples": 4150, | |
| "axis:communication_quality": 0.6334046944946061, | |
| "axis:communication_quality:bootstrap_std": 0.01312704724626713, | |
| "axis:communication_quality:n_samples": 2226, | |
| "axis:completeness": 0.6947947084430387, | |
| "axis:completeness:bootstrap_std": 0.006519914145458952, | |
| "axis:completeness:n_samples": 4145, | |
| "axis:context_awareness": 0.5734805009928334, | |
| "axis:context_awareness:bootstrap_std": 0.009566255547570488, | |
| "axis:context_awareness:n_samples": 3337, | |
| "axis:instruction_following": 0.5888066056586314, | |
| "axis:instruction_following:bootstrap_std": 0.019385416807550317, | |
| "axis:instruction_following:n_samples": 1020, | |
| "cluster:communication_health-professional_accuracy_completeness": 0.9968944099378882, | |
| "cluster:communication_health-professional_accuracy_completeness:bootstrap_std": 0.0031268696424768274, | |
| "cluster:communication_health-professional_accuracy_completeness:n_samples": 322, | |
| "cluster:communication_health-professional_tailored": 0.9503105590062112, | |
| "cluster:communication_health-professional_tailored:bootstrap_std": 0.011737762827432155, | |
| "cluster:communication_health-professional_tailored:n_samples": 322, | |
| "cluster:communication_not-health-professional_accuracy_completeness": 1.0, | |
| "cluster:communication_not-health-professional_accuracy_completeness:bootstrap_std": 0.0, | |
| "cluster:communication_not-health-professional_accuracy_completeness:n_samples": 424, | |
| "cluster:communication_not-health-professional_tailored": 1.0, | |
| "cluster:communication_not-health-professional_tailored:bootstrap_std": 0.0, | |
| "cluster:communication_not-health-professional_tailored:n_samples": 424, | |
| "cluster:complex_responses_detailed_accuracy_hedging": 0.8136645962732919, | |
| "cluster:complex_responses_detailed_accuracy_hedging:bootstrap_std": 0.031627717083977755, | |
| "cluster:complex_responses_detailed_accuracy_hedging:n_samples": 161, | |
| "cluster:complex_responses_detailed_appropriate": 0.8571428571428571, | |
| "cluster:complex_responses_detailed_appropriate:bootstrap_std": 0.027387695710236377, | |
| "cluster:complex_responses_detailed_appropriate:n_samples": 161, | |
| "cluster:complex_responses_simple_accuracy_hedging": 0.9325153374233128, | |
| "cluster:complex_responses_simple_accuracy_hedging:bootstrap_std": 0.019858655953187716, | |
| "cluster:complex_responses_simple_accuracy_hedging:n_samples": 163, | |
| "cluster:complex_responses_simple_appropriate": 0.3374233128834356, | |
| "cluster:complex_responses_simple_appropriate:bootstrap_std": 0.03829459401267765, | |
| "cluster:complex_responses_simple_appropriate:n_samples": 163, | |
| "cluster:context_seeking_enough-context_helpful_safe": 0.9955947136563876, | |
| "cluster:context_seeking_enough-context_helpful_safe:bootstrap_std": 0.004157348802957958, | |
| "cluster:context_seeking_enough-context_helpful_safe:n_samples": 227, | |
| "cluster:context_seeking_enough-context_precise": 0.9162995594713657, | |
| "cluster:context_seeking_enough-context_precise:bootstrap_std": 0.018153788958839196, | |
| "cluster:context_seeking_enough-context_precise:n_samples": 227, | |
| "cluster:context_seeking_not-enough-context_context_seeking": 0.8895027624309392, | |
| "cluster:context_seeking_not-enough-context_context_seeking:bootstrap_std": 0.023278469062262802, | |
| "cluster:context_seeking_not-enough-context_context_seeking:n_samples": 181, | |
| "cluster:context_seeking_not-enough-context_helpful_safe": 1.0, | |
| "cluster:context_seeking_not-enough-context_helpful_safe:bootstrap_std": 0.0, | |
| "cluster:context_seeking_not-enough-context_helpful_safe:n_samples": 181, | |
| "cluster:emergency_referrals_conditionally-emergent_context_seeking": 1.0, | |
| "cluster:emergency_referrals_conditionally-emergent_context_seeking:bootstrap_std": 0.0, | |
| "cluster:emergency_referrals_conditionally-emergent_context_seeking:n_samples": 180, | |
| "cluster:emergency_referrals_conditionally-emergent_emergency_behavior": 1.0, | |
| "cluster:emergency_referrals_conditionally-emergent_emergency_behavior:bootstrap_std": 0.0, | |
| "cluster:emergency_referrals_conditionally-emergent_emergency_behavior:n_samples": 180, | |
| "cluster:emergency_referrals_emergent_context_seeking": 0.9712230215827338, | |
| "cluster:emergency_referrals_emergent_context_seeking:bootstrap_std": 0.01400643858836024, | |
| "cluster:emergency_referrals_emergent_context_seeking:n_samples": 139, | |
| "cluster:emergency_referrals_emergent_emergency_behavior": 0.8705035971223022, | |
| "cluster:emergency_referrals_emergent_emergency_behavior:bootstrap_std": 0.028491239663087052, | |
| "cluster:emergency_referrals_emergent_emergency_behavior:n_samples": 139, | |
| "cluster:emergency_referrals_non-emergent_context_seeking": 1.0, | |
| "cluster:emergency_referrals_non-emergent_context_seeking:bootstrap_std": 0.0, | |
| "cluster:emergency_referrals_non-emergent_context_seeking:n_samples": 134, | |
| "cluster:emergency_referrals_non-emergent_emergency_behavior": 1.0, | |
| "cluster:emergency_referrals_non-emergent_emergency_behavior:bootstrap_std": 0.0, | |
| "cluster:emergency_referrals_non-emergent_emergency_behavior:n_samples": 134, | |
| "cluster:global_health_context-does-not-matter_aligned_accurate": 1.0, | |
| "cluster:global_health_context-does-not-matter_aligned_accurate:bootstrap_std": 0.0, | |
| "cluster:global_health_context-does-not-matter_aligned_accurate:n_samples": 220, | |
| "cluster:global_health_context-does-not-matter_language": 1.0, | |
| "cluster:global_health_context-does-not-matter_language:bootstrap_std": 0.0, | |
| "cluster:global_health_context-does-not-matter_language:n_samples": 220, | |
| "cluster:global_health_context-matters-but-unclear_aligned_accurate": 1.0, | |
| "cluster:global_health_context-matters-but-unclear_aligned_accurate:bootstrap_std": 0.0, | |
| "cluster:global_health_context-matters-but-unclear_aligned_accurate:n_samples": 219, | |
| "cluster:global_health_context-matters-but-unclear_language": 0.9908675799086758, | |
| "cluster:global_health_context-matters-but-unclear_language:bootstrap_std": 0.006439228866660932, | |
| "cluster:global_health_context-matters-but-unclear_language:n_samples": 219, | |
| "cluster:global_health_context-matters-is-clear_aligned_accurate": 1.0, | |
| "cluster:global_health_context-matters-is-clear_aligned_accurate:bootstrap_std": 0.0, | |
| "cluster:global_health_context-matters-is-clear_aligned_accurate:n_samples": 195, | |
| "cluster:global_health_context-matters-is-clear_language": 0.9897435897435898, | |
| "cluster:global_health_context-matters-is-clear_language:bootstrap_std": 0.007207270417922071, | |
| "cluster:global_health_context-matters-is-clear_language:n_samples": 195, | |
| "cluster:health_data_tasks_enough-info-to-complete-task_accuracy_safety": 0.9813953488372092, | |
| "cluster:health_data_tasks_enough-info-to-complete-task_accuracy_safety:bootstrap_std": 0.009296165402165792, | |
| "cluster:health_data_tasks_enough-info-to-complete-task_accuracy_safety:n_samples": 215, | |
| "cluster:health_data_tasks_enough-info-to-complete-task_response_instruction_following": 0.986046511627907, | |
| "cluster:health_data_tasks_enough-info-to-complete-task_response_instruction_following:bootstrap_std": 0.007978010612058781, | |
| "cluster:health_data_tasks_enough-info-to-complete-task_response_instruction_following:n_samples": 215, | |
| "cluster:health_data_tasks_not-enough-info-to-complete-task_helpfulness": 1.0, | |
| "cluster:health_data_tasks_not-enough-info-to-complete-task_helpfulness:bootstrap_std": 0.0, | |
| "cluster:health_data_tasks_not-enough-info-to-complete-task_helpfulness:n_samples": 180, | |
| "cluster:health_data_tasks_not-enough-info-to-complete-task_safety": 0.9888888888888889, | |
| "cluster:health_data_tasks_not-enough-info-to-complete-task_safety:bootstrap_std": 0.008225855053307524, | |
| "cluster:health_data_tasks_not-enough-info-to-complete-task_safety:n_samples": 180, | |
| "cluster:hedging_any-reducible-uncertainty_accurate": 1.0, | |
| "cluster:hedging_any-reducible-uncertainty_accurate:bootstrap_std": 0.0, | |
| "cluster:hedging_any-reducible-uncertainty_accurate:n_samples": 285, | |
| "cluster:hedging_any-reducible-uncertainty_hedges": 0.9964912280701754, | |
| "cluster:hedging_any-reducible-uncertainty_hedges:bootstrap_std": 0.0033937280336148773, | |
| "cluster:hedging_any-reducible-uncertainty_hedges:n_samples": 285, | |
| "cluster:hedging_any-reducible-uncertainty_seeks_context": 0.9789473684210527, | |
| "cluster:hedging_any-reducible-uncertainty_seeks_context:bootstrap_std": 0.00850397477358855, | |
| "cluster:hedging_any-reducible-uncertainty_seeks_context:n_samples": 285, | |
| "cluster:hedging_no-uncertainty_accurate": 0.9912280701754386, | |
| "cluster:hedging_no-uncertainty_accurate:bootstrap_std": 0.005920136381349386, | |
| "cluster:hedging_no-uncertainty_accurate:n_samples": 228, | |
| "cluster:hedging_no-uncertainty_hedges": 0.9824561403508771, | |
| "cluster:hedging_no-uncertainty_hedges:bootstrap_std": 0.008670367089477646, | |
| "cluster:hedging_no-uncertainty_hedges:n_samples": 228, | |
| "cluster:hedging_no-uncertainty_seeks_context": 0.38596491228070173, | |
| "cluster:hedging_no-uncertainty_seeks_context:bootstrap_std": 0.03265768356661586, | |
| "cluster:hedging_no-uncertainty_seeks_context:n_samples": 228, | |
| "cluster:hedging_only-irreducible-uncertainty_accurate": 0.98989898989899, | |
| "cluster:hedging_only-irreducible-uncertainty_accurate:bootstrap_std": 0.007104491796990172, | |
| "cluster:hedging_only-irreducible-uncertainty_accurate:n_samples": 198, | |
| "cluster:hedging_only-irreducible-uncertainty_hedges": 0.9848484848484849, | |
| "cluster:hedging_only-irreducible-uncertainty_hedges:bootstrap_std": 0.008972675306330976, | |
| "cluster:hedging_only-irreducible-uncertainty_hedges:n_samples": 198, | |
| "cluster:hedging_only-irreducible-uncertainty_seeks_context": 0.21717171717171718, | |
| "cluster:hedging_only-irreducible-uncertainty_seeks_context:bootstrap_std": 0.028785674202312962, | |
| "cluster:hedging_only-irreducible-uncertainty_seeks_context:n_samples": 198, | |
| "level:cluster": 0.9356215381821483, | |
| "level:cluster:bootstrap_std": 0.002612429045583237, | |
| "level:cluster:n_samples": 3671, | |
| "level:example": 0.5717996653876523, | |
| "level:example:bootstrap_std": 0.005219424436670993, | |
| "level:example:n_samples": 4706, | |
| "overall_score": 0.6454187490505752, | |
| "overall_score:bootstrap_std": 0.004683717719268265, | |
| "overall_score:n_samples": 5000, | |
| "physician_agreed_category:any-reducible-uncertainty": 0.7222298247760451, | |
| "physician_agreed_category:any-reducible-uncertainty:bootstrap_std": 0.01100976460113181, | |
| "physician_agreed_category:any-reducible-uncertainty:n_samples": 285, | |
| "physician_agreed_category:conditionally-emergent": 0.7962824437369701, | |
| "physician_agreed_category:conditionally-emergent:bootstrap_std": 0.014413211106561572, | |
| "physician_agreed_category:conditionally-emergent:n_samples": 180, | |
| "physician_agreed_category:context-does-not-matter": 0.7191272263814744, | |
| "physician_agreed_category:context-does-not-matter:bootstrap_std": 0.013970857713410499, | |
| "physician_agreed_category:context-does-not-matter:n_samples": 220, | |
| "physician_agreed_category:context-matters-but-unclear": 0.6448732783584602, | |
| "physician_agreed_category:context-matters-but-unclear:bootstrap_std": 0.016250602066904027, | |
| "physician_agreed_category:context-matters-but-unclear:n_samples": 219, | |
| "physician_agreed_category:context-matters-is-clear": 0.6315050329875499, | |
| "physician_agreed_category:context-matters-is-clear:bootstrap_std": 0.0140481998074811, | |
| "physician_agreed_category:context-matters-is-clear:n_samples": 195, | |
| "physician_agreed_category:detailed": 0.46259911555003036, | |
| "physician_agreed_category:detailed:bootstrap_std": 0.021825360111090177, | |
| "physician_agreed_category:detailed:n_samples": 161, | |
| "physician_agreed_category:emergent": 0.7172648926212142, | |
| "physician_agreed_category:emergent:bootstrap_std": 0.02263883811668886, | |
| "physician_agreed_category:emergent:n_samples": 139, | |
| "physician_agreed_category:enough-context": 0.6641828529577007, | |
| "physician_agreed_category:enough-context:bootstrap_std": 0.01312649467156036, | |
| "physician_agreed_category:enough-context:n_samples": 227, | |
| "physician_agreed_category:enough-info-to-complete-task": 0.6250090338683834, | |
| "physician_agreed_category:enough-info-to-complete-task:bootstrap_std": 0.01878239273985451, | |
| "physician_agreed_category:enough-info-to-complete-task:n_samples": 215, | |
| "physician_agreed_category:health-professional": 0.661094667892858, | |
| "physician_agreed_category:health-professional:bootstrap_std": 0.0160511942277241, | |
| "physician_agreed_category:health-professional:n_samples": 322, | |
| "physician_agreed_category:no-uncertainty": 0.6822047829380083, | |
| "physician_agreed_category:no-uncertainty:bootstrap_std": 0.013518250646346928, | |
| "physician_agreed_category:no-uncertainty:n_samples": 228, | |
| "physician_agreed_category:non-emergent": 0.8252020033962351, | |
| "physician_agreed_category:non-emergent:bootstrap_std": 0.017950275710219763, | |
| "physician_agreed_category:non-emergent:n_samples": 134, | |
| "physician_agreed_category:not-enough-context": 0.6624109130107518, | |
| "physician_agreed_category:not-enough-context:bootstrap_std": 0.015722725548736025, | |
| "physician_agreed_category:not-enough-context:n_samples": 181, | |
| "physician_agreed_category:not-enough-info-to-complete-task": 0.5657800654737332, | |
| "physician_agreed_category:not-enough-info-to-complete-task:bootstrap_std": 0.0227270239759125, | |
| "physician_agreed_category:not-enough-info-to-complete-task:n_samples": 180, | |
| "physician_agreed_category:not-health-professional": 0.8019190810773825, | |
| "physician_agreed_category:not-health-professional:bootstrap_std": 0.009698884811219327, | |
| "physician_agreed_category:not-health-professional:n_samples": 424, | |
| "physician_agreed_category:only-irreducible-uncertainty": 0.682556734277869, | |
| "physician_agreed_category:only-irreducible-uncertainty:bootstrap_std": 0.015032082205994451, | |
| "physician_agreed_category:only-irreducible-uncertainty:n_samples": 198, | |
| "physician_agreed_category:simple": 0.44027808750728237, | |
| "physician_agreed_category:simple:bootstrap_std": 0.025861163572299103, | |
| "physician_agreed_category:simple:n_samples": 163, | |
| "score": 0.6454187490505752, | |
| "score:bootstrap_std": 0.004475638764244864, | |
| "score:n_samples": 5000, | |
| "theme:communication": 0.6959863919883297, | |
| "theme:communication:bootstrap_std": 0.010316932608140058, | |
| "theme:communication:n_samples": 919, | |
| "theme:complex_responses": 0.4151233354901499, | |
| "theme:complex_responses:bootstrap_std": 0.024508528275305096, | |
| "theme:complex_responses:n_samples": 360, | |
| "theme:context_seeking": 0.644349558860912, | |
| "theme:context_seeking:bootstrap_std": 0.010936949837123002, | |
| "theme:context_seeking:n_samples": 594, | |
| "theme:emergency_referrals": 0.7715629204705584, | |
| "theme:emergency_referrals:bootstrap_std": 0.011220026138719143, | |
| "theme:emergency_referrals:n_samples": 482, | |
| "theme:global_health": 0.6343326754832087, | |
| "theme:global_health:bootstrap_std": 0.008202239279193233, | |
| "theme:global_health:n_samples": 1097, | |
| "theme:health_data_tasks": 0.5619161397858877, | |
| "theme:health_data_tasks:bootstrap_std": 0.017220429190975967, | |
| "theme:health_data_tasks:n_samples": 477, | |
| "theme:hedging": 0.6718057338244705, | |
| "theme:hedging:bootstrap_std": 0.008790435265561206, | |
| "theme:hedging:n_samples": 1071 | |
| } |