Instructions to use Hyeongwon/TRIAGE-4B-P12-SFT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Hyeongwon/TRIAGE-4B-P12-SFT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Hyeongwon/TRIAGE-4B-P12-SFT")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Hyeongwon/TRIAGE-4B-P12-SFT", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Hyeongwon/TRIAGE-4B-P12-SFT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Hyeongwon/TRIAGE-4B-P12-SFT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Hyeongwon/TRIAGE-4B-P12-SFT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Hyeongwon/TRIAGE-4B-P12-SFT
- SGLang
How to use Hyeongwon/TRIAGE-4B-P12-SFT 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 "Hyeongwon/TRIAGE-4B-P12-SFT" \ --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": "Hyeongwon/TRIAGE-4B-P12-SFT", "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 "Hyeongwon/TRIAGE-4B-P12-SFT" \ --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": "Hyeongwon/TRIAGE-4B-P12-SFT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Hyeongwon/TRIAGE-4B-P12-SFT with Docker Model Runner:
docker model run hf.co/Hyeongwon/TRIAGE-4B-P12-SFT
Update the model card for the revised paper
Browse files
README.md
CHANGED
|
@@ -12,13 +12,44 @@ tags:
|
|
| 12 |
|
| 13 |
# TRIAGE-4B-P12-SFT
|
| 14 |
|
| 15 |
-
SFT checkpoints
|
| 16 |
|
| 17 |
-
|
|
|
|
|
|
|
| 18 |
|
| 19 |
-
|
| 20 |
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
## Quick start
|
| 24 |
|
|
@@ -29,17 +60,33 @@ split = "split_1" # one of split_1 ... split_5
|
|
| 29 |
repo = "Hyeongwon/TRIAGE-4B-P12-SFT"
|
| 30 |
|
| 31 |
tokenizer = AutoTokenizer.from_pretrained(repo, subfolder=split)
|
| 32 |
-
model = AutoModelForCausalLM.from_pretrained(repo, subfolder=split, device_map="auto")
|
| 33 |
```
|
| 34 |
|
| 35 |
-
|
| 36 |
|
| 37 |
## Data
|
| 38 |
|
| 39 |
-
-
|
| 40 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
## Framework versions
|
| 45 |
|
|
@@ -47,7 +94,3 @@ Further preprocessing and split-construction details are in the linked GitHub re
|
|
| 47 |
- PyTorch: 2.6.0
|
| 48 |
- Datasets: 3.6.0
|
| 49 |
- Tokenizers: 0.22.2
|
| 50 |
-
|
| 51 |
-
## License
|
| 52 |
-
|
| 53 |
-
Model checkpoints are released under **CC BY-NC 4.0** (non-commercial). Datasets remain under their respective licenses.
|
|
|
|
| 12 |
|
| 13 |
# TRIAGE-4B-P12-SFT
|
| 14 |
|
| 15 |
+
SFT checkpoints of **TRIAGE** for in-hospital mortality (P12), one per cross-validation split. Part of the [TRIAGE collection](https://huggingface.co/collections/Hyeongwon/triage).
|
| 16 |
|
| 17 |
+
- Paper: [TRIAGE: Dialectical LLM Reasoning for Explainable Risk Prediction on Irregularly Sampled Medical Time Series](https://huggingface.co/papers/2606.09030)
|
| 18 |
+
- Code, data and training pipeline: [github.com/HyeongWon-Jang/TRIAGE](https://github.com/HyeongWon-Jang/TRIAGE)
|
| 19 |
+
- Project page: [hyeongwon-jang.github.io/triage-project-page](https://hyeongwon-jang.github.io/triage-project-page/)
|
| 20 |
|
| 21 |
+
TRIAGE trains an LLM to reason dialectically over the competing clinical outcomes. Given a patient's irregularly sampled medical time series, the model writes a rationale for survival and a rationale for in-hospital death before it commits to a final decision, and the risk score is read from the model's probability over that decision. This mitigates *risk polarization*, the collapse of graded risk into overconfident predictions under conventional LLM reasoning, so that one model gives both a clinician-readable rationale and a risk score comparable across patients.
|
| 22 |
|
| 23 |
+
The SFT + RL checkpoints post-trained from this stage are released as [TRIAGE-4B-P12](https://huggingface.co/Hyeongwon/TRIAGE-4B-P12).
|
| 24 |
+
|
| 25 |
+
## Model description
|
| 26 |
+
|
| 27 |
+
| | |
|
| 28 |
+
|---|---|
|
| 29 |
+
| Base model | [Qwen/Qwen3-4B-Base](https://huggingface.co/Qwen/Qwen3-4B-Base) |
|
| 30 |
+
| Task | In-hospital mortality prediction on P12 (PhysioNet Challenge 2012) |
|
| 31 |
+
| Training | supervised fine-tuning on dialectical-reasoning data with [TRL](https://github.com/huggingface/trl), 3 epochs ([`triage_sft/`](https://github.com/HyeongWon-Jang/TRIAGE/tree/main/triage_sft)) |
|
| 32 |
+
| Layout | `split_1` … `split_5`, one checkpoint per split, each in its own subfolder |
|
| 33 |
+
| Selection | per split, the checkpoint with the best validation AUPRC over the SFT run |
|
| 34 |
+
|
| 35 |
+
## Input and output format
|
| 36 |
+
|
| 37 |
+
The model expects the chat-style prompt the training data uses: the patient's static features and per-variable `(time, value)` series, the question, and the reasoning order (which outcome to argue for first). The exact prompt and how it is built from the raw data are in [`triage_sft/data/P12/`](https://github.com/HyeongWon-Jang/TRIAGE/tree/main/triage_sft/data/P12).
|
| 38 |
+
|
| 39 |
+
The answer has three headed sections, in the order the prompt asks for:
|
| 40 |
+
|
| 41 |
+
```
|
| 42 |
+
## Rationale for survival
|
| 43 |
+
...
|
| 44 |
+
|
| 45 |
+
## Rationale for in-hospital death
|
| 46 |
+
...
|
| 47 |
+
|
| 48 |
+
## Final Decision
|
| 49 |
+
1
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
`0` means survival and `1` means in-hospital death. The risk score is the next-token probability of `"1"` at the decision position, renormalised over the two tokens `"0"` and `"1"`, averaged over the two rationale orderings.
|
| 53 |
|
| 54 |
## Quick start
|
| 55 |
|
|
|
|
| 60 |
repo = "Hyeongwon/TRIAGE-4B-P12-SFT"
|
| 61 |
|
| 62 |
tokenizer = AutoTokenizer.from_pretrained(repo, subfolder=split)
|
| 63 |
+
model = AutoModelForCausalLM.from_pretrained(repo, subfolder=split, torch_dtype="auto", device_map="auto")
|
| 64 |
```
|
| 65 |
|
| 66 |
+
Scoring is two-step: sample the dialectical reasoning at temperature 0.7 up to the `## Final Decision` header, then read the logits of `"0"` and `"1"` at the next position. A complete `predict_risk` function is in the [GitHub README](https://github.com/HyeongWon-Jang/TRIAGE#quick-start).
|
| 67 |
|
| 68 |
## Data
|
| 69 |
|
| 70 |
+
- Raw: [PhysioNet Challenge 2012](https://physionet.org/content/challenge-2012/1.0.0/), in-hospital mortality (Open Data Commons Attribution License v1.0).
|
| 71 |
+
- Processed: [Raindrop-preprocessed release on figshare](https://doi.org/10.6084/m9.figshare.19514341.v1).
|
| 72 |
+
- Splits: the five cross-validation index files are in the GitHub repository ([`triage_sft/data/P12/splits/`](https://github.com/HyeongWon-Jang/TRIAGE/tree/main/triage_sft/data/P12/splits), `phy12_split{1..5}.npy`); each split's checkpoint here was trained on the training portion of the file with the same number.
|
| 73 |
+
|
| 74 |
+
No data is included in this repository.
|
| 75 |
+
|
| 76 |
+
## License
|
| 77 |
+
|
| 78 |
+
Model checkpoints are released under **CC BY-NC 4.0** (non-commercial). The base model and the datasets remain under their own licences.
|
| 79 |
|
| 80 |
+
## Citation
|
| 81 |
+
|
| 82 |
+
```bibtex
|
| 83 |
+
@article{jang2026triage,
|
| 84 |
+
title={TRIAGE: Dialectical LLM Reasoning for Explainable Risk Prediction on Irregularly Sampled Medical Time Series},
|
| 85 |
+
author={Jang, Hyeongwon and Chu, Gyouk and Kim, Changhun and Yoon, Hangyul and Lee, Jeonguk and Yang, Eunho and Park, Joonhyung},
|
| 86 |
+
journal={arXiv preprint arXiv:2606.09030},
|
| 87 |
+
year={2026}
|
| 88 |
+
}
|
| 89 |
+
```
|
| 90 |
|
| 91 |
## Framework versions
|
| 92 |
|
|
|
|
| 94 |
- PyTorch: 2.6.0
|
| 95 |
- Datasets: 3.6.0
|
| 96 |
- Tokenizers: 0.22.2
|
|
|
|
|
|
|
|
|
|
|
|