You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Named Entity Resolution with dslim/distilbert-NER
2
+
3
+
I was exploring the original BERT model from 2018, which is mainly useful if you fine-tune a model on top of it for a specific task.
4
+
5
+
[dslim/distilbert-NER](https://huggingface.co/dslim/distilbert-NER) by David S. Lim is a popular implementation of this, with around 20,000 downloads from Hugging Face every month.
6
+
7
+
I tried the demo from the README but it didn't quite work - it complained about an incompatibility with Numpy 2.0.
8
+
9
+
So I used `uv run --with 'numpy<2.0'` to run it in a temporary virtual environment. Here's a Bash one-liner that demonstrated the model:
10
+
11
+
```bash
12
+
uv run --with 'numpy<2.0' --with transformers python -c '
13
+
from transformers import AutoTokenizer, AutoModelForTokenClassification
14
+
from transformers import pipeline
15
+
import json
16
+
model = AutoModelForTokenClassification.from_pretrained("dslim/distilbert-NER")
0 commit comments