YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

bert-finetuned-ner-accelerate

This repository contains a BERT model fine-tuned for Named Entity Recognition (NER) using the 🤗 Accelerate library for efficient training and evaluation.


Model Overview

  • Base model: BERT (pretrained)
  • Task: Named Entity Recognition (Token Classification)
  • Fine-tuning framework: Hugging Face Transformers + Accelerate
  • Optimizer: AdamW with learning rate 2e-5
  • Learning rate scheduler: Linear scheduler with no warmup steps
  • Training epochs: 3
  • Batch training with multi-GPU/TPU support via Accelerate

Training Details

  • Optimizer used: AdamW from PyTorch with lr=2e-5.
  • Learning rate scheduler: Linear decay over total training steps.
  • Total training steps: num_train_epochs * len(train_dataloader).
  • Training and evaluation are done inside a loop over epochs with progress bar tracking.

Evaluation Metrics

Epoch Precision Recall F1 Score Accuracy
0 0.9423 0.9239 0.9330 0.9848
1 0.9487 0.9258 0.9371 0.9862
2 0.9487 0.9258 0.9371 0.9862

The metrics are calculated on the evaluation dataset after each epoch.


Usage

Load the model and tokenizer using the Hugging Face transformers library:

from transformers import AutoTokenizer, AutoModelForTokenClassification

model_name = "Ak128umar/bert-finetuned-ner-accelerate"

tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForTokenClassification.from_pretrained(model_name)
Downloads last month
1
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support