Open release · Apache-2.0
When a nurse says 皮蛇, she means shingles. L-CT on a screening roster is a low-dose lung CT, not a head scan. 鈣化 on a checkup order is asking for a coronary artery calcium score. 傷寒 usually means the stool specimen hasn't come back yet, not that anyone has typhoid. This appears in Taiwanese records every day, and the general-purpose models we tried read almost none of it. So we trained one ourselves, called it IlhaEmbed, and put it on Hugging Face under Apache-2.0. It is 38.5 MB, runs on a CPU, and makes no network call while running — the aging PC at a nursing station can handle it.
Why we built this
For eight years we have done the same thing in checkup centers, corporate workplaces, and community stations: turn somebody else's files into a health record you can use. What do those files look like? One cell reads 定期心內門診-戒菸, which is two facts: cardiology follow-up is ongoing, and the person is quitting smoking. 成健 is an adult preventive-care checkup. 檳榔 (betel-nut chewing) sits in the social-history column next to tobacco and alcohol.
These are not typos. This is how Taiwan's clinical frontline actually writes. It fills the records generated every day, and it is almost absent from public training data. So an off-the-shelf model cannot read it.
If a model can't read this, every cell is left to a person to judge. And when a person moves cells one by one, a mistake goes unnoticed — the wrong cell quietly becomes a medical record.
Why not use something off the shelf
Training your own model takes a long time; it was not our first choice. We benchmarked the best available Chinese embedding models first, found three problems, and only then decided to raise our own.
Same task, same retrieval pool, same scoring: general Chinese models land between 0.11 and 0.21; ours is at 0.856. On a task like 皮蛇→帶狀皰疹, the general models score 0.00 to 0.05, which is nothing at all.
Most of the strong open Chinese-language models come from the PRC. Taiwan's public hospitals fall under critical-infrastructure security rules, and procurement checks where a model came from — pass or fail, nothing in between. Our base model is IBM Granite ModernBERT (Apache-2.0, US-origin) so that the provenance can be laid out and checked.
One candidate used nearly 8 GB of memory in our tests. The alternative to running on-premise is sending medical records to the cloud, and we don't take that road. There was one condition: on-premise, CPU, no network. What we ended up with is 38.5 MB, 384 dimensions, quantized to int8.
Accuracy on one shared task (held out from training, self-matches excluded)
| Task | IlhaEmbed | jina-v2-base-zh | ckip-base | bge-small-zh |
|---|---|---|---|---|
| slang (皮蛇→shingles) | 0.855 | 0.05 | 0.00 | 0.00 |
| abbreviation (L-CT→low-dose chest CT) | 0.817 | 0.14 | 0.01 | 0.00 |
| apposition (傷寒→typhoid stool specimen) | 0.895 | 0.45 | 0.36 | 0.33 |
| overall | 0.856 | 0.21 | 0.13 | 0.11 |
| Taigi (斷腦筋→stroke) | 0.943 | 0.64 | 0.56 | 0.50 |
The IlhaEmbed column is the fp32 path. The int8 build we actually published scores 0.815 overall and 0.929 on Taigi. The evaluation script ships with the model card, so you can run it yourself.
About sovereign AI
For a sentence spoken in Taigi to become an auditable record, three things have to happen: understand it, map the wording back to standard concepts, and store it in the national data standard. All three exist in Taiwan now. The middle one is the part we filled in.
Breeze-ASR-26
Hear — MediaTek Research's speech model, which understands Taigi and Taiwanese accents
IlhaEmbed
Understand — the model on this page, mapping frontline writing back to standard concepts
TW Core FHIR
Store — Taiwan MOHW's health-data standard, so records can be exchanged and audited
The base model is IBM Granite ModernBERT (Apache-2.0, US-origin), and nothing on this road is PRC-origin. For institutions under critical-infrastructure rules, that decides whether they can use it at all.
38.5 MB, int8, CPU only. No GPU, no API key, no network call while running. Patient data does not have to leave the institution's server room.
The weights are Apache-2.0, and so is the base model. Anyone — including companies doing what we do — can download it, change it, and ship it in their own product without asking us.
We connect to Taiwan MOHW's TW Core FHIR. A standard is a public good; it is only worth something if people connect to it.
As far as we know, this is the first openly released embedding model for Taiwanese clinical text. We hope it isn't the last.
The failures are public too
To make a model recognize one institution's own abbreviations, the intuitive move is to fine-tune on them. Having measured it, our conclusion is that this road does not work — and you can calculate why.
Quantizing a small model to int8 perturbs every vector by a fixed amount; we measured 0.44. Picking the right one out of a pile of institutional abbreviations, meanwhile, turns on a median gap of 0.14 between first and second place. The model is choosing inside its own error. Fine-tuning the abbreviations into the weights only narrows that gap while the error stays where it was, so the more you tune, the worse it gets. We tried 18 configurations (per-tensor and per-channel int8, fp16, mixed precision, weight interpolation, QAT, a LoRA adapter with quantization constraints, and more). At a size we could deploy, not one of them caught up with full precision.
What works is putting that knowledge somewhere else. Freeze the model completely, keep the institution's vocabulary outside it in a lookup of a few kilobytes, and put a gate in front: close enough to a known entry, and the fragment is replaced by that entry's standard concept; not close enough, and it passes through exactly as before. Which is why adding the lookup cannot break anything the model already got right.
We wrote the lesson down as one sentence: before you quantize, measure whether your decisions have more room than the quantization has error. If they don't, nothing you do to the weights will save them. That sentence and every dead end are in the public research log.
The same published int8 model, with and without the lookup (110 real institutional abbreviations)
| Model alone | With the lookup | |
|---|---|---|
| institutional abbreviations (110) | 83 / 110 | 110 / 110 |
| variants not in the lookup | — | 20 / 22 |
| score on general clinical tasks | 0.815 | 0.815 (unchanged) |
| size | 38.5 MB | 38.5 MB + a few KB |
Not a demo
IlhaEmbed has replaced the general-purpose model we used before. It is baked into the system image and runs in the customer's own environment, working out what a column in an incoming file actually contains.
The order is deliberate: deterministic code resolves the large majority of columns first, what's left goes to the model, and it is asked in one batch rather than once per column. Only the few columns nobody can resolve get put in front of a person. Once a person confirms one, it is remembered — the next file in the same format doesn't even need the model.
0.856
overall on clinical semantics; best general Chinese model: 0.21
38.5 MB
int8 ONNX, 384 dimensions, runs on a CPU
110 / 110
institutional abbreviations recognized, with the lookup
Apache-2.0
weights, method, eval scripts, and research log all public
To read one line of a Taiwanese medical record, we raised our own model.
Journalists, researchers, and competitors can take it directly: the weights, the full model card, evaluation scripts you can run yourself, and the research log with the failures in it. The raw training pairs carry third-party copyright and are not redistributed; what we put out is the trained weights and the method.
Citation
IlhaEmbed: An Open Embedding Model for Taiwanese Clinical Text. WeeMed AI, 2026. https://huggingface.co/weemed/IlhaEmbed