YOUNG7607/ko-news-classifier
Browse files- README.md +76 -0
- config.json +48 -0
- model.safetensors +3 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +58 -0
- training_args.bin +3 -0
- vocab.txt +0 -0
README.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
language:
|
| 4 |
+
- ko
|
| 5 |
+
license: apache-2.0
|
| 6 |
+
base_model: monologg/koelectra-base-v3-discriminator
|
| 7 |
+
tags:
|
| 8 |
+
- text-classification
|
| 9 |
+
- KoELECTRA
|
| 10 |
+
- Korean-NLP
|
| 11 |
+
- topic-classification
|
| 12 |
+
- news-classification
|
| 13 |
+
- generated_from_trainer
|
| 14 |
+
metrics:
|
| 15 |
+
- accuracy
|
| 16 |
+
- precision
|
| 17 |
+
- recall
|
| 18 |
+
- f1
|
| 19 |
+
model-index:
|
| 20 |
+
- name: ynat-model
|
| 21 |
+
results: []
|
| 22 |
+
---
|
| 23 |
+
|
| 24 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 25 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 26 |
+
|
| 27 |
+
# ynat-model
|
| 28 |
+
|
| 29 |
+
This model is a fine-tuned version of [monologg/koelectra-base-v3-discriminator](https://huggingface.co/monologg/koelectra-base-v3-discriminator) on the klue-ynat dataset.
|
| 30 |
+
It achieves the following results on the evaluation set:
|
| 31 |
+
- Loss: 0.4126
|
| 32 |
+
- Accuracy: 0.8597
|
| 33 |
+
- Precision: 0.8499
|
| 34 |
+
- Recall: 0.8748
|
| 35 |
+
- F1: 0.8614
|
| 36 |
+
|
| 37 |
+
## Model description
|
| 38 |
+
|
| 39 |
+
More information needed
|
| 40 |
+
|
| 41 |
+
## Intended uses & limitations
|
| 42 |
+
|
| 43 |
+
More information needed
|
| 44 |
+
|
| 45 |
+
## Training and evaluation data
|
| 46 |
+
|
| 47 |
+
More information needed
|
| 48 |
+
|
| 49 |
+
## Training procedure
|
| 50 |
+
|
| 51 |
+
### Training hyperparameters
|
| 52 |
+
|
| 53 |
+
The following hyperparameters were used during training:
|
| 54 |
+
- learning_rate: 5e-05
|
| 55 |
+
- train_batch_size: 64
|
| 56 |
+
- eval_batch_size: 64
|
| 57 |
+
- seed: 42
|
| 58 |
+
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 59 |
+
- lr_scheduler_type: linear
|
| 60 |
+
- num_epochs: 3
|
| 61 |
+
|
| 62 |
+
### Training results
|
| 63 |
+
|
| 64 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | F1 |
|
| 65 |
+
|:-------------:|:-----:|:----:|:---------------:|:--------:|:---------:|:------:|:------:|
|
| 66 |
+
| 0.3914 | 1.0 | 714 | 0.4437 | 0.8498 | 0.8320 | 0.8767 | 0.8521 |
|
| 67 |
+
| 0.3064 | 2.0 | 1428 | 0.3937 | 0.8585 | 0.8534 | 0.8667 | 0.8593 |
|
| 68 |
+
| 0.2261 | 3.0 | 2142 | 0.4126 | 0.8597 | 0.8499 | 0.8748 | 0.8614 |
|
| 69 |
+
|
| 70 |
+
|
| 71 |
+
### Framework versions
|
| 72 |
+
|
| 73 |
+
- Transformers 4.52.4
|
| 74 |
+
- Pytorch 2.6.0+cu124
|
| 75 |
+
- Datasets 3.6.0
|
| 76 |
+
- Tokenizers 0.21.1
|
config.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"ElectraForSequenceClassification"
|
| 4 |
+
],
|
| 5 |
+
"attention_probs_dropout_prob": 0.1,
|
| 6 |
+
"classifier_dropout": null,
|
| 7 |
+
"embedding_size": 768,
|
| 8 |
+
"hidden_act": "gelu",
|
| 9 |
+
"hidden_dropout_prob": 0.1,
|
| 10 |
+
"hidden_size": 768,
|
| 11 |
+
"id2label": {
|
| 12 |
+
"0": "IT\uacfc\ud559",
|
| 13 |
+
"1": "\uacbd\uc81c",
|
| 14 |
+
"2": "\uc0ac\ud68c",
|
| 15 |
+
"3": "\uc0dd\ud65c\ubb38\ud654",
|
| 16 |
+
"4": "\uc138\uacc4",
|
| 17 |
+
"5": "\uc2a4\ud3ec\uce20",
|
| 18 |
+
"6": "\uc815\uce58"
|
| 19 |
+
},
|
| 20 |
+
"initializer_range": 0.02,
|
| 21 |
+
"intermediate_size": 3072,
|
| 22 |
+
"label2id": {
|
| 23 |
+
"IT\uacfc\ud559": 0,
|
| 24 |
+
"\uacbd\uc81c": 1,
|
| 25 |
+
"\uc0ac\ud68c": 2,
|
| 26 |
+
"\uc0dd\ud65c\ubb38\ud654": 3,
|
| 27 |
+
"\uc138\uacc4": 4,
|
| 28 |
+
"\uc2a4\ud3ec\uce20": 5,
|
| 29 |
+
"\uc815\uce58": 6
|
| 30 |
+
},
|
| 31 |
+
"layer_norm_eps": 1e-12,
|
| 32 |
+
"max_position_embeddings": 512,
|
| 33 |
+
"model_type": "electra",
|
| 34 |
+
"num_attention_heads": 12,
|
| 35 |
+
"num_hidden_layers": 12,
|
| 36 |
+
"pad_token_id": 0,
|
| 37 |
+
"position_embedding_type": "absolute",
|
| 38 |
+
"problem_type": "single_label_classification",
|
| 39 |
+
"summary_activation": "gelu",
|
| 40 |
+
"summary_last_dropout": 0.1,
|
| 41 |
+
"summary_type": "first",
|
| 42 |
+
"summary_use_proj": true,
|
| 43 |
+
"torch_dtype": "float32",
|
| 44 |
+
"transformers_version": "4.52.4",
|
| 45 |
+
"type_vocab_size": 2,
|
| 46 |
+
"use_cache": true,
|
| 47 |
+
"vocab_size": 35000
|
| 48 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f58d5d06b078f7b38cdbabdc262367982257231c216443343e7a94e4d0600892
|
| 3 |
+
size 451731052
|
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,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
"1": {
|
| 12 |
+
"content": "[UNK]",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false,
|
| 17 |
+
"special": true
|
| 18 |
+
},
|
| 19 |
+
"2": {
|
| 20 |
+
"content": "[CLS]",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false,
|
| 25 |
+
"special": true
|
| 26 |
+
},
|
| 27 |
+
"3": {
|
| 28 |
+
"content": "[SEP]",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": false,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false,
|
| 33 |
+
"special": true
|
| 34 |
+
},
|
| 35 |
+
"4": {
|
| 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": true,
|
| 45 |
+
"cls_token": "[CLS]",
|
| 46 |
+
"do_basic_tokenize": true,
|
| 47 |
+
"do_lower_case": false,
|
| 48 |
+
"extra_special_tokens": {},
|
| 49 |
+
"mask_token": "[MASK]",
|
| 50 |
+
"model_max_length": 512,
|
| 51 |
+
"never_split": null,
|
| 52 |
+
"pad_token": "[PAD]",
|
| 53 |
+
"sep_token": "[SEP]",
|
| 54 |
+
"strip_accents": null,
|
| 55 |
+
"tokenize_chinese_chars": true,
|
| 56 |
+
"tokenizer_class": "ElectraTokenizer",
|
| 57 |
+
"unk_token": "[UNK]"
|
| 58 |
+
}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6dcbb09860893f1a4a5a2e68d1f33ee019430f39c6f1567025f6cdbc10ba8a05
|
| 3 |
+
size 5304
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|