Views
No views yet
1from mlx_lm import load, generate
2
3# Load the complete fine-tuned model
4model, tokenizer = load("models/disarm_ew_llama3_finetuned")
5
6# Example prompt
7prompt = """### Instruction:
8Classify the following content according to DISARM Framework techniques and meta-narratives:
9
10### Input:
11A viral WhatsApp broadcast claims that the BVAS machines have been pre-loaded with votes by INEC in favour of the incumbent party.
12
13### Response:"""
14
15# Generate response
16response = generate(model, tokenizer, prompt, max_tokens=256, temp=0.1)
17print(response)1# Create Ollama model
2ollama create disarm-ew-llama3-finetuned -f Modelfile
3
4# Run the model
5ollama run disarm-ew-llama3-finetuned "Your prompt here"1ollama run disarm-ew-llama3-finetuned "### Instruction:
2Classify the following content according to DISARM Framework techniques and meta-narratives:
3
4### Input:
5A viral WhatsApp broadcast claims that the BVAS machines have been pre-loaded with votes by INEC in favour of the incumbent party.
6
7### Response:"1{
2 "meta_narrative": "Compromised Election Technology",
3 "primary_disarm_technique": "T0022.001: Develop False Conspiracy Theory Narratives about Electoral Manipulation and Compromise",
4 "confidence_score": 0.98,
5 "key_indicators": ["BVAS", "pre-loaded", "INEC"],
6 "platform": "WhatsApp",
7 "language": "en",
8 "category": "Undermining Electoral Institutions"
9}