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")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("token-classifier/roBERTa-v2") model = AutoModelForTokenClassification.from_pretrained("token-classifier/roBERTa-v2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
2fc11a9
1
Parent(s): 3157ad9
End of training
Browse files
README.md
CHANGED
|
@@ -1,13 +1,40 @@
|
|
| 1 |
---
|
| 2 |
-
license:
|
| 3 |
-
base_model:
|
| 4 |
tags:
|
| 5 |
- generated_from_trainer
|
| 6 |
datasets:
|
| 7 |
- generator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
model-index:
|
| 9 |
- name: model
|
| 10 |
-
results:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
|
@@ -15,18 +42,13 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 15 |
|
| 16 |
# model
|
| 17 |
|
| 18 |
-
This model is a fine-tuned version of [
|
| 19 |
It achieves the following results on the evaluation set:
|
| 20 |
-
-
|
| 21 |
-
-
|
| 22 |
-
-
|
| 23 |
-
-
|
| 24 |
-
-
|
| 25 |
-
- eval_runtime: 31.2775
|
| 26 |
-
- eval_samples_per_second: 21.038
|
| 27 |
-
- eval_steps_per_second: 1.343
|
| 28 |
-
- epoch: 2.23
|
| 29 |
-
- step: 699
|
| 30 |
|
| 31 |
## Model description
|
| 32 |
|
|
@@ -46,16 +68,25 @@ More information needed
|
|
| 46 |
|
| 47 |
The following hyperparameters were used during training:
|
| 48 |
- learning_rate: 1e-05
|
| 49 |
-
- train_batch_size:
|
| 50 |
-
- eval_batch_size:
|
| 51 |
- seed: 42
|
| 52 |
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 53 |
- lr_scheduler_type: linear
|
| 54 |
- training_steps: 1000
|
| 55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
### Framework versions
|
| 57 |
|
| 58 |
- Transformers 4.33.2
|
| 59 |
-
- Pytorch 2.0.1+
|
| 60 |
- Datasets 2.14.5
|
| 61 |
- Tokenizers 0.13.3
|
|
|
|
| 1 |
---
|
| 2 |
+
license: mit
|
| 3 |
+
base_model: roberta-large
|
| 4 |
tags:
|
| 5 |
- generated_from_trainer
|
| 6 |
datasets:
|
| 7 |
- generator
|
| 8 |
+
metrics:
|
| 9 |
+
- precision
|
| 10 |
+
- recall
|
| 11 |
+
- f1
|
| 12 |
+
- accuracy
|
| 13 |
model-index:
|
| 14 |
- name: model
|
| 15 |
+
results:
|
| 16 |
+
- task:
|
| 17 |
+
name: Token Classification
|
| 18 |
+
type: token-classification
|
| 19 |
+
dataset:
|
| 20 |
+
name: generator
|
| 21 |
+
type: generator
|
| 22 |
+
config: default
|
| 23 |
+
split: train
|
| 24 |
+
args: default
|
| 25 |
+
metrics:
|
| 26 |
+
- name: Precision
|
| 27 |
+
type: precision
|
| 28 |
+
value: 0.5931758530183727
|
| 29 |
+
- name: Recall
|
| 30 |
+
type: recall
|
| 31 |
+
value: 0.7371167645140247
|
| 32 |
+
- name: F1
|
| 33 |
+
type: f1
|
| 34 |
+
value: 0.6573589296102385
|
| 35 |
+
- name: Accuracy
|
| 36 |
+
type: accuracy
|
| 37 |
+
value: 0.896675559203776
|
| 38 |
---
|
| 39 |
|
| 40 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
|
|
|
| 42 |
|
| 43 |
# model
|
| 44 |
|
| 45 |
+
This model is a fine-tuned version of [roberta-large](https://huggingface.co/roberta-large) on the generator dataset.
|
| 46 |
It achieves the following results on the evaluation set:
|
| 47 |
+
- Loss: 0.5350
|
| 48 |
+
- Precision: 0.5932
|
| 49 |
+
- Recall: 0.7371
|
| 50 |
+
- F1: 0.6574
|
| 51 |
+
- Accuracy: 0.8967
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
|
| 53 |
## Model description
|
| 54 |
|
|
|
|
| 68 |
|
| 69 |
The following hyperparameters were used during training:
|
| 70 |
- learning_rate: 1e-05
|
| 71 |
+
- train_batch_size: 8
|
| 72 |
+
- eval_batch_size: 8
|
| 73 |
- seed: 42
|
| 74 |
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 75 |
- lr_scheduler_type: linear
|
| 76 |
- training_steps: 1000
|
| 77 |
|
| 78 |
+
### Training results
|
| 79 |
+
|
| 80 |
+
| Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 | Accuracy |
|
| 81 |
+
|:-------------:|:-----:|:----:|:---------------:|:---------:|:------:|:------:|:--------:|
|
| 82 |
+
| No log | 0.47 | 466 | 0.5513 | 0.5389 | 0.7358 | 0.6222 | 0.8787 |
|
| 83 |
+
| 0.4041 | 1.47 | 932 | 0.5179 | 0.5398 | 0.7613 | 0.6317 | 0.8797 |
|
| 84 |
+
| 0.3968 | 2.07 | 1000 | 0.5350 | 0.5932 | 0.7371 | 0.6574 | 0.8967 |
|
| 85 |
+
|
| 86 |
+
|
| 87 |
### Framework versions
|
| 88 |
|
| 89 |
- Transformers 4.33.2
|
| 90 |
+
- Pytorch 2.0.1+cu118
|
| 91 |
- Datasets 2.14.5
|
| 92 |
- Tokenizers 0.13.3
|