Retrain on real savasy/ttc4900: acc=92.8 f1=92.7
Browse files- README.md +16 -7
- config.json +22 -45
- model.safetensors +2 -2
- tokenizer_config.json +3 -45
README.md
CHANGED
|
@@ -4,16 +4,25 @@ license: mit
|
|
| 4 |
pipeline_tag: text-classification
|
| 5 |
base_model: dbmdz/bert-base-turkish-cased
|
| 6 |
tags: [turkish, text-classification, werea]
|
| 7 |
-
datasets: [
|
|
|
|
| 8 |
---
|
| 9 |
-
# Werea-TR-Topic — Türkçe konu sınıflandırma
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
## Kullanım
|
| 14 |
```python
|
| 15 |
from transformers import pipeline
|
| 16 |
-
clf
|
| 17 |
-
print(clf("
|
| 18 |
```
|
| 19 |
💜 [werea.co](https://werea.co)
|
|
|
|
| 4 |
pipeline_tag: text-classification
|
| 5 |
base_model: dbmdz/bert-base-turkish-cased
|
| 6 |
tags: [turkish, text-classification, werea]
|
| 7 |
+
datasets: [savasy/ttc4900]
|
| 8 |
+
metrics: [accuracy, f1]
|
| 9 |
---
|
| 10 |
+
# Werea-TR-Topic — Türkçe haber konu sınıflandırma
|
| 11 |
+
|
| 12 |
+
**Gerçek, insan-etiketli [savasy/ttc4900](https://huggingface.co/datasets/savasy/ttc4900) verisiyle eğitildi; aynı setin ayrılmış test bölümünde dürüstçe ölçüldü.** 7 sınıf.
|
| 13 |
+
|
| 14 |
+
## Benchmark (gerçek test)
|
| 15 |
+
| Metrik | Skor |
|
| 16 |
+
|---|---|
|
| 17 |
+
| Accuracy | 92.8% |
|
| 18 |
+
| Macro-F1 | 92.7% |
|
| 19 |
+
|
| 20 |
+
[BERTurk](https://huggingface.co/dbmdz/bert-base-turkish-cased) tabanlı, 6 epoch.
|
| 21 |
+
|
| 22 |
## Kullanım
|
| 23 |
```python
|
| 24 |
from transformers import pipeline
|
| 25 |
+
clf=pipeline("text-classification",model="Werea-co/Werea-TR-Topic")
|
| 26 |
+
print(clf("text metni"))
|
| 27 |
```
|
| 28 |
💜 [werea.co](https://werea.co)
|
config.json
CHANGED
|
@@ -1,58 +1,36 @@
|
|
| 1 |
{
|
| 2 |
-
"
|
| 3 |
"architectures": [
|
| 4 |
"BertForSequenceClassification"
|
| 5 |
],
|
| 6 |
"attention_probs_dropout_prob": 0.1,
|
|
|
|
| 7 |
"classifier_dropout": null,
|
|
|
|
|
|
|
| 8 |
"hidden_act": "gelu",
|
| 9 |
"hidden_dropout_prob": 0.1,
|
| 10 |
"hidden_size": 768,
|
| 11 |
"id2label": {
|
| 12 |
-
"0": "
|
| 13 |
-
"1": "
|
| 14 |
-
"2": "
|
| 15 |
-
"3": "
|
| 16 |
-
"4": "
|
| 17 |
-
"5": "
|
| 18 |
-
"6": "
|
| 19 |
-
"7": "enerji verimlili\u011fi",
|
| 20 |
-
"8": "finansal okuryazarl\u0131k",
|
| 21 |
-
"9": "geri d\u00f6n\u00fc\u015f\u00fcm",
|
| 22 |
-
"10": "g\u00fcne\u015f enerjisi",
|
| 23 |
-
"11": "k\u00fclt\u00fcrel miras",
|
| 24 |
-
"12": "lojistik",
|
| 25 |
-
"13": "mobil sa\u011fl\u0131k",
|
| 26 |
-
"14": "robotik",
|
| 27 |
-
"15": "siber g\u00fcvenlik",
|
| 28 |
-
"16": "su tasarrufu",
|
| 29 |
-
"17": "uzaktan e\u011fitim",
|
| 30 |
-
"18": "veri bilimi",
|
| 31 |
-
"19": "\u015fehir i\u00e7i ula\u015f\u0131m"
|
| 32 |
},
|
| 33 |
"initializer_range": 0.02,
|
| 34 |
"intermediate_size": 3072,
|
|
|
|
| 35 |
"label2id": {
|
| 36 |
-
"
|
| 37 |
-
"
|
| 38 |
-
"
|
| 39 |
-
"
|
| 40 |
-
"
|
| 41 |
-
"
|
| 42 |
-
"
|
| 43 |
-
"enerji verimlili\u011fi": 7,
|
| 44 |
-
"finansal okuryazarl\u0131k": 8,
|
| 45 |
-
"geri d\u00f6n\u00fc\u015f\u00fcm": 9,
|
| 46 |
-
"g\u00fcne\u015f enerjisi": 10,
|
| 47 |
-
"k\u00fclt\u00fcrel miras": 11,
|
| 48 |
-
"lojistik": 12,
|
| 49 |
-
"mobil sa\u011fl\u0131k": 13,
|
| 50 |
-
"robotik": 14,
|
| 51 |
-
"siber g\u00fcvenlik": 15,
|
| 52 |
-
"su tasarrufu": 16,
|
| 53 |
-
"uzaktan e\u011fitim": 17,
|
| 54 |
-
"veri bilimi": 18,
|
| 55 |
-
"\u015fehir i\u00e7i ula\u015f\u0131m": 19
|
| 56 |
},
|
| 57 |
"layer_norm_eps": 1e-12,
|
| 58 |
"max_position_embeddings": 512,
|
|
@@ -60,11 +38,10 @@
|
|
| 60 |
"num_attention_heads": 12,
|
| 61 |
"num_hidden_layers": 12,
|
| 62 |
"pad_token_id": 0,
|
| 63 |
-
"position_embedding_type": "absolute",
|
| 64 |
"problem_type": "single_label_classification",
|
| 65 |
-
"
|
| 66 |
-
"transformers_version": "
|
| 67 |
"type_vocab_size": 2,
|
| 68 |
-
"use_cache":
|
| 69 |
"vocab_size": 32000
|
| 70 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"add_cross_attention": false,
|
| 3 |
"architectures": [
|
| 4 |
"BertForSequenceClassification"
|
| 5 |
],
|
| 6 |
"attention_probs_dropout_prob": 0.1,
|
| 7 |
+
"bos_token_id": null,
|
| 8 |
"classifier_dropout": null,
|
| 9 |
+
"dtype": "float32",
|
| 10 |
+
"eos_token_id": null,
|
| 11 |
"hidden_act": "gelu",
|
| 12 |
"hidden_dropout_prob": 0.1,
|
| 13 |
"hidden_size": 768,
|
| 14 |
"id2label": {
|
| 15 |
+
"0": "dunya",
|
| 16 |
+
"1": "ekonomi",
|
| 17 |
+
"2": "kultur",
|
| 18 |
+
"3": "saglik",
|
| 19 |
+
"4": "siyaset",
|
| 20 |
+
"5": "spor",
|
| 21 |
+
"6": "teknoloji"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
},
|
| 23 |
"initializer_range": 0.02,
|
| 24 |
"intermediate_size": 3072,
|
| 25 |
+
"is_decoder": false,
|
| 26 |
"label2id": {
|
| 27 |
+
"dunya": 0,
|
| 28 |
+
"ekonomi": 1,
|
| 29 |
+
"kultur": 2,
|
| 30 |
+
"saglik": 3,
|
| 31 |
+
"siyaset": 4,
|
| 32 |
+
"spor": 5,
|
| 33 |
+
"teknoloji": 6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
},
|
| 35 |
"layer_norm_eps": 1e-12,
|
| 36 |
"max_position_embeddings": 512,
|
|
|
|
| 38 |
"num_attention_heads": 12,
|
| 39 |
"num_hidden_layers": 12,
|
| 40 |
"pad_token_id": 0,
|
|
|
|
| 41 |
"problem_type": "single_label_classification",
|
| 42 |
+
"tie_word_embeddings": true,
|
| 43 |
+
"transformers_version": "5.14.1",
|
| 44 |
"type_vocab_size": 2,
|
| 45 |
+
"use_cache": false,
|
| 46 |
"vocab_size": 32000
|
| 47 |
}
|
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:e042a5ef8a27ac3bff14ce498e67954413b743c6145553464e7056a6f35d7cb0
|
| 3 |
+
size 442514444
|
tokenizer_config.json
CHANGED
|
@@ -1,54 +1,12 @@
|
|
| 1 |
{
|
| 2 |
-
"
|
| 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 |
"mask_token": "[MASK]",
|
| 49 |
"max_len": 512,
|
| 50 |
"model_max_length": 512,
|
| 51 |
-
"never_split": null,
|
| 52 |
"pad_token": "[PAD]",
|
| 53 |
"sep_token": "[SEP]",
|
| 54 |
"strip_accents": null,
|
|
|
|
| 1 |
{
|
| 2 |
+
"backend": "tokenizers",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
"cls_token": "[CLS]",
|
|
|
|
| 4 |
"do_lower_case": false,
|
| 5 |
+
"is_local": false,
|
| 6 |
+
"local_files_only": false,
|
| 7 |
"mask_token": "[MASK]",
|
| 8 |
"max_len": 512,
|
| 9 |
"model_max_length": 512,
|
|
|
|
| 10 |
"pad_token": "[PAD]",
|
| 11 |
"sep_token": "[SEP]",
|
| 12 |
"strip_accents": null,
|