Sentence Similarity
sentence-transformers
ONNX
Safetensors
Chinese
modernbert
embeddings
clinical
healthcare
traditional-chinese
taiwan
medical
fhir
on-premise
text-embeddings-inference
Instructions to use weemed/IlhaEmbed with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use weemed/IlhaEmbed with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("weemed/IlhaEmbed") sentences = [ "那是 個快樂的人", "那是 條快樂的狗", "那是 個非常幸福的人", "今天是晴天" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
docs: definitive eval numbers (semantic macro 0.86); reframe taigi as a transliteration diagnostic (not a self-match bug), excluded from the macro with reason
Browse files
README.md
CHANGED
|
@@ -47,25 +47,24 @@ In a clinical pipeline built in Taiwan, it handles the "understanding" step: Bre
|
|
| 47 |
|
| 48 |
## Results
|
| 49 |
|
| 50 |
-
Task: jargon top-1. Given a Taiwanese clinical surface term, retrieve its standard concept from a shared pool, self-matches excluded, held out from training. The score
|
| 51 |
|
| 52 |
-
| Model | On-prem | slang | abbrev | apposition |
|
| 53 |
|---|---|---|---|---|---|
|
| 54 |
-
| **IlhaEmbed** | yes, 37 MB CPU | **0.
|
| 55 |
-
| jina-embeddings-v2-base-zh | no | 0.
|
| 56 |
-
| ckip-base | yes | 0.00 | 0.01 | 0.36 | 0.
|
| 57 |
-
| bge-small-zh | yes | 0.00 | 0.00 | 0.
|
| 58 |
|
| 59 |
On these local terms the general and general-Chinese models mostly return nothing; this model finds the right concept. It is not meant to top general leaderboards such as MTEB. It does one thing, Taiwanese clinical vocabulary, and it is small enough to run on the ward.
|
| 60 |
|
| 61 |
The method is reproducible. The raw evaluation pairs carry third-party copyright and are not redistributed.
|
| 62 |
|
| 63 |
-
|
| 64 |
|
| 65 |
-
- **
|
| 66 |
-
- **PTT (noisy clinical web text):** the source pairs are mislabeled, so the set is not yet a valid benchmark.
|
| 67 |
|
| 68 |
-
|
| 69 |
|
| 70 |
## Usage
|
| 71 |
|
|
@@ -136,25 +135,24 @@ Apache-2.0. Base model: IBM Granite (Apache-2.0). Training-pair sources are list
|
|
| 136 |
|
| 137 |
## 成效
|
| 138 |
|
| 139 |
-
測的是 jargon top-1:給一個台灣臨床的表面詞,從共用概念池裡找出對應的標準概念,排除自我匹配,且留作測試。
|
| 140 |
|
| 141 |
-
| 模型 | 在地端 | slang | abbrev | apposition |
|
| 142 |
|---|---|---|---|---|---|
|
| 143 |
-
| **IlhaEmbed** | 是,37 MB CPU | **0.
|
| 144 |
-
| jina-embeddings-v2-base-zh | 否 | 0.
|
| 145 |
-
| ckip-base | 是 | 0.00 | 0.01 | 0.36 | 0.
|
| 146 |
-
| bge-small-zh | 是 | 0.00 | 0.00 | 0.
|
| 147 |
|
| 148 |
在這些在地詞彙上,通用模型和一般中文模型多半讀不出來,這個模型能對到正確概念。它不是要在通用排行榜(MTEB)上比高下,只把台灣臨床詞彙這一件事做好,而且小到能在病房的機器上跑。
|
| 149 |
|
| 150 |
這套方法可以重現。原始的評估配對有第三方著作權,不隨模型散佈。
|
| 151 |
|
| 152 |
-
|
| 153 |
|
| 154 |
-
|
| 155 |
-
- **PTT(含雜訊的臨床網路文字):** 來源配對本身標錯,這個集還不是有效的 benchmark。
|
| 156 |
|
| 157 |
-
|
| 158 |
|
| 159 |
## 用法
|
| 160 |
|
|
|
|
| 47 |
|
| 48 |
## Results
|
| 49 |
|
| 50 |
+
Task: jargon top-1. Given a Taiwanese clinical surface term, retrieve its standard concept from a shared pool, self-matches excluded, held out from training. The score is macro-averaged over three semantic registers — slang, abbreviation, and apposition — where each surface form maps to a standard Han concept (斷腦筋→中風, Tid→一天三次, URI→上呼吸道感染). All models use the same method and the same pool; numbers are from the reproducible `card_eval_cpu.py`.
|
| 51 |
|
| 52 |
+
| Model | On-prem | slang | abbrev | apposition | semantic macro |
|
| 53 |
|---|---|---|---|---|---|
|
| 54 |
+
| **IlhaEmbed** | yes, 37 MB CPU | **0.86** | **0.82** | **0.89** | **0.86** |
|
| 55 |
+
| jina-embeddings-v2-base-zh | no | 0.05 | 0.14 | 0.45 | 0.21 |
|
| 56 |
+
| ckip-base | yes | 0.00 | 0.01 | 0.36 | 0.13 |
|
| 57 |
+
| bge-small-zh | yes | 0.00 | 0.00 | 0.33 | 0.11 |
|
| 58 |
|
| 59 |
On these local terms the general and general-Chinese models mostly return nothing; this model finds the right concept. It is not meant to top general leaderboards such as MTEB. It does one thing, Taiwanese clinical vocabulary, and it is small enough to run on the ward.
|
| 60 |
|
| 61 |
The method is reproducible. The raw evaluation pairs carry third-party copyright and are not redistributed.
|
| 62 |
|
| 63 |
+
### On Taigi, and why it is not folded into that number (nothing is hidden)
|
| 64 |
|
| 65 |
+
A fourth set, `taigi_med_lexicon`, maps a Han term to its **Tâi-lô romanization** (中風 → tiong-hong). Every model, including this one, scores ~0.00 on it — and that is correct: mapping a Han term to a romanized spelling is a **transliteration** task, not semantic retrieval. It belongs to a romanization / ASR model, not a meaning embedder, so it is reported as a diagnostic and kept **out of the semantic macro**; averaging a transliteration score into a semantic benchmark would only produce a meaningless number. (An earlier version of this card called the ~0 a "self-match bug" — that was wrong; only 31/779 surfaces collide with the pool and those are already excluded. The ~0 is the task mismatch.)
|
|
|
|
| 66 |
|
| 67 |
+
The embedder's **Taigi clinical capability is already in the numbers above**: the `slang` register *is* that capability — Taiwanese clinical colloquialisms (斷腦筋 for stroke, 不辣咖 for a blood culture) mapped to their standard concepts, at 0.86. A dedicated Taigi-colloquial → standard-Han-concept set (Han→Han, semantic) is the natural next benchmark to add.
|
| 68 |
|
| 69 |
## Usage
|
| 70 |
|
|
|
|
| 135 |
|
| 136 |
## 成效
|
| 137 |
|
| 138 |
+
測的是 jargon top-1:給一個台灣臨床的表面詞,從共用概念池裡找出對應的標準概念,排除自我匹配,且留作測試。分數是**三個語意語域**(行話 slang、縮寫 abbrev、同位語 apposition)的平均,每個都是「口��/台語/縮寫的漢字表面詞 → 標準漢字概念」(斷腦筋→中風、Tid→一天三次、URI→上呼吸道感染)。四個模型用同一套方法、同一個池;數字來自可重現的 `card_eval_cpu.py`。
|
| 139 |
|
| 140 |
+
| 模型 | 在地端 | slang | abbrev | apposition | 語意 macro |
|
| 141 |
|---|---|---|---|---|---|
|
| 142 |
+
| **IlhaEmbed** | 是,37 MB CPU | **0.86** | **0.82** | **0.89** | **0.86** |
|
| 143 |
+
| jina-embeddings-v2-base-zh | 否 | 0.05 | 0.14 | 0.45 | 0.21 |
|
| 144 |
+
| ckip-base | 是 | 0.00 | 0.01 | 0.36 | 0.13 |
|
| 145 |
+
| bge-small-zh | 是 | 0.00 | 0.00 | 0.33 | 0.11 |
|
| 146 |
|
| 147 |
在這些在地詞彙上,通用模型和一般中文模型多半讀不出來,這個模型能對到正確概念。它不是要在通用排行榜(MTEB)上比高下,只把台灣臨床詞彙這一件事做好,而且小到能在病房的機器上跑。
|
| 148 |
|
| 149 |
這套方法可以重現。原始的評估配對有第三方著作權,不隨模型散佈。
|
| 150 |
|
| 151 |
+
### 關於台語,以及為什麼它不併進上面那個數字(沒有藏任何東西)
|
| 152 |
|
| 153 |
+
還有第四個集 `taigi_med_lexicon`,它是把漢字詞對到它的**台羅羅馬字**(中風 → tiong-hong)。所有模型(包含這個)在上面都是 ~0.00 —— 而這是**對的**:把漢字對到羅馬拼寫是**音譯**任務、不是語意檢索,那是羅馬字/ASR 模型的工作、不是語意 embedder 的工作。所以它只當診斷用、**不併進語意 macro**;把音譯分數平均進語意 benchmark 只會得到一個沒有意義的數字。(這張 card 之前把那個 ~0 稱作「self-match bug」,那是錯的;只有 31/779 的表面詞會撞到池子、而且早就被排除,~0 是任務錯配。)
|
|
|
|
| 154 |
|
| 155 |
+
這個模型的**台語臨床能力其實就在上面的數字裡**:`slang` 語域正是它 —— 台灣臨床口語(斷腦筋=中風、不辣咖=血液培養)對到標準概念,0.86。之後自然要補的是一個專門的「台語口語 → 標準漢字概念」(漢字→漢字、語意)測試集。
|
| 156 |
|
| 157 |
## 用法
|
| 158 |
|