NoHaxRelax commited on
Commit
de8c584
·
verified ·
1 Parent(s): a72b97e

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +63 -0
README.md ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ - nl
6
+ - da
7
+ - es
8
+ - fr
9
+ tags:
10
+ - text2text-generation
11
+ - icd
12
+ - historical-demography
13
+ - digital-humanities
14
+ pipeline_tag: text2text-generation
15
+ base_model: google/flan-t5-base
16
+ ---
17
+
18
+ # codLLM base (deployment checkpoint)
19
+
20
+ Fine-tuned FLAN-T5-base that assigns **ICD-10h** codes to free-text causes of
21
+ death from historical death registers (roughly 1850-1939), across Dutch, Danish,
22
+ Spanish, French, English and Latin phrasings with archaic spellings.
23
+
24
+ ## Input format matters, a lot
25
+
26
+ The model is highly sensitive to its input shape. Two formats were trained:
27
+
28
+ | format | example |
29
+ |---|---|
30
+ | `cod` | `tabes meseraica` |
31
+ | `cod_age_sex` | `cod: stuipen \| age: unknown \| sex: male` |
32
+
33
+ Rules that are easy to get wrong:
34
+
35
+ * **cod-only is a bare string** with no `cod: ` prefix.
36
+ * **cod_age_sex always emits all three fields**, using the literal string
37
+ `unknown` when a value is missing or unmappable. Omitting a field produces a
38
+ shape the model never saw in training.
39
+
40
+ Which format performs better is **source dependent**. On held-out sources scored
41
+ by leave-one-source-out checkpoints, exact match ranged from 0.043 to 0.593 on
42
+ the same records purely by changing the format. Measure on your own data rather
43
+ than assuming a default.
44
+
45
+ ## Output
46
+
47
+ Comma-separated ICD-10h codes; the task is multi-label. Pair the model with the
48
+ included `ICD10h_Masterlist_2024.tsv` for code descriptions.
49
+
50
+ ## Uncertainty
51
+
52
+ Mean token entropy over the generated sequence is a usable abstention signal.
53
+ The reference operating point is `0.127`, chosen for roughly 80% coverage on an
54
+ unseen-string slice. Entropy correlates with output length, so it is a better
55
+ ranking signal than an absolute per-record probability.
56
+
57
+ ## Limitations
58
+
59
+ * Sub-code granularity may follow a different archive's coding convention than
60
+ yours; the broader category is often right where the sub-code differs.
61
+ * On cause strings never seen in training, accuracy drops substantially.
62
+ * Confident wrong codes occur, particularly for convention mismatches, so a
63
+ low-entropy prediction is not a guarantee of correctness.