Model save
Browse files- README.md +77 -119
- model.safetensors +1 -1
README.md
CHANGED
|
@@ -1,119 +1,77 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
-
|
| 10 |
-
-
|
| 11 |
-
-
|
| 12 |
-
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
-
|
| 22 |
-
|
| 23 |
-
-
|
| 24 |
-
-
|
| 25 |
-
-
|
| 26 |
-
-
|
| 27 |
-
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
category, confidence = classify_claim(claim)
|
| 79 |
-
print(f"Claim: {claim}")
|
| 80 |
-
print(f"Category: {category}")
|
| 81 |
-
print(f"Confidence: {confidence:.4f}")
|
| 82 |
-
print("-" * 50)
|
| 83 |
-
```
|
| 84 |
-
|
| 85 |
-
## π Dataset
|
| 86 |
-
|
| 87 |
-
Fine-tuned on a custom dataset with 3,675 claims labeled by category, with an 80/20 train/test split.
|
| 88 |
-
|
| 89 |
-
## π Evaluation
|
| 90 |
-
|
| 91 |
-
The model achieves high accuracy on the test set, with most predictions having confidence scores above 0.95.
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
## π― Specific Claim Patterns
|
| 95 |
-
|
| 96 |
-
The model includes special handling for specific claim patterns:
|
| 97 |
-
|
| 98 |
-
1. **Police-related claims**: Claims about the police chief, summons, or threats
|
| 99 |
-
- Example: "Ketua Polis Negara (KPN) Tan Sri Razarudin Husain hantar e-mel berkaitan saman dan berbaur ugutan kepada orang awam"
|
| 100 |
-
- Category: Jenayah (Crime)
|
| 101 |
-
|
| 102 |
-
2. **Zakat-related claims**: Claims about zakat fitrah, rice types, or payment validity
|
| 103 |
-
- Example: "Zakat fitrah tidak sah jika dibayar tidak mengikut jenis beras yang dimakan"
|
| 104 |
-
- Category: Agama (Religion)
|
| 105 |
-
|
| 106 |
-
3. **Tax-related claims**: Claims about government taxes, especially on palm oil
|
| 107 |
-
- Example: "Kerajaan akan memperkenalkan cukai khas minyak sawit mentah"
|
| 108 |
-
- Category: Ekonomi (Economy)
|
| 109 |
-
|
| 110 |
-
4. **Consumer product claims**: Claims about contact lenses or online sales
|
| 111 |
-
- Example: "Kanta lekap tidak boleh dijual secara dalam talian"
|
| 112 |
-
- Category: Pengguna (Consumer)
|
| 113 |
-
|
| 114 |
-
5. **National security claims**: Claims about ammunition, colonization, or enemies
|
| 115 |
-
- Example: "Penemuan 50 tan kelongsong dan peluru petanda negara bakal dijajah musuh"
|
| 116 |
-
- Category: Politik (Politics)
|
| 117 |
-
## π License
|
| 118 |
-
|
| 119 |
-
MIT License
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
base_model: rmtariq/malay_classification
|
| 4 |
+
tags:
|
| 5 |
+
- generated_from_trainer
|
| 6 |
+
metrics:
|
| 7 |
+
- accuracy
|
| 8 |
+
- f1
|
| 9 |
+
- precision
|
| 10 |
+
- recall
|
| 11 |
+
model-index:
|
| 12 |
+
- name: malay_classification
|
| 13 |
+
results: []
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 17 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 18 |
+
|
| 19 |
+
# malay_classification
|
| 20 |
+
|
| 21 |
+
This model is a fine-tuned version of [rmtariq/malay_classification](https://huggingface.co/rmtariq/malay_classification) on the None dataset.
|
| 22 |
+
It achieves the following results on the evaluation set:
|
| 23 |
+
- Loss: 0.0024
|
| 24 |
+
- Accuracy: 0.9990
|
| 25 |
+
- F1: 0.9990
|
| 26 |
+
- Precision: 0.9991
|
| 27 |
+
- Recall: 0.9990
|
| 28 |
+
|
| 29 |
+
## Model description
|
| 30 |
+
|
| 31 |
+
More information needed
|
| 32 |
+
|
| 33 |
+
## Intended uses & limitations
|
| 34 |
+
|
| 35 |
+
More information needed
|
| 36 |
+
|
| 37 |
+
## Training and evaluation data
|
| 38 |
+
|
| 39 |
+
More information needed
|
| 40 |
+
|
| 41 |
+
## Training procedure
|
| 42 |
+
|
| 43 |
+
### Training hyperparameters
|
| 44 |
+
|
| 45 |
+
The following hyperparameters were used during training:
|
| 46 |
+
- learning_rate: 5e-05
|
| 47 |
+
- train_batch_size: 8
|
| 48 |
+
- eval_batch_size: 16
|
| 49 |
+
- seed: 42
|
| 50 |
+
- optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 51 |
+
- lr_scheduler_type: linear
|
| 52 |
+
- lr_scheduler_warmup_steps: 500
|
| 53 |
+
- num_epochs: 3
|
| 54 |
+
|
| 55 |
+
### Training results
|
| 56 |
+
|
| 57 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Precision | Recall |
|
| 58 |
+
|:-------------:|:------:|:----:|:---------------:|:--------:|:------:|:---------:|:------:|
|
| 59 |
+
| 0.1691 | 0.2720 | 500 | 0.1373 | 0.9717 | 0.9717 | 0.9730 | 0.9717 |
|
| 60 |
+
| 0.0493 | 0.5441 | 1000 | 0.0369 | 0.9943 | 0.9943 | 0.9945 | 0.9943 |
|
| 61 |
+
| 0.0669 | 0.8161 | 1500 | 0.0406 | 0.9952 | 0.9952 | 0.9954 | 0.9952 |
|
| 62 |
+
| 0.0287 | 1.0881 | 2000 | 0.0276 | 0.9943 | 0.9944 | 0.9948 | 0.9943 |
|
| 63 |
+
| 0.0061 | 1.3602 | 2500 | 0.0168 | 0.9971 | 0.9971 | 0.9972 | 0.9971 |
|
| 64 |
+
| 0.0137 | 1.6322 | 3000 | 0.0128 | 0.9981 | 0.9981 | 0.9981 | 0.9981 |
|
| 65 |
+
| 0.0178 | 1.9042 | 3500 | 0.0179 | 0.9968 | 0.9968 | 0.9969 | 0.9968 |
|
| 66 |
+
| 0.0112 | 2.1763 | 4000 | 0.0110 | 0.9975 | 0.9975 | 0.9975 | 0.9975 |
|
| 67 |
+
| 0.0001 | 2.4483 | 4500 | 0.0079 | 0.9987 | 0.9987 | 0.9988 | 0.9987 |
|
| 68 |
+
| 0.0001 | 2.7203 | 5000 | 0.0021 | 0.9987 | 0.9987 | 0.9987 | 0.9987 |
|
| 69 |
+
| 0.0003 | 2.9924 | 5500 | 0.0024 | 0.9990 | 0.9990 | 0.9991 | 0.9990 |
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
### Framework versions
|
| 73 |
+
|
| 74 |
+
- Transformers 4.53.1
|
| 75 |
+
- Pytorch 2.7.1
|
| 76 |
+
- Datasets 3.6.0
|
| 77 |
+
- Tokenizers 0.21.2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 711501908
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4b2d031437b7b3ceed085985b1a9a59ced72928e3b8c09fa62fa3969391c8b34
|
| 3 |
size 711501908
|