Run this model with HF Jobs
Run AlexStamp/bert-finetuned-ner on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/AlexStamp/bert-finetuned-ner. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/AlexStamp/bert-finetuned-ner on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use AlexStamp/bert-finetuned-ner with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AlexStamp/bert-finetuned-ner with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="AlexStamp/bert-finetuned-ner")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("AlexStamp/bert-finetuned-ner") model = AutoModelForTokenClassification.from_pretrained("AlexStamp/bert-finetuned-ner", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update ReadMe.md file with refined information
Browse files3 unmodified lines4567892 unmodified lines12131415161718192021222324251 unmodified line272829303132333435363738394041424344454620 unmodified lines6768693 unmodified linesbase_model: bert-base-casedtags:- generated_from_trainermetrics:- precision- recall2 unmodified linesmodel-index:- name: bert-finetuned-nerresults: []---<!-- This model card has been generated automatically according to the information the Trainer had access to. Youshould probably proofread and complete it, then remove this comment. --># bert-finetuned-nerThis model is a fine-tuned version of [bert-base-cased](https://huggingface.co/bert-base-cased) on an unknown dataset.It achieves the following results on the evaluation set:- Loss: 0.0599- Precision: 0.93191 unmodified line- F1: 0.9412- Accuracy: 0.9867## Model descriptionMore information needed## Intended uses & limitationsMore information needed## Training and evaluation dataMore information needed## Training procedure### Training hyperparametersThe following hyperparameters were used during training:20 unmodified lines- Pytorch 2.11.0+cu128- Datasets 4.0.0- Tokenizers 0.22.23 unmodified lines45678910111213142 unmodified lines1718192021222324252627282930313233341 unmodified line36373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858620 unmodified lines1071081091101111121131141151161171181191201211223 unmodified linesbase_model: bert-base-casedtags:- generated_from_trainer- token-classification- ner- bertdatasets:- eriktks/conll2003metrics:- precision- recall2 unmodified linesmodel-index:- name: bert-finetuned-nerresults: []language:- en---<-- Comments here! --># BERT fine-tuned for Named Entity Recognition (CoNLL-2003)A fine-tuned version of [`bert-base-cased`](https://huggingface.co/bert-base-cased)for Named Entity Recognition (NER), trained on the CoNLL-2003 English dataset as partof working through the [Hugging Face NLP Course](https://huggingface.co/learn/llm-course),Chapter 7.It achieves the following results on the evaluation set:- Loss: 0.0599- Precision: 0.93191 unmodified line- F1: 0.9412- Accuracy: 0.9867## Model details| Attribute | Value ||------------------|-------------------------------|| Base model | `bert-base-cased` || Architecture | Transformer Encoder (BERT) || Task | Token Classification (NER) || Training dataset | CoNLL-2003 (English) || Training epochs | 3 || Learning rate | 2e-5 || Weight decay | 0.01 || Hardware | Google Colab (T4 GPU) |## Entity typesThe model recognises four entity types in IOB2 format:| Label | Description ||--------|---------------|| PER | Person || ORG | Organisation || LOC | Location || MISC | Miscellaneous |## Usage```pythonfrom transformers import pipelinener = pipeline("token-classification",model="AlexStamp/bert-finetuned-ner",aggregation_strategy="simple")ner("Alexis works at CERN in Switzerland.")```## Training procedureFine-tuning was performed using the Hugging Face `Trainer` API with`DataCollatorForTokenClassification` and evaluated using the `seqeval`library, which computes entity-level F1 — stricter than token-level accuracysince the entire entity span must be correctly identified.### Training hyperparametersThe following hyperparameters were used during training:20 unmodified lines- Pytorch 2.11.0+cu128- Datasets 4.0.0- Tokenizers 0.22.2## Limitations- Trained on English news wire text (Reuters corpus); may generalise poorlyto other domains or languages- `bert-base-cased` is case-sensitive by design, which is appropriate for NERbut means casing errors in input text can degrade performance## NotesThis model was trained as a portfolio exercise. The base model choice(`bert-base-cased` over `bert-base-uncased`) is deliberate — NER iscase-sensitive since capitalisation is a strong signal for entity detection.
README.md+63-10