Instructions to use SlayerLab/NERGAL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SlayerLab/NERGAL with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="SlayerLab/NERGAL")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("SlayerLab/NERGAL") model = AutoModelForTokenClassification.from_pretrained("SlayerLab/NERGAL", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Add 841-dev naked vs hybrid comparison with GLiNER and GLiNER 2.5
Browse files
README.md
CHANGED
|
@@ -55,17 +55,23 @@ Fresh XLM-R, seven epochs. 133 epoch/threshold combinations. Epoch 5 at 0.95 was
|
|
| 55 |
| 6 | 328 | 20 | 147 | 14 |
|
| 56 |
| 7 | 334 | 16 | 148 | 15 |
|
| 57 |
|
| 58 |
-
##
|
| 59 |
|
| 60 |
-
|
| 61 |
|
| 62 |
-
| System |
|
| 63 |
-
|---|---:|---:|---:|---:|---:|
|
| 64 |
-
| Regex
|
| 65 |
-
|
|
| 66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
|
| 68 |
-
144/169 phone, 179/185 other PII. Exact-span precision 87.50%, recall 88.98%, F1 88.24%.
|
|
|
|
|
|
|
| 69 |
|
| 70 |
## Extra seeds
|
| 71 |
|
|
|
|
| 55 |
| 6 | 328 | 20 | 147 | 14 |
|
| 56 |
| 7 | 334 | 16 | 148 | 15 |
|
| 57 |
|
| 58 |
+
## Compared with other systems
|
| 59 |
|
| 60 |
+
Same 841-dev split, threshold **0.95**. **Naked** is the transformer alone. **∪ regex** is that model unioned with the frozen rules (the NERGAL recipe). Character scores are gold vs masked characters.
|
| 61 |
|
| 62 |
+
| System | Mode | Whole /354 | Residual | False chars | Char P | Char R |
|
| 63 |
+
|---|---|---:|---:|---:|---:|---:|
|
| 64 |
+
| Regex (`scrub_pii`) | rules | 245 | 73 | 133 | 97.36% | 81.01% |
|
| 65 |
+
| GLiNER 2.5-multi zero-shot | naked | 81 | 188 | 970 | 56.98% | 21.22% |
|
| 66 |
+
| GLiNER 2.5-multi zero-shot | ∪ regex | 262 | 63 | 1,103 | 82.36% | 85.02% |
|
| 67 |
+
| Historical GLiNER email12 | naked | 249 | 70 | 10 | 99.81% | 85.39% |
|
| 68 |
+
| Historical GLiNER email12 | ∪ regex | 289 | 51 | 143 | 97.54% | 93.48% |
|
| 69 |
+
| XLM-R epoch 5 | naked | 298 | 42 | 57 | 98.96% | 89.38% |
|
| 70 |
+
| **NERGAL (this snapshot)** | **∪ regex** | **323** | **25** | **133** | **97.76%** | **95.95%** |
|
| 71 |
|
| 72 |
+
Zero-shot [GLiNER 2.5](https://huggingface.co/fastino/gliner2.5-multi-v1) is not competitive here, especially on non-phone PII (7/185 whole vs 160 naked / 179 union for this snapshot). Fine-tuned historical GLiNER is the precise naked baseline (10 false characters) and still trails XLM-R on coverage. NERGAL is XLM-R epoch 5 plus the regex: 144/169 phone, 179/185 other PII. Exact-span precision 87.50%, recall 88.98%, F1 88.24%. The 133 false characters are the glued-email regex error; this seed does not add to that floor.
|
| 73 |
+
|
| 74 |
+
Trained GLiNER, HerBERT-large, and XLM-R-large were also compared on this split (plot above). GLiNER’s 0.50 coverage lead is the precision collapse in that figure; no GLiNER or HerBERT operating point passed the content-preservation gate.
|
| 75 |
|
| 76 |
## Extra seeds
|
| 77 |
|