Instructions to use bjbjbj/classifier-chapter4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bjbjbj/classifier-chapter4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="bjbjbj/classifier-chapter4")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("bjbjbj/classifier-chapter4") model = AutoModelForSequenceClassification.from_pretrained("bjbjbj/classifier-chapter4", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Training in progress, step 500
Browse files- README.md +11 -11
- config.json +17 -15
- model.safetensors +2 -2
- training_args.bin +2 -2
README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
license: apache-2.0
|
| 4 |
-
base_model:
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
| 7 |
metrics:
|
|
@@ -17,11 +17,11 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 17 |
|
| 18 |
# classifier-chapter4
|
| 19 |
|
| 20 |
-
This model is a fine-tuned version of [
|
| 21 |
It achieves the following results on the evaluation set:
|
| 22 |
-
- Loss: 0.
|
| 23 |
-
- Accuracy: 0.
|
| 24 |
-
- F1: 0.
|
| 25 |
|
| 26 |
## Model description
|
| 27 |
|
|
@@ -44,7 +44,7 @@ The following hyperparameters were used during training:
|
|
| 44 |
- train_batch_size: 32
|
| 45 |
- eval_batch_size: 32
|
| 46 |
- seed: 42
|
| 47 |
-
- optimizer:
|
| 48 |
- lr_scheduler_type: linear
|
| 49 |
- num_epochs: 2
|
| 50 |
|
|
@@ -52,13 +52,13 @@ The following hyperparameters were used during training:
|
|
| 52 |
|
| 53 |
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 |
|
| 54 |
|:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|
|
| 55 |
-
| No log | 1.0 | 313 | 0.
|
| 56 |
-
| 0.
|
| 57 |
|
| 58 |
|
| 59 |
### Framework versions
|
| 60 |
|
| 61 |
-
- Transformers 4.
|
| 62 |
- Pytorch 2.5.1
|
| 63 |
-
- Datasets
|
| 64 |
-
- Tokenizers 0.20.
|
|
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
license: apache-2.0
|
| 4 |
+
base_model: bert-base-uncased
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
| 7 |
metrics:
|
|
|
|
| 17 |
|
| 18 |
# classifier-chapter4
|
| 19 |
|
| 20 |
+
This model is a fine-tuned version of [bert-base-uncased](https://huggingface.co/bert-base-uncased) on an unknown dataset.
|
| 21 |
It achieves the following results on the evaluation set:
|
| 22 |
+
- Loss: 0.2447
|
| 23 |
+
- Accuracy: 0.9225
|
| 24 |
+
- F1: 0.9225
|
| 25 |
|
| 26 |
## Model description
|
| 27 |
|
|
|
|
| 44 |
- train_batch_size: 32
|
| 45 |
- eval_batch_size: 32
|
| 46 |
- seed: 42
|
| 47 |
+
- optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 48 |
- lr_scheduler_type: linear
|
| 49 |
- num_epochs: 2
|
| 50 |
|
|
|
|
| 52 |
|
| 53 |
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 |
|
| 54 |
|:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|
|
| 55 |
+
| No log | 1.0 | 313 | 0.2626 | 0.9104 | 0.9101 |
|
| 56 |
+
| 0.2954 | 2.0 | 626 | 0.2447 | 0.9225 | 0.9225 |
|
| 57 |
|
| 58 |
|
| 59 |
### Framework versions
|
| 60 |
|
| 61 |
+
- Transformers 4.46.3
|
| 62 |
- Pytorch 2.5.1
|
| 63 |
+
- Datasets 2.16.1
|
| 64 |
+
- Tokenizers 0.20.3
|
config.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "
|
| 3 |
-
"activation": "gelu",
|
| 4 |
"architectures": [
|
| 5 |
-
"
|
| 6 |
],
|
| 7 |
-
"
|
| 8 |
-
"
|
| 9 |
-
"
|
| 10 |
-
"
|
|
|
|
|
|
|
| 11 |
"id2label": {
|
| 12 |
"0": "LABEL_0",
|
| 13 |
"1": "LABEL_1",
|
|
@@ -15,23 +16,24 @@
|
|
| 15 |
"3": "LABEL_3"
|
| 16 |
},
|
| 17 |
"initializer_range": 0.02,
|
|
|
|
| 18 |
"label2id": {
|
| 19 |
"LABEL_0": 0,
|
| 20 |
"LABEL_1": 1,
|
| 21 |
"LABEL_2": 2,
|
| 22 |
"LABEL_3": 3
|
| 23 |
},
|
|
|
|
| 24 |
"max_position_embeddings": 512,
|
| 25 |
-
"model_type": "
|
| 26 |
-
"
|
| 27 |
-
"
|
| 28 |
"pad_token_id": 0,
|
|
|
|
| 29 |
"problem_type": "single_label_classification",
|
| 30 |
-
"qa_dropout": 0.1,
|
| 31 |
-
"seq_classif_dropout": 0.2,
|
| 32 |
-
"sinusoidal_pos_embds": false,
|
| 33 |
-
"tie_weights_": true,
|
| 34 |
"torch_dtype": "float32",
|
| 35 |
-
"transformers_version": "4.
|
|
|
|
|
|
|
| 36 |
"vocab_size": 30522
|
| 37 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "bert-base-uncased",
|
|
|
|
| 3 |
"architectures": [
|
| 4 |
+
"BertForSequenceClassification"
|
| 5 |
],
|
| 6 |
+
"attention_probs_dropout_prob": 0.1,
|
| 7 |
+
"classifier_dropout": null,
|
| 8 |
+
"gradient_checkpointing": false,
|
| 9 |
+
"hidden_act": "gelu",
|
| 10 |
+
"hidden_dropout_prob": 0.1,
|
| 11 |
+
"hidden_size": 768,
|
| 12 |
"id2label": {
|
| 13 |
"0": "LABEL_0",
|
| 14 |
"1": "LABEL_1",
|
|
|
|
| 16 |
"3": "LABEL_3"
|
| 17 |
},
|
| 18 |
"initializer_range": 0.02,
|
| 19 |
+
"intermediate_size": 3072,
|
| 20 |
"label2id": {
|
| 21 |
"LABEL_0": 0,
|
| 22 |
"LABEL_1": 1,
|
| 23 |
"LABEL_2": 2,
|
| 24 |
"LABEL_3": 3
|
| 25 |
},
|
| 26 |
+
"layer_norm_eps": 1e-12,
|
| 27 |
"max_position_embeddings": 512,
|
| 28 |
+
"model_type": "bert",
|
| 29 |
+
"num_attention_heads": 12,
|
| 30 |
+
"num_hidden_layers": 12,
|
| 31 |
"pad_token_id": 0,
|
| 32 |
+
"position_embedding_type": "absolute",
|
| 33 |
"problem_type": "single_label_classification",
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
"torch_dtype": "float32",
|
| 35 |
+
"transformers_version": "4.46.3",
|
| 36 |
+
"type_vocab_size": 2,
|
| 37 |
+
"use_cache": true,
|
| 38 |
"vocab_size": 30522
|
| 39 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:648d3d413f8960ecae1305ff9f15645fcff59bffcdb52c1e892e841510fdce22
|
| 3 |
+
size 437964800
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c9921f1079952a1d87d142b0cca9514d05e25f99001c65ba1c243ea851eee9e1
|
| 3 |
+
size 5240
|