Text Classification
Transformers
Safetensors
modernbert
Generated from Trainer
text-embeddings-inference
Instructions to use dexter231/turkish-sentiment2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dexter231/turkish-sentiment2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="dexter231/turkish-sentiment2", device_map="auto")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("dexter231/turkish-sentiment2") model = AutoModelForSequenceClassification.from_pretrained("dexter231/turkish-sentiment2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
End of training
Browse files- README.md +75 -0
- config.json +58 -0
- model.safetensors +3 -0
- special_tokens_map.json +37 -0
- tokenizer.json +0 -0
- tokenizer_config.json +70 -0
- training_args.bin +3 -0
README.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
license: mit
|
| 4 |
+
base_model: artiwise-ai/modernbert-base-tr-uncased
|
| 5 |
+
tags:
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
metrics:
|
| 8 |
+
- accuracy
|
| 9 |
+
model-index:
|
| 10 |
+
- name: turkish-sentiment2
|
| 11 |
+
results: []
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 15 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 16 |
+
|
| 17 |
+
# turkish-sentiment2
|
| 18 |
+
|
| 19 |
+
This model is a fine-tuned version of [artiwise-ai/modernbert-base-tr-uncased](https://huggingface.co/artiwise-ai/modernbert-base-tr-uncased) on an unknown dataset.
|
| 20 |
+
It achieves the following results on the evaluation set:
|
| 21 |
+
- Loss: 0.1083
|
| 22 |
+
- Accuracy: 0.9615
|
| 23 |
+
- F1 Macro: 0.9351
|
| 24 |
+
- F1 Weighted: 0.9612
|
| 25 |
+
- Precision Macro: 0.9415
|
| 26 |
+
- Recall Macro: 0.9291
|
| 27 |
+
|
| 28 |
+
## Model description
|
| 29 |
+
|
| 30 |
+
More information needed
|
| 31 |
+
|
| 32 |
+
## Intended uses & limitations
|
| 33 |
+
|
| 34 |
+
More information needed
|
| 35 |
+
|
| 36 |
+
## Training and evaluation data
|
| 37 |
+
|
| 38 |
+
More information needed
|
| 39 |
+
|
| 40 |
+
## Training procedure
|
| 41 |
+
|
| 42 |
+
### Training hyperparameters
|
| 43 |
+
|
| 44 |
+
The following hyperparameters were used during training:
|
| 45 |
+
- learning_rate: 5e-05
|
| 46 |
+
- train_batch_size: 16
|
| 47 |
+
- eval_batch_size: 16
|
| 48 |
+
- seed: 42
|
| 49 |
+
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 50 |
+
- lr_scheduler_type: linear
|
| 51 |
+
- lr_scheduler_warmup_steps: 400
|
| 52 |
+
- training_steps: 2000
|
| 53 |
+
|
| 54 |
+
### Training results
|
| 55 |
+
|
| 56 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 Macro | F1 Weighted | Precision Macro | Recall Macro |
|
| 57 |
+
|:-------------:|:------:|:----:|:---------------:|:--------:|:--------:|:-----------:|:---------------:|:------------:|
|
| 58 |
+
| 0.1987 | 0.0073 | 200 | 0.1654 | 0.9400 | 0.9074 | 0.9413 | 0.8944 | 0.9236 |
|
| 59 |
+
| 0.1978 | 0.0145 | 400 | 0.1653 | 0.9407 | 0.9092 | 0.9427 | 0.8938 | 0.9303 |
|
| 60 |
+
| 0.1444 | 0.0218 | 600 | 0.1572 | 0.9520 | 0.9157 | 0.9502 | 0.9425 | 0.8957 |
|
| 61 |
+
| 0.1446 | 0.0290 | 800 | 0.1252 | 0.9560 | 0.9239 | 0.9549 | 0.9407 | 0.9101 |
|
| 62 |
+
| 0.1067 | 0.0363 | 1000 | 0.1389 | 0.9574 | 0.9294 | 0.9574 | 0.9313 | 0.9275 |
|
| 63 |
+
| 0.1333 | 0.0436 | 1200 | 0.1244 | 0.9587 | 0.9279 | 0.9576 | 0.9464 | 0.9128 |
|
| 64 |
+
| 0.0935 | 0.0508 | 1400 | 0.1297 | 0.9596 | 0.9336 | 0.9598 | 0.9309 | 0.9365 |
|
| 65 |
+
| 0.1072 | 0.0581 | 1600 | 0.1196 | 0.9604 | 0.9309 | 0.9593 | 0.9497 | 0.9156 |
|
| 66 |
+
| 0.1235 | 0.0654 | 1800 | 0.1121 | 0.9614 | 0.9339 | 0.9607 | 0.9450 | 0.9242 |
|
| 67 |
+
| 0.1097 | 0.0726 | 2000 | 0.1083 | 0.9615 | 0.9351 | 0.9612 | 0.9415 | 0.9291 |
|
| 68 |
+
|
| 69 |
+
|
| 70 |
+
### Framework versions
|
| 71 |
+
|
| 72 |
+
- Transformers 4.52.4
|
| 73 |
+
- Pytorch 2.6.0+cu124
|
| 74 |
+
- Datasets 3.6.0
|
| 75 |
+
- Tokenizers 0.21.2
|
config.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"ModernBertForSequenceClassification"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 50281,
|
| 8 |
+
"classifier_activation": "gelu",
|
| 9 |
+
"classifier_bias": false,
|
| 10 |
+
"classifier_dropout": 0.0,
|
| 11 |
+
"classifier_pooling": "mean",
|
| 12 |
+
"cls_token_id": 2,
|
| 13 |
+
"decoder_bias": true,
|
| 14 |
+
"deterministic_flash_attn": false,
|
| 15 |
+
"embedding_dropout": 0.0,
|
| 16 |
+
"eos_token_id": 50282,
|
| 17 |
+
"global_attn_every_n_layers": 3,
|
| 18 |
+
"global_rope_theta": 160000.0,
|
| 19 |
+
"gradient_checkpointing": false,
|
| 20 |
+
"hidden_activation": "gelu",
|
| 21 |
+
"hidden_size": 768,
|
| 22 |
+
"id2label": {
|
| 23 |
+
"0": "Positive",
|
| 24 |
+
"1": "Neutral",
|
| 25 |
+
"2": "Negative"
|
| 26 |
+
},
|
| 27 |
+
"initializer_cutoff_factor": 2.0,
|
| 28 |
+
"initializer_range": 0.02,
|
| 29 |
+
"intermediate_size": 1152,
|
| 30 |
+
"label2id": {
|
| 31 |
+
"Negative": 2,
|
| 32 |
+
"Neutral": 1,
|
| 33 |
+
"Positive": 0
|
| 34 |
+
},
|
| 35 |
+
"layer_norm_eps": 1e-05,
|
| 36 |
+
"local_attention": 128,
|
| 37 |
+
"local_rope_theta": 10000.0,
|
| 38 |
+
"mask_token_id": 4,
|
| 39 |
+
"max_position_embeddings": 8192,
|
| 40 |
+
"mlp_bias": false,
|
| 41 |
+
"mlp_dropout": 0.0,
|
| 42 |
+
"model_type": "modernbert",
|
| 43 |
+
"norm_bias": false,
|
| 44 |
+
"norm_eps": 1e-05,
|
| 45 |
+
"num_attention_heads": 12,
|
| 46 |
+
"num_hidden_layers": 22,
|
| 47 |
+
"pad_token_id": 0,
|
| 48 |
+
"position_embedding_type": "absolute",
|
| 49 |
+
"problem_type": "single_label_classification",
|
| 50 |
+
"repad_logits_with_grad": false,
|
| 51 |
+
"sep_token_id": 3,
|
| 52 |
+
"sparse_pred_ignore_index": -100,
|
| 53 |
+
"sparse_prediction": false,
|
| 54 |
+
"torch_dtype": "float32",
|
| 55 |
+
"transformers_version": "4.52.4",
|
| 56 |
+
"unk_token_id": 1,
|
| 57 |
+
"vocab_size": 32000
|
| 58 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c0e15ff28b277a268a97fa5d4ff161456cccababfd511471fa2c9f10063c2f03
|
| 3 |
+
size 542016364
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cls_token": {
|
| 3 |
+
"content": "[CLS]",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"mask_token": {
|
| 10 |
+
"content": "[MASK]",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"pad_token": {
|
| 17 |
+
"content": "[PAD]",
|
| 18 |
+
"lstrip": false,
|
| 19 |
+
"normalized": false,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"single_word": false
|
| 22 |
+
},
|
| 23 |
+
"sep_token": {
|
| 24 |
+
"content": "[SEP]",
|
| 25 |
+
"lstrip": false,
|
| 26 |
+
"normalized": false,
|
| 27 |
+
"rstrip": false,
|
| 28 |
+
"single_word": false
|
| 29 |
+
},
|
| 30 |
+
"unk_token": {
|
| 31 |
+
"content": "[UNK]",
|
| 32 |
+
"lstrip": false,
|
| 33 |
+
"normalized": false,
|
| 34 |
+
"rstrip": false,
|
| 35 |
+
"single_word": false
|
| 36 |
+
}
|
| 37 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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": true,
|
| 48 |
+
"extra_special_tokens": {},
|
| 49 |
+
"mask_token": "[MASK]",
|
| 50 |
+
"max_len": 8192,
|
| 51 |
+
"max_length": 8192,
|
| 52 |
+
"model_input_names": [
|
| 53 |
+
"input_ids",
|
| 54 |
+
"attention_mask"
|
| 55 |
+
],
|
| 56 |
+
"model_max_length": 8192,
|
| 57 |
+
"never_split": null,
|
| 58 |
+
"pad_to_multiple_of": null,
|
| 59 |
+
"pad_token": "[PAD]",
|
| 60 |
+
"pad_token_type_id": 0,
|
| 61 |
+
"padding_side": "right",
|
| 62 |
+
"sep_token": "[SEP]",
|
| 63 |
+
"stride": 0,
|
| 64 |
+
"strip_accents": false,
|
| 65 |
+
"tokenize_chinese_chars": true,
|
| 66 |
+
"tokenizer_class": "PreTrainedTokenizer",
|
| 67 |
+
"truncation_side": "right",
|
| 68 |
+
"truncation_strategy": "longest_first",
|
| 69 |
+
"unk_token": "[UNK]"
|
| 70 |
+
}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0361fee2a7f5dd6a80bf3cb763d21b3fb23bc94c93b87f080758faf6ff41052b
|
| 3 |
+
size 5240
|