GEM-ECG-Grounding
Collection
Empowering MLLM for Grounded ECG Understanding with Time Series and Images β’ 2 items β’ Updated β’ 1
How to use LANSG/GEM with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-text-to-text", model="LANSG/GEM") # Load model directly
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("LANSG/GEM", dtype="auto")How to use LANSG/GEM with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "LANSG/GEM"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "LANSG/GEM",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/LANSG/GEM
How to use LANSG/GEM with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "LANSG/GEM" \
--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": "LANSG/GEM",
"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 "LANSG/GEM" \
--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": "LANSG/GEM",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use LANSG/GEM with Docker Model Runner:
docker model run hf.co/LANSG/GEM
GEM is a multimodal LLM unifying ECG time series, 12-lead ECG images and text for grounded and clinician-aligned ECG interpretation. GEM enables feature-grounded analysis, evidence-driven reasoning, and a clinician-like diagnostic process.
If you find GEM helpful for your research and applications, please cite our paper:
@misc{lan2025gemempoweringmllmgrounded,
title={GEM: Empowering MLLM for Grounded ECG Understanding with Time Series and Images},
author={Xiang Lan and Feng Wu and Kai He and Qinghao Zhao and Shenda Hong and Mengling Feng},
year={2025},
eprint={2503.06073},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2503.06073},
}
docker model run hf.co/LANSG/GEM