StanfordAIMI/rrg24-shared-task-bionlp
Viewer • Updated • 342k • 14 • 11
How to use X-iZhang/Med-CXRGen-F with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-text-to-text", model="X-iZhang/Med-CXRGen-F") # Load model directly
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("X-iZhang/Med-CXRGen-F", dtype="auto")How to use X-iZhang/Med-CXRGen-F with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "X-iZhang/Med-CXRGen-F"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "X-iZhang/Med-CXRGen-F",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/X-iZhang/Med-CXRGen-F
How to use X-iZhang/Med-CXRGen-F with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "X-iZhang/Med-CXRGen-F" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "X-iZhang/Med-CXRGen-F",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "X-iZhang/Med-CXRGen-F" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "X-iZhang/Med-CXRGen-F",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use X-iZhang/Med-CXRGen-F with Docker Model Runner:
docker model run hf.co/X-iZhang/Med-CXRGen-F
Task: Radiology Report Generation – Findings section (RRG Shared Task)
For details on Med-CXRGen-F, including its architecture, training strategy, and evaluation—please refer to the following resources:
If you use this model in academic or research contexts, please cite:
@inproceedings{zhang-etal-2024-gla,
title = "Gla-{AI}4{B}io{M}ed at {RRG}24: Visual Instruction-tuned Adaptation for Radiology Report Generation",
author = "Zhang, Xi and
Meng, Zaiqiao and
Lever, Jake and
Ho, Edmond S.L.",
editor = "Demner-Fushman, Dina and
Ananiadou, Sophia and
Miwa, Makoto and
Roberts, Kirk and
Tsujii, Junichi",
booktitle = "Proceedings of the 23rd Workshop on Biomedical Natural Language Processing",
month = aug,
year = "2024",
address = "Bangkok, Thailand",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2024.bionlp-1.54/",
doi = "10.18653/v1/2024.bionlp-1.54",
pages = "624--634",
}
Base model
liuhaotian/llava-v1.5-7b