leondz/wnut_17
Updated • 3.96k • 19
How to use ashaduzzaman/wnut-distilbert-finetuned with Adapters:
from adapters import AutoAdapterModel
model = AutoAdapterModel.from_pretrained("undefined")
model.load_adapter("ashaduzzaman/wnut-distilbert-finetuned", set_active=True)This model is a fine-tuned version of distilbert/distilbert-base-uncased on the WNUT 2017 dataset for Named Entity Recognition (NER).
The wnut-distilbert-finetuned model is designed for token classification tasks, specifically for Named Entity Recognition (NER). It leverages the DistilBERT architecture, which is a smaller, faster version of BERT with reduced computational requirements, while maintaining competitive performance.
To use this model, you can load it using the Hugging Face Transformers library. Below is an example of how to perform inference using the model:
from transformers import AutoTokenizer, AutoModelForTokenClassification
from transformers import pipeline
# Load the tokenizer and model
tokenizer = AutoTokenizer.from_pretrained("Ashaduzzaman/wnut-distilbert-finetuned")
model = AutoModelForTokenClassification.from_pretrained("Ashaduzzaman/bert-finetuned-ner")
# Create a pipeline for NER
ner_pipeline = pipeline("ner", model=model, tokenizer=tokenizer)
# Example inference
text = "Hugging Face Inc. is based in New York City."
entities = ner_pipeline(text)
print(entities)
| Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 | Accuracy |
|---|---|---|---|---|---|---|---|
| No log | 1.0 | 213 | 0.2751 | 0.5114 | 0.2289 | 0.3163 | 0.9385 |
| No log | 2.0 | 426 | 0.2627 | 0.5398 | 0.3327 | 0.4117 | 0.9434 |
| 0.1832 | 3.0 | 639 | 0.2704 | 0.5336 | 0.3383 | 0.4141 | 0.9444 |
Base model
distilbert/distilbert-base-uncased