pknayak/bert-news-class
Browse files- README.md +71 -0
- config.json +81 -0
- model.safetensors +3 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +55 -0
- training_args.bin +3 -0
- vocab.txt +0 -0
README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
license: apache-2.0
|
| 4 |
+
base_model: distilbert/distilbert-base-uncased
|
| 5 |
+
tags:
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
metrics:
|
| 8 |
+
- precision
|
| 9 |
+
- recall
|
| 10 |
+
- f1
|
| 11 |
+
- accuracy
|
| 12 |
+
model-index:
|
| 13 |
+
- name: outputs
|
| 14 |
+
results: []
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 18 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 19 |
+
|
| 20 |
+
# outputs
|
| 21 |
+
|
| 22 |
+
This model is a fine-tuned version of [distilbert/distilbert-base-uncased](https://huggingface.co/distilbert/distilbert-base-uncased) on the None dataset.
|
| 23 |
+
It achieves the following results on the evaluation set:
|
| 24 |
+
- Loss: 0.6401
|
| 25 |
+
- Precision: 0.8329
|
| 26 |
+
- Recall: 0.8329
|
| 27 |
+
- F1: 0.8326
|
| 28 |
+
- Accuracy: 0.8329
|
| 29 |
+
|
| 30 |
+
## Model description
|
| 31 |
+
|
| 32 |
+
More information needed
|
| 33 |
+
|
| 34 |
+
## Intended uses & limitations
|
| 35 |
+
|
| 36 |
+
More information needed
|
| 37 |
+
|
| 38 |
+
## Training and evaluation data
|
| 39 |
+
|
| 40 |
+
More information needed
|
| 41 |
+
|
| 42 |
+
## Training procedure
|
| 43 |
+
|
| 44 |
+
### Training hyperparameters
|
| 45 |
+
|
| 46 |
+
The following hyperparameters were used during training:
|
| 47 |
+
- learning_rate: 3e-05
|
| 48 |
+
- train_batch_size: 16
|
| 49 |
+
- eval_batch_size: 32
|
| 50 |
+
- seed: 42
|
| 51 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 52 |
+
- lr_scheduler_type: cosine
|
| 53 |
+
- lr_scheduler_warmup_ratio: 0.1
|
| 54 |
+
- num_epochs: 3
|
| 55 |
+
- mixed_precision_training: Native AMP
|
| 56 |
+
|
| 57 |
+
### Training results
|
| 58 |
+
|
| 59 |
+
| Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 | Accuracy |
|
| 60 |
+
|:-------------:|:-----:|:----:|:---------------:|:---------:|:------:|:------:|:--------:|
|
| 61 |
+
| 0.7876 | 1.0 | 3267 | 0.7410 | 0.8115 | 0.8067 | 0.8065 | 0.8067 |
|
| 62 |
+
| 0.5802 | 2.0 | 6534 | 0.6335 | 0.8323 | 0.8304 | 0.8305 | 0.8304 |
|
| 63 |
+
| 0.408 | 3.0 | 9801 | 0.6401 | 0.8329 | 0.8329 | 0.8326 | 0.8329 |
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
### Framework versions
|
| 67 |
+
|
| 68 |
+
- Transformers 4.45.1
|
| 69 |
+
- Pytorch 2.4.0
|
| 70 |
+
- Datasets 3.0.1
|
| 71 |
+
- Tokenizers 0.20.0
|
config.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "distilbert/distilbert-base-uncased",
|
| 3 |
+
"activation": "gelu",
|
| 4 |
+
"architectures": [
|
| 5 |
+
"DistilBertForSequenceClassification"
|
| 6 |
+
],
|
| 7 |
+
"attention_dropout": 0.1,
|
| 8 |
+
"dim": 768,
|
| 9 |
+
"dropout": 0.1,
|
| 10 |
+
"hidden_dim": 3072,
|
| 11 |
+
"id2label": {
|
| 12 |
+
"0": "academic interests",
|
| 13 |
+
"1": "arts and culture",
|
| 14 |
+
"2": "automotives",
|
| 15 |
+
"3": "books and literature",
|
| 16 |
+
"4": "business and finance",
|
| 17 |
+
"5": "careers",
|
| 18 |
+
"6": "family and relationships",
|
| 19 |
+
"7": "food and drinks",
|
| 20 |
+
"8": "health",
|
| 21 |
+
"9": "healthy living",
|
| 22 |
+
"10": "hobbies and interests",
|
| 23 |
+
"11": "home and garden",
|
| 24 |
+
"12": "movies",
|
| 25 |
+
"13": "music and audio",
|
| 26 |
+
"14": "news and politics",
|
| 27 |
+
"15": "personal finance",
|
| 28 |
+
"16": "pets",
|
| 29 |
+
"17": "pharmaceuticals, conditions, and symptoms",
|
| 30 |
+
"18": "real estate",
|
| 31 |
+
"19": "shopping",
|
| 32 |
+
"20": "sports",
|
| 33 |
+
"21": "style and fashion",
|
| 34 |
+
"22": "technology and computing",
|
| 35 |
+
"23": "television",
|
| 36 |
+
"24": "travel",
|
| 37 |
+
"25": "video gaming"
|
| 38 |
+
},
|
| 39 |
+
"initializer_range": 0.02,
|
| 40 |
+
"label2id": {
|
| 41 |
+
"academic interests": 0,
|
| 42 |
+
"arts and culture": 1,
|
| 43 |
+
"automotives": 2,
|
| 44 |
+
"books and literature": 3,
|
| 45 |
+
"business and finance": 4,
|
| 46 |
+
"careers": 5,
|
| 47 |
+
"family and relationships": 6,
|
| 48 |
+
"food and drinks": 7,
|
| 49 |
+
"health": 8,
|
| 50 |
+
"healthy living": 9,
|
| 51 |
+
"hobbies and interests": 10,
|
| 52 |
+
"home and garden": 11,
|
| 53 |
+
"movies": 12,
|
| 54 |
+
"music and audio": 13,
|
| 55 |
+
"news and politics": 14,
|
| 56 |
+
"personal finance": 15,
|
| 57 |
+
"pets": 16,
|
| 58 |
+
"pharmaceuticals, conditions, and symptoms": 17,
|
| 59 |
+
"real estate": 18,
|
| 60 |
+
"shopping": 19,
|
| 61 |
+
"sports": 20,
|
| 62 |
+
"style and fashion": 21,
|
| 63 |
+
"technology and computing": 22,
|
| 64 |
+
"television": 23,
|
| 65 |
+
"travel": 24,
|
| 66 |
+
"video gaming": 25
|
| 67 |
+
},
|
| 68 |
+
"max_position_embeddings": 512,
|
| 69 |
+
"model_type": "distilbert",
|
| 70 |
+
"n_heads": 12,
|
| 71 |
+
"n_layers": 6,
|
| 72 |
+
"pad_token_id": 0,
|
| 73 |
+
"problem_type": "single_label_classification",
|
| 74 |
+
"qa_dropout": 0.1,
|
| 75 |
+
"seq_classif_dropout": 0.2,
|
| 76 |
+
"sinusoidal_pos_embds": false,
|
| 77 |
+
"tie_weights_": true,
|
| 78 |
+
"torch_dtype": "float32",
|
| 79 |
+
"transformers_version": "4.45.1",
|
| 80 |
+
"vocab_size": 30522
|
| 81 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a9a73a5101c6a889621640d7eb435b0cfb8d38eaa4b486845f4e306188ee125d
|
| 3 |
+
size 267906392
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cls_token": "[CLS]",
|
| 3 |
+
"mask_token": "[MASK]",
|
| 4 |
+
"pad_token": "[PAD]",
|
| 5 |
+
"sep_token": "[SEP]",
|
| 6 |
+
"unk_token": "[UNK]"
|
| 7 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"added_tokens_decoder": {
|
| 3 |
+
"0": {
|
| 4 |
+
"content": "[PAD]",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false,
|
| 9 |
+
"special": true
|
| 10 |
+
},
|
| 11 |
+
"100": {
|
| 12 |
+
"content": "[UNK]",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false,
|
| 17 |
+
"special": true
|
| 18 |
+
},
|
| 19 |
+
"101": {
|
| 20 |
+
"content": "[CLS]",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false,
|
| 25 |
+
"special": true
|
| 26 |
+
},
|
| 27 |
+
"102": {
|
| 28 |
+
"content": "[SEP]",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": false,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false,
|
| 33 |
+
"special": true
|
| 34 |
+
},
|
| 35 |
+
"103": {
|
| 36 |
+
"content": "[MASK]",
|
| 37 |
+
"lstrip": false,
|
| 38 |
+
"normalized": false,
|
| 39 |
+
"rstrip": false,
|
| 40 |
+
"single_word": false,
|
| 41 |
+
"special": true
|
| 42 |
+
}
|
| 43 |
+
},
|
| 44 |
+
"clean_up_tokenization_spaces": false,
|
| 45 |
+
"cls_token": "[CLS]",
|
| 46 |
+
"do_lower_case": true,
|
| 47 |
+
"mask_token": "[MASK]",
|
| 48 |
+
"model_max_length": 512,
|
| 49 |
+
"pad_token": "[PAD]",
|
| 50 |
+
"sep_token": "[SEP]",
|
| 51 |
+
"strip_accents": null,
|
| 52 |
+
"tokenize_chinese_chars": true,
|
| 53 |
+
"tokenizer_class": "DistilBertTokenizer",
|
| 54 |
+
"unk_token": "[UNK]"
|
| 55 |
+
}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dbdf1d45ed000d3d7a21634e1d405db8a6de4cdd1b49408ad4164bd81edd1e80
|
| 3 |
+
size 5176
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|