Instructions to use token-classifier/roBERTa-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use token-classifier/roBERTa-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="token-classifier/roBERTa-v2")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("token-classifier/roBERTa-v2") model = AutoModelForTokenClassification.from_pretrained("token-classifier/roBERTa-v2") - Notebooks
- Google Colab
- Kaggle
| license: mit | |
| base_model: roberta-large | |
| tags: | |
| - generated_from_trainer | |
| datasets: | |
| - generator | |
| metrics: | |
| - precision | |
| - recall | |
| - f1 | |
| - accuracy | |
| model-index: | |
| - name: model | |
| results: | |
| - task: | |
| name: Token Classification | |
| type: token-classification | |
| dataset: | |
| name: generator | |
| type: generator | |
| config: default | |
| split: train | |
| args: default | |
| metrics: | |
| - name: Precision | |
| type: precision | |
| value: 0.5931758530183727 | |
| - name: Recall | |
| type: recall | |
| value: 0.7371167645140247 | |
| - name: F1 | |
| type: f1 | |
| value: 0.6573589296102385 | |
| - name: Accuracy | |
| type: accuracy | |
| value: 0.896675559203776 | |
| <!-- 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. --> | |
| # model | |
| This model is a fine-tuned version of [roberta-large](https://huggingface.co/roberta-large) on the generator dataset. | |
| It achieves the following results on the evaluation set: | |
| - Loss: 0.5350 | |
| - Precision: 0.5932 | |
| - Recall: 0.7371 | |
| - F1: 0.6574 | |
| - Accuracy: 0.8967 | |
| ## 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: 1e-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 | |
| - training_steps: 1000 | |
| ### Training results | |
| | Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 | Accuracy | | |
| |:-------------:|:-----:|:----:|:---------------:|:---------:|:------:|:------:|:--------:| | |
| | No log | 0.47 | 466 | 0.5513 | 0.5389 | 0.7358 | 0.6222 | 0.8787 | | |
| | 0.4041 | 1.47 | 932 | 0.5179 | 0.5398 | 0.7613 | 0.6317 | 0.8797 | | |
| | 0.3968 | 2.07 | 1000 | 0.5350 | 0.5932 | 0.7371 | 0.6574 | 0.8967 | | |
| ### Framework versions | |
| - Transformers 4.33.2 | |
| - Pytorch 2.0.1+cu118 | |
| - Datasets 2.14.5 | |
| - Tokenizers 0.13.3 | |