Instructions to use LANSG/GEM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
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") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use LANSG/GEM with vLLM:
Install from pip and serve model
# 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 }'Use Docker
docker model run hf.co/LANSG/GEM
- SGLang
How to use LANSG/GEM 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 "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 }'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 "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 Model Runner
How to use LANSG/GEM with Docker Model Runner:
docker model run hf.co/LANSG/GEM
Add pipeline tag and library name, link to code
#1
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,6 +1,9 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
| 4 |
# GEM: Empowering MLLM for Grounded ECG Understanding with Time Series and Images
|
| 5 |
|
| 6 |
<!-- <p align="left">
|
|
@@ -19,7 +22,6 @@ GEM is a multimodal LLM unifying ECG time series, 12-lead ECG images and text fo
|
|
| 19 |
|
| 20 |
#### Data: 🤗 [ECG-Grounding](https://huggingface.co/datasets/LANSG/ECG-Grounding)
|
| 21 |
|
| 22 |
-
|
| 23 |
## Setup
|
| 24 |
|
| 25 |
```shell
|
|
@@ -121,3 +123,6 @@ If you find GEM helpful for your research and applications, please cite our pape
|
|
| 121 |
## Acknowledgement
|
| 122 |
We thank the authors of [PULSE](https://github.com/AIMedLab/PULSE/tree/dev) and [ECG-Chat](https://github.com/YubaoZhao/ECG-Chat) for their publicly released models, datasets, and training codes.
|
| 123 |
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
pipeline_tag: image-text-to-text
|
| 4 |
+
library_name: transformers
|
| 5 |
---
|
| 6 |
+
|
| 7 |
# GEM: Empowering MLLM for Grounded ECG Understanding with Time Series and Images
|
| 8 |
|
| 9 |
<!-- <p align="left">
|
|
|
|
| 22 |
|
| 23 |
#### Data: 🤗 [ECG-Grounding](https://huggingface.co/datasets/LANSG/ECG-Grounding)
|
| 24 |
|
|
|
|
| 25 |
## Setup
|
| 26 |
|
| 27 |
```shell
|
|
|
|
| 123 |
## Acknowledgement
|
| 124 |
We thank the authors of [PULSE](https://github.com/AIMedLab/PULSE/tree/dev) and [ECG-Chat](https://github.com/YubaoZhao/ECG-Chat) for their publicly released models, datasets, and training codes.
|
| 125 |
|
| 126 |
+
## Code
|
| 127 |
+
|
| 128 |
+
Code: https://github.com/lanxiang1017/GEM
|