File size: 2,644 Bytes
d91711a df66bf9 d91711a df66bf9 d91711a 9f828b6 d91711a 9f828b6 d91711a 9f828b6 d91711a 9f828b6 d91711a c004968 d91711a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
---
language: en
license: apache-2.0
tags:
- generated_from_trainer
metrics:
- accuracy
- f1
widget:
- text: The agent on the phone was very helpful and nice to me.
base_model: bert-base-uncased
model-index:
- name: bert-base-uncased-finetuned-surveyclassification
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-base-uncased-finetuned-surveyclassification
This model is a fine-tuned version of [bert-base-uncased](https://huggingface.co./bert-base-uncased) on a custom survey dataset.
It achieves the following results on the evaluation set:
- Loss: 0.2818
- Accuracy: 0.9097
- F1: 0.9097
## Model description
More information needed
#### Limitations and bias
This model is limited by its training dataset of survey results for a particular customer service domain. This may not generalize well for all use cases in different domains.
#### How to use
You can use this model with Transformers *pipeline* for Text Classification.
```python
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
tokenizer = AutoTokenizer.from_pretrained("Jorgeutd/bert-base-uncased-finetuned-surveyclassification")
model = AutoModelForSequenceClassification.from_pretrained("Jorgeutd/bert-base-uncased-finetuned-surveyclassification")
text_classifier = pipeline("text-classification", model=model,tokenizer=tokenizer, device=0)
example = "The agent on the phone was very helpful and nice to me."
results = text_classifier(example)
print(results)
```
## Training and evaluation data
Custom survey dataset.
## Training procedure
SageMaker notebook instance.
### Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 3e-05
- train_batch_size: 16
- eval_batch_size: 16
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 100
- num_epochs: 10
- mixed_precision_training: Native AMP
### Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 |
|:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|
| 0.4136 | 1.0 | 902 | 0.2818 | 0.9097 | 0.9097 |
| 0.2213 | 2.0 | 1804 | 0.2990 | 0.9077 | 0.9077 |
| 0.1548 | 3.0 | 2706 | 0.3507 | 0.9026 | 0.9026 |
| 0.1034 | 4.0 | 3608 | 0.4692 | 0.9011 | 0.9011 |
### Framework versions
- Transformers 4.16.2
- Pytorch 1.8.1+cu111
- Datasets 1.18.3
- Tokenizers 0.11.0
|