Text Generation
Transformers
Safetensors
English
cxrmate-ed
chest X-ray report generation
radiology report generation
image captioning
chest X-ray
X-ray
radiology
cxrmate
report
radiology report
multimodal
patient data
patient records
mimic-cxr
mimic-iv-ed
custom_code
Instructions to use aehrc/cxrmate-ed with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use aehrc/cxrmate-ed with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="aehrc/cxrmate-ed", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("aehrc/cxrmate-ed", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use aehrc/cxrmate-ed with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "aehrc/cxrmate-ed" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aehrc/cxrmate-ed", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/aehrc/cxrmate-ed
- SGLang
How to use aehrc/cxrmate-ed 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 "aehrc/cxrmate-ed" \ --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": "aehrc/cxrmate-ed", "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 "aehrc/cxrmate-ed" \ --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": "aehrc/cxrmate-ed", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use aehrc/cxrmate-ed with Docker Model Runner:
docker model run hf.co/aehrc/cxrmate-ed
Upload tables.json with huggingface_hub
Browse files- tables.json +89 -0
tables.json
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"medrecon": {
|
| 3 |
+
"index_columns": [
|
| 4 |
+
"gsn",
|
| 5 |
+
"ndc",
|
| 6 |
+
"etc_rn",
|
| 7 |
+
"etccode"
|
| 8 |
+
],
|
| 9 |
+
"text_columns": ["name"],
|
| 10 |
+
"groupby": "stay_id",
|
| 11 |
+
"time_column": "edstays_intime"
|
| 12 |
+
},
|
| 13 |
+
"edstays": {
|
| 14 |
+
"index_columns": [
|
| 15 |
+
"gender",
|
| 16 |
+
"race",
|
| 17 |
+
"arrival_transport"
|
| 18 |
+
],
|
| 19 |
+
"groupby": "stay_id",
|
| 20 |
+
"time_column": "edstays_intime"
|
| 21 |
+
},
|
| 22 |
+
"triage": {
|
| 23 |
+
"text_columns": [
|
| 24 |
+
"chiefcomplaint",
|
| 25 |
+
"pain"
|
| 26 |
+
],
|
| 27 |
+
"value_columns": [
|
| 28 |
+
"temperature",
|
| 29 |
+
"heartrate",
|
| 30 |
+
"resprate",
|
| 31 |
+
"o2sat",
|
| 32 |
+
"sbp",
|
| 33 |
+
"dbp",
|
| 34 |
+
"acuity"
|
| 35 |
+
],
|
| 36 |
+
"groupby": "stay_id",
|
| 37 |
+
"time_column": "edstays_intime"
|
| 38 |
+
},
|
| 39 |
+
"vitalsign": {
|
| 40 |
+
"index_columns": [
|
| 41 |
+
"rhythm"
|
| 42 |
+
],
|
| 43 |
+
"text_columns": [
|
| 44 |
+
"pain"
|
| 45 |
+
],
|
| 46 |
+
"value_columns": [
|
| 47 |
+
"temperature",
|
| 48 |
+
"heartrate",
|
| 49 |
+
"resprate",
|
| 50 |
+
"o2sat",
|
| 51 |
+
"sbp",
|
| 52 |
+
"dbp"
|
| 53 |
+
],
|
| 54 |
+
"groupby": "vitalsign_charttime",
|
| 55 |
+
"time_column": "vitalsign_charttime"
|
| 56 |
+
},
|
| 57 |
+
"pyxis": {
|
| 58 |
+
"index_columns": [
|
| 59 |
+
"med_rn",
|
| 60 |
+
"name",
|
| 61 |
+
"gsn_rn",
|
| 62 |
+
"gsn"
|
| 63 |
+
],
|
| 64 |
+
"groupby": "pyxis_charttime",
|
| 65 |
+
"time_column": "pyxis_charttime"
|
| 66 |
+
},
|
| 67 |
+
"mimic_cxr_2_0_0_metadata": {
|
| 68 |
+
"index_columns": [
|
| 69 |
+
"PerformedProcedureStepDescription",
|
| 70 |
+
"ViewPosition",
|
| 71 |
+
"ProcedureCodeSequence_CodeMeaning",
|
| 72 |
+
"ViewCodeSequence_CodeMeaning",
|
| 73 |
+
"PatientOrientationCodeSequence_CodeMeaning"
|
| 74 |
+
],
|
| 75 |
+
"groupby": "study_id"
|
| 76 |
+
},
|
| 77 |
+
"mimic_cxr_sectioned": {
|
| 78 |
+
"groupby": "study_id",
|
| 79 |
+
"text_columns": [
|
| 80 |
+
"indication",
|
| 81 |
+
"history",
|
| 82 |
+
"comparison"
|
| 83 |
+
],
|
| 84 |
+
"target_sections": [
|
| 85 |
+
"findings",
|
| 86 |
+
"impression"
|
| 87 |
+
]
|
| 88 |
+
}
|
| 89 |
+
}
|