ArapCheruiyot commited on
Commit
8fe4be8
·
verified ·
1 Parent(s): b51fb6c

Upload model_readme.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. model_readme.md +80 -0
model_readme.md ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DISARM Election Watch - Fine-tuned Llama-3.1 Model
2
+
3
+ ## Model Description
4
+
5
+ This is a fine-tuned version of the Llama-3.1 model specifically optimized for DISARM Framework analysis of election-related content. The model has been trained on a comprehensive dataset of Nigerian election content from multiple platforms.
6
+
7
+ ## Model Details
8
+
9
+ - **Base Model**: ArapCheruiyot/disarm_ew-llama3
10
+ - **Fine-tuning Method**: LoRA (Low-Rank Adaptation)
11
+ - **Optimization**: Apple Silicon (M1 Max) optimized
12
+ - **Training Data**: 6,019 examples from multiple sources
13
+ - **Task**: DISARM Framework classification and narrative analysis
14
+
15
+ ## Training Configuration
16
+
17
+ - **LoRA Rank**: 16
18
+ - **Batch Size**: 1
19
+ - **Learning Rate**: 3e-4
20
+ - **Sequence Length**: 2048
21
+ - **Training Iterations**: 600
22
+ - **Final Training Loss**: 1.064
23
+ - **Final Validation Loss**: 1.354
24
+
25
+ ## Usage
26
+
27
+ ### With MLX-LM (Fused Model)
28
+ ```python
29
+ from mlx_lm import load, generate
30
+
31
+ model, tokenizer = load("ArapCheruiyot/disarm-ew-llama3-finetuned")
32
+ # Use the model for inference
33
+ ```
34
+
35
+ ### With LoRA Adapters
36
+ ```python
37
+ from mlx_lm import load, generate
38
+
39
+ model, tokenizer = load("ArapCheruiyot/disarm_ew-llama3",
40
+ adapter_path="ArapCheruiyot/disarm-ew-llama3-finetuned")
41
+ ```
42
+
43
+ ### Example Usage
44
+ ```python
45
+ prompt = """### Instruction:
46
+ Classify the following content according to DISARM Framework techniques and meta-narratives:
47
+
48
+ ### Input:
49
+ A viral WhatsApp broadcast claims that the BVAS machines have been pre-loaded with votes by INEC in favour of the incumbent party.
50
+
51
+ ### Response:"""
52
+
53
+ response = generate(model, tokenizer, prompt, max_tokens=256, temp=0.1)
54
+ print(response)
55
+ ```
56
+
57
+ ## Dataset
58
+
59
+ The model was trained on the DISARM Election Watch dataset, which contains:
60
+ - 6,019 examples from multiple platforms
61
+ - DISARM Framework classifications
62
+ - Meta-narrative analysis
63
+ - Multi-language support
64
+
65
+ ## Performance
66
+
67
+ Optimized for Apple Silicon with:
68
+ - Metal GPU acceleration
69
+ - 16GB wired memory optimization
70
+ - Native MLX-LM framework
71
+
72
+ ## Model Files
73
+
74
+ - **Fused Model**: Complete fine-tuned model (16GB)
75
+ - **LoRA Adapters**: Lightweight adapters for efficient loading
76
+ - **Checkpoints**: Training checkpoints every 100 iterations
77
+
78
+ ## License
79
+
80
+ This model is part of the DISARM Election Watch project.