Instructions to use carlclausewitz/strands-decider-clinical-use with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Strands Decider
How to use carlclausewitz/strands-decider-clinical-use with Strands Decider:
# pip install strands-decider strands-decider ask carlclausewitz/strands-decider-clinical-use \ --state "Help! My payouts have been failing for 3 days!" \ --choice "Which team should handle this?=billing,sales,retail" \ --noul "Does this convey urgency?"
- Notebooks
- Google Colab
- Kaggle
Strands Decider 2B — Korean Clinical
Reads a doctor's shorthand. Answers in probabilities. Fits in 0.9 GB.
Korean outpatient notes are terse, bilingual and full of hedges: 물치 의뢰, f/u 2w, PT 거부함, 호전 없으면 MRI 고려.
This model reads a plan line together with the patient summary and the doctor's own habit notes, and answers the questions
that turn a note into action — Is this a referral? A follow-up? How many weeks? Which handout? Which past plan fits this patient? —
each with a calibrated probability, so you can act only when it is sure. It never writes text: every answer is one of the options you supply.
Highlights
- 🎯 70.1% → 97.6% on held-out lines and doctors after LoRA fine-tuning; the compressed release keeps 96.1%.
- 📈 +9 points in a full autocomplete pipeline on 144 independently written cases (79.2% → 88.2%), with wrong suggestions nearly halved (20 → 11).
- 🧭 Reads negation and context: refused, deferred, conditional and already-done plans, and picks the past plan that fits each patient (21.8% → 85.2%).
- 🪶 4× smaller, same pipeline score: LoRA merged, 4 of 24 layers pruned, int4 weights. 3.8 GB → 0.9 GB; 127/144 before and after.
- ⚡ 77 ms per request (9–11 questions) on a single RTX PRO 6000, 2× faster than serving the unmerged LoRA.
- 📏 Trustworthy confidence: ECE 0.022; when it says ≥ 0.9, it is right 97.2% of the time.
- 🔓 Apache 2.0, with the full training, pruning and quantization recipe below.
⚠️ Research model — not a medical device. Trained and evaluated only on synthetic data. Do not use for patient care.
Model details
| Developed by | William Park |
| Model type | Strands Decider: Qwen3.5-2B torso + pointer head that scores options |
| Fine-tuned from | StrandsAgents/strands-decider-2B-qwen3.5-v1-2610 |
| Language | Korean and English clinical shorthand (mixed) |
| License | Apache 2.0 |
| Architecture | 20 decoder layers (Gated DeltaNet + full attention), 1.65B parameters (the size widget counts packed int4 bytes, so it shows ~0.8B) |
| Weights | int4, group size 128, 0.9 GB on disk (3.8 GB before compression) |
Uses
Intended use. Research on calibrated, option-scoring models for short clinical text: intent detection under negation and conditions (refused, considered, deferred, already done), slot filling from habit notes, and patient-aware selection.
Out of scope. Real patient data or clinical decisions; free-text generation; chart formats and languages outside the synthetic Korean outpatient format it was trained on.
Risks and limitations
- Synthetic data only. Real chart language, abbreviations and edge cases will differ.
- Generator bias. Accuracy on held-out rows from the training generator is far higher than on text written independently (see Evaluation).
- Negation scope remains the hardest case (
considered,other hospital,already done: 62–76% after training, on small held-out slices of 19–42 rows). - Probabilities are calibrated on synthetic validation data; recalibrate before using a confidence threshold on other data.
How to get started
The weights are stored as packed int4. load_tabchart.py (in this repo) unpacks them to bf16 for the Strands Decider server.
pip install torch==2.7.1 transformers==5.17.0 peft==0.21.0 safetensors huggingface_hub
git clone https://github.com/strands-labs/strands-decider && pip install -e strands-decider
python load_tabchart.py carlclausewitz/strands-decider-clinical-use ./decider
strands-decider serve ./decider/ckpt --port 8000
Requests follow the Strands Decider format (state text + questions + options). A GPU or an Apple-silicon machine with 16 GB+ memory is recommended.
Training details
Training data
Synthetic Korean outpatient data:
- Plan lines written by five LLM writers that saw only a label specification (no test data): Korean-style lines, English-heavy lines, minimal pairs, keyword-free lines, and chart notes / habit-note templates. About 1,500 annotated lines, split by text into training and validation (no shared line, even with numbers changed).
- Synthetic world: randomized virtual doctors (facility, frequency, duration, handout, follow-up interval, condition → department habits) and patients (diagnoses, eGFR, anticoagulants, NSAID allergy, red flags).
- Rows: one (state, question, gold option). Rows whose gold answer is ambiguous under the label specification are not created.
- Audited twice by an independent LLM auditor; generator errors found in the first audit were fixed before training.
- 56,725 training rows, 9,871 validation rows (160 training doctors, 30 separate validation doctors).
Training procedure
| Hyperparameter | Value |
|---|---|
| LoRA | rank 48, alpha 96, dropout 0.05; attention, MLP and Gated DeltaNet projections |
| Trainable parameters | 53.6M / 1.94B (2.77%) |
| Epochs · steps · batch | 2 · 3,544 · 32 |
| Learning rate | LoRA 1e-4, head 3e-4, warmup 3%, weight decay 0.01 |
| Regularization | KL to the frozen base decider (weight 0.3), option shuffling |
| Calibration | temperature scaling (ECE 0.182 → 0.015) |
Validation loss fell from 0.213 (step 800) to 0.151 and stayed flat; KL to the base model stayed near 0.4 (0.35–0.45) without drifting.
Compression
- Merge the LoRA adapter into the base weights.
- Prune layers 9, 13, 18, 20: the least important linear-attention layer in each block, by single-layer skip accuracy (the first block and all full-attention layers were kept). Healing distillation was tested and not kept: it recovered row accuracy but added one wrong suggestion on the dev set.
- Quantize all linear layers and the tied embedding/lm_head to symmetric int4, group size 128.
Evaluation
Held-out validation rows (unseen lines, unseen doctors):
| Question | Base decider | After LoRA (bf16) |
|---|---|---|
| Past-plan selection | 21.8% | 85.2% |
| Which habit note applies | 45.9% | 95.4% |
| Is it a follow-up? | 48.4% | 98.7% |
| Is an action committed now? | 61.2% | 95.9% |
| All rows (9,871) | 70.1% | 97.6% |
Compression (3,430-row validation subset):
| Model | Layers | Accuracy | Acc. when conf ≥ 0.9 | ECE |
|---|---|---|---|---|
| LoRA, bf16 | 24 | 96.8% | 97.1% | 0.024 |
| + 4 layers removed | 20 | 96.3% | 97.2% | 0.021 |
| + int4 g128 (this model) | 20 | 96.1% | 97.2% | 0.022 |
| int4 per-channel (not used) | 24 | 95.0% | 95.6% | 0.041 |
| int3 g128 (not used) | 24 | 81.3% | 89.8% | 0.113 |
On 144 independently written cases scored in a full autocomplete pipeline (rule parser + this model + confidence threshold), accuracy rose from 79.2% (base) to 88.2% (LoRA), and the compressed model matched the uncompressed LoRA exactly (127/144, 11 wrong, 6 missed).
Speed: median 0.077 s per request of 9–11 questions on an RTX PRO 6000 (0.152 s for the unmerged LoRA). int4 is a storage format here; weights are unpacked to bf16 at load time.
Compute
NVIDIA Brev cloud GPUs (RTX PRO 6000, L4): about 7.7 GPU-hours for training, compression and evaluation (≈ US$20).
Citation
@misc{park2026decider,
title = {Strands Decider 2B for Korean Clinical Plan Lines: LoRA, Pruning and int4 Quantization},
author = {Park, William},
year = {2026},
howpublished = {\url{https://huggingface.co/carlclausewitz/strands-decider-clinical-use}}
}
Contact
William Park — open a discussion in the Community tab.
- Downloads last month
- 48
Model tree for carlclausewitz/strands-decider-clinical-use
Base model
Qwen/Qwen3.5-2B-Base