Mozilla/smart_ner_dataset
Viewer • Updated • 450k • 20 • 1
How to use Mozilla/distilbert-uncased-NER-LoRA with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("token-classification", model="Mozilla/distilbert-uncased-NER-LoRA") # Load model directly
from transformers import AutoTokenizer, AutoModelForTokenClassification
tokenizer = AutoTokenizer.from_pretrained("Mozilla/distilbert-uncased-NER-LoRA")
model = AutoModelForTokenClassification.from_pretrained("Mozilla/distilbert-uncased-NER-LoRA")This is a fine-tuned LoRA token classifier on distilbert, designed for NER on multiple categories PERSON, ORG, CITY, STATE, CITY_STATE.
This model is based on distilbert/distilbert-base-uncased and fine-tuned using LoRA for token classification. The fine-tuning process adapts the model to predict tokens across 10 categories:
"O" # Outside any named entity
"B-PER" # Beginning of a person entity
"I-PER" # Inside a person entity
"B-ORG" # Beginning of an organization entity
"I-ORG" # Inside an organization entity
"B-CITY" # Beginning of a city entity
"I-CITY" # Inside a city entity
"B-STATE" # Beginning of a state entity
"I-STATE" # Inside a state entity
"B-CITYSTATE" # Beginning of a city_state entity
"I-CITYSTATE" # Inside a city_state entity
en)If you use this model, please cite it as:
@misc{mozilla_distilbert_lora_ner,
title = {Fine-tuned LoRA Token Classifier on DistilBERT},
author = {Mozilla},
year = {2024},
url = {https://huggingface.co/Mozilla/distilbert-finetuned-LoRA-token-classifier},
license = {Apache-2.0}
}
Base model
distilbert/distilbert-base-uncased