Mr-FineTuner commited on
Commit
e5c3768
·
verified ·
1 Parent(s): b3279cf

Add model card with evaluation matrix, confusion matrix, and per-class metrics

Browse files
Files changed (1) hide show
  1. README.md +48 -0
README.md ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ # Fine-Tuned LLaMA-3-8B CEFR Model
3
+
4
+ This is a fine-tuned version of `unsloth/llama-3-8b-instruct-bnb-4bit` for CEFR-level sentence generation.
5
+
6
+ - **Base Model**: unsloth/llama-3-8b-instruct-bnb-4bit
7
+ - **Fine-Tuning**: LoRA with SMOTE-balanced dataset
8
+ - **Training Details**:
9
+ - Dataset: CEFR-level sentences with SMOTE and undersampling for balance
10
+ - LoRA Parameters: r=32, lora_alpha=32, lora_dropout=0.5
11
+ - Training Args: learning_rate=2e-5, batch_size=8, epochs=0.1, cosine scheduler
12
+ - Optimizer: adamw_8bit
13
+ - Early Stopping: Patience=3, threshold=0.01
14
+ - **Evaluation Metrics**:
15
+ - CEFR Classifier Accuracy: 0.250
16
+ - Precision (Macro): 0.130
17
+ - Recall (Macro): 0.250
18
+ - F1-Score (Macro): 0.153
19
+ - Perplexity: 14.218
20
+ - Diversity (Unique Sentences): 0.933
21
+ - Inference Time (ms): 2242.946
22
+ - Model Size (GB): 4.8
23
+ - Robustness (F1): 0.145
24
+ - **Confusion Matrix**:
25
+ - CSV: [confusion_matrix.csv](confusion_matrix.csv)
26
+ - Image: [confusion_matrix.png](confusion_matrix.png)
27
+ - **Per-Class Confusion Metrics**:
28
+ - A1: TP=0, FP=2, FN=10, TN=48
29
+ - A2: TP=0, FP=0, FN=10, TN=50
30
+ - B1: TP=10, FP=29, FN=0, TN=21
31
+ - B2: TP=2, FP=7, FN=8, TN=43
32
+ - C1: TP=3, FP=7, FN=7, TN=43
33
+ - C2: TP=0, FP=0, FN=10, TN=50
34
+ - **Usage**:
35
+ ```python
36
+ from transformers import AutoModelForCausalLM, AutoTokenizer
37
+
38
+ model = AutoModelForCausalLM.from_pretrained("Mr-FineTuner/Test___01_withNewEval")
39
+ tokenizer = AutoTokenizer.from_pretrained("Mr-FineTuner/Test___01_withNewEval")
40
+
41
+ # Example inference
42
+ prompt = "<|user|>Generate a CEFR B1 level sentence.<|end|>"
43
+ inputs = tokenizer(prompt, return_tensors="pt")
44
+ outputs = model.generate(**inputs, max_length=50)
45
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
46
+ ```
47
+
48
+ Uploaded using `huggingface_hub`.