Add model card with exact and within-1 confusion matrices and per-class metrics
Browse files
README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
|
| 2 |
-
# Fine-Tuned
|
| 3 |
|
| 4 |
-
This is a fine-tuned version of `unsloth/
|
| 5 |
|
| 6 |
-
- **Base Model**: unsloth/
|
| 7 |
- **Fine-Tuning**: LoRA with balanced dataset
|
| 8 |
- **Training Details**:
|
| 9 |
- Dataset: CEFR-level sentences (balanced)
|
|
@@ -12,21 +12,21 @@ This is a fine-tuned version of `unsloth/gemma-7b-bnb-4bit` for CEFR-level sente
|
|
| 12 |
- Optimizer: adamw_8bit
|
| 13 |
- Early Stopping: Patience=3, threshold=0.01
|
| 14 |
- **Evaluation Metrics (Exact Matches)**:
|
| 15 |
-
- CEFR Classifier Accuracy: 0.
|
| 16 |
-
- Precision (Macro): 0.
|
| 17 |
-
- Recall (Macro): 0.
|
| 18 |
-
- F1-Score (Macro): 0.
|
| 19 |
- **Evaluation Metrics (Within ±1 Level)**:
|
| 20 |
-
- CEFR Classifier Accuracy: 0.
|
| 21 |
-
- Precision (Macro): 0.
|
| 22 |
-
- Recall (Macro): 0.
|
| 23 |
-
- F1-Score (Macro): 0.
|
| 24 |
- **Other Metrics**:
|
| 25 |
-
- Perplexity: 2.
|
| 26 |
- Diversity (Unique Sentences): 0.100
|
| 27 |
-
- Inference Time (ms):
|
| 28 |
- Model Size (GB): 4.2
|
| 29 |
-
- Robustness (F1): 0.
|
| 30 |
- **Confusion Matrix (Exact Matches)**:
|
| 31 |
- CSV: [confusion_matrix_exact.csv](confusion_matrix_exact.csv)
|
| 32 |
- Image: [confusion_matrix_exact.png](confusion_matrix_exact.png)
|
|
@@ -35,24 +35,24 @@ This is a fine-tuned version of `unsloth/gemma-7b-bnb-4bit` for CEFR-level sente
|
|
| 35 |
- Image: [confusion_matrix_within1.png](confusion_matrix_within1.png)
|
| 36 |
- **Per-Class Confusion Metrics (Exact Matches)**:
|
| 37 |
- A1: TP=0, FP=0, FN=10, TN=50
|
| 38 |
-
- A2: TP=
|
| 39 |
-
- B1: TP=
|
| 40 |
-
- B2: TP=
|
| 41 |
-
- C1: TP=
|
| 42 |
- C2: TP=0, FP=0, FN=10, TN=50
|
| 43 |
- **Per-Class Confusion Metrics (Within ±1 Level)**:
|
| 44 |
- A1: TP=10, FP=0, FN=0, TN=50
|
| 45 |
-
- A2: TP=10, FP=
|
| 46 |
- B1: TP=10, FP=0, FN=0, TN=50
|
| 47 |
-
- B2: TP=
|
| 48 |
-
- C1: TP=
|
| 49 |
-
- C2: TP=
|
| 50 |
- **Usage**:
|
| 51 |
```python
|
| 52 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 53 |
|
| 54 |
-
model = AutoModelForCausalLM.from_pretrained("Mr-FineTuner/
|
| 55 |
-
tokenizer = AutoTokenizer.from_pretrained("Mr-FineTuner/
|
| 56 |
|
| 57 |
# Example inference
|
| 58 |
prompt = "<|user|>Generate a CEFR B1 level sentence.<|end|>"
|
|
|
|
| 1 |
|
| 2 |
+
# Fine-Tuned Mistral-7B CEFR Model
|
| 3 |
|
| 4 |
+
This is a fine-tuned version of `unsloth/mistral-7b-bnb-4bit` for CEFR-level sentence generation, evaluated with a fine-tuned classifier from `Mr-FineTuner/Skripsi_validator_best_model`.
|
| 5 |
|
| 6 |
+
- **Base Model**: unsloth/mistral-7b-bnb-4bit
|
| 7 |
- **Fine-Tuning**: LoRA with balanced dataset
|
| 8 |
- **Training Details**:
|
| 9 |
- Dataset: CEFR-level sentences (balanced)
|
|
|
|
| 12 |
- Optimizer: adamw_8bit
|
| 13 |
- Early Stopping: Patience=3, threshold=0.01
|
| 14 |
- **Evaluation Metrics (Exact Matches)**:
|
| 15 |
+
- CEFR Classifier Accuracy: 0.500
|
| 16 |
+
- Precision (Macro): 0.333
|
| 17 |
+
- Recall (Macro): 0.500
|
| 18 |
+
- F1-Score (Macro): 0.389
|
| 19 |
- **Evaluation Metrics (Within ±1 Level)**:
|
| 20 |
+
- CEFR Classifier Accuracy: 0.833
|
| 21 |
+
- Precision (Macro): 0.750
|
| 22 |
+
- Recall (Macro): 0.833
|
| 23 |
+
- F1-Score (Macro): 0.778
|
| 24 |
- **Other Metrics**:
|
| 25 |
+
- Perplexity: 2.404
|
| 26 |
- Diversity (Unique Sentences): 0.100
|
| 27 |
+
- Inference Time (ms): 6267.856
|
| 28 |
- Model Size (GB): 4.2
|
| 29 |
+
- Robustness (F1): 0.369
|
| 30 |
- **Confusion Matrix (Exact Matches)**:
|
| 31 |
- CSV: [confusion_matrix_exact.csv](confusion_matrix_exact.csv)
|
| 32 |
- Image: [confusion_matrix_exact.png](confusion_matrix_exact.png)
|
|
|
|
| 35 |
- Image: [confusion_matrix_within1.png](confusion_matrix_within1.png)
|
| 36 |
- **Per-Class Confusion Metrics (Exact Matches)**:
|
| 37 |
- A1: TP=0, FP=0, FN=10, TN=50
|
| 38 |
+
- A2: TP=0, FP=10, FN=10, TN=40
|
| 39 |
+
- B1: TP=10, FP=10, FN=0, TN=40
|
| 40 |
+
- B2: TP=10, FP=10, FN=0, TN=40
|
| 41 |
+
- C1: TP=10, FP=0, FN=0, TN=50
|
| 42 |
- C2: TP=0, FP=0, FN=10, TN=50
|
| 43 |
- **Per-Class Confusion Metrics (Within ±1 Level)**:
|
| 44 |
- A1: TP=10, FP=0, FN=0, TN=50
|
| 45 |
+
- A2: TP=10, FP=0, FN=0, TN=50
|
| 46 |
- B1: TP=10, FP=0, FN=0, TN=50
|
| 47 |
+
- B2: TP=10, FP=10, FN=0, TN=40
|
| 48 |
+
- C1: TP=10, FP=0, FN=0, TN=50
|
| 49 |
+
- C2: TP=0, FP=0, FN=10, TN=50
|
| 50 |
- **Usage**:
|
| 51 |
```python
|
| 52 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 53 |
|
| 54 |
+
model = AutoModelForCausalLM.from_pretrained("Mr-FineTuner/With_synthetic_Dataset_mistral-1epoch")
|
| 55 |
+
tokenizer = AutoTokenizer.from_pretrained("Mr-FineTuner/With_synthetic_Dataset_mistral-1epoch")
|
| 56 |
|
| 57 |
# Example inference
|
| 58 |
prompt = "<|user|>Generate a CEFR B1 level sentence.<|end|>"
|