Instructions to use mpalaval/bert-ner-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mpalaval/bert-ner-2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="mpalaval/bert-ner-2")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("mpalaval/bert-ner-2") model = AutoModelForTokenClassification.from_pretrained("mpalaval/bert-ner-2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| license: apache-2.0 | |
| base_model: bert-base-cased | |
| tags: | |
| - generated_from_trainer | |
| metrics: | |
| - precision | |
| - recall | |
| - f1 | |
| - accuracy | |
| model-index: | |
| - name: bert-ner-2 | |
| results: [] | |
| <!-- This model card has been generated automatically according to the information the Trainer had access to. You | |
| should probably proofread and complete it, then remove this comment. --> | |
| # bert-ner-2 | |
| This model is a fine-tuned version of [bert-base-cased](https://huggingface.co/bert-base-cased) on the None dataset. | |
| It achieves the following results on the evaluation set: | |
| - Loss: 0.7358 | |
| - Precision: 0.1646 | |
| - Recall: 0.4605 | |
| - F1: 0.2425 | |
| - Accuracy: 0.8784 | |
| ## Model description | |
| More information needed | |
| ## Intended uses & limitations | |
| More information needed | |
| ## Training and evaluation data | |
| More information needed | |
| ## Training procedure | |
| ### Training hyperparameters | |
| The following hyperparameters were used during training: | |
| - learning_rate: 2e-05 | |
| - train_batch_size: 8 | |
| - eval_batch_size: 8 | |
| - seed: 42 | |
| - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 | |
| - lr_scheduler_type: linear | |
| - num_epochs: 10 | |
| ### Training results | |
| | Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 | Accuracy | | |
| |:-------------:|:-----:|:----:|:---------------:|:---------:|:------:|:------:|:--------:| | |
| | No log | 1.0 | 149 | 0.5651 | 0.1347 | 0.4192 | 0.2038 | 0.8686 | | |
| | No log | 2.0 | 298 | 0.5818 | 0.1440 | 0.4227 | 0.2148 | 0.8785 | | |
| | No log | 3.0 | 447 | 0.6011 | 0.1432 | 0.3986 | 0.2107 | 0.8808 | | |
| | 0.0328 | 4.0 | 596 | 0.5546 | 0.1613 | 0.3986 | 0.2297 | 0.8955 | | |
| | 0.0328 | 5.0 | 745 | 0.7685 | 0.1371 | 0.4467 | 0.2098 | 0.8600 | | |
| | 0.0328 | 6.0 | 894 | 0.7755 | 0.1486 | 0.4570 | 0.2243 | 0.8686 | | |
| | 0.0102 | 7.0 | 1043 | 0.6831 | 0.1669 | 0.4570 | 0.2445 | 0.8834 | | |
| | 0.0102 | 8.0 | 1192 | 0.7698 | 0.1524 | 0.4639 | 0.2294 | 0.8715 | | |
| | 0.0102 | 9.0 | 1341 | 0.7303 | 0.1681 | 0.4708 | 0.2477 | 0.8791 | | |
| | 0.0102 | 10.0 | 1490 | 0.7358 | 0.1646 | 0.4605 | 0.2425 | 0.8784 | | |
| ### Framework versions | |
| - Transformers 4.34.1 | |
| - Pytorch 2.1.0+cu118 | |
| - Datasets 2.14.6 | |
| - Tokenizers 0.14.1 | |