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
Document synthetic test_nergal.py
Browse files
README.md
CHANGED
|
@@ -98,6 +98,6 @@ nergal = Nergal.from_pretrained(root, local_files_only=True)
|
|
| 98 |
masked, counts = nergal.scrub(text)
|
| 99 |
```
|
| 100 |
|
| 101 |
-
`hybrid.json` records threshold 0.95 and gap ids `250002` / `250003`.
|
| 102 |
|
| 103 |
Base weights: [`FacebookAI/xlm-roberta-large`](https://huggingface.co/FacebookAI/xlm-roberta-large) revision `c23d21b0620b635a76227c604d44e43a9f0ee389` (MIT).
|
|
|
|
| 98 |
masked, counts = nergal.scrub(text)
|
| 99 |
```
|
| 100 |
|
| 101 |
+
`hybrid.json` records threshold 0.95 and gap ids `250002` / `250003`. `test_nergal.py` is synthetic (no corpus text). From this snapshot: `python -m unittest test_nergal`.
|
| 102 |
|
| 103 |
Base weights: [`FacebookAI/xlm-roberta-large`](https://huggingface.co/FacebookAI/xlm-roberta-large) revision `c23d21b0620b635a76227c604d44e43a9f0ee389` (MIT).
|