A LoRA fine-tuned Mistral-7B model for detecting Population Replacement Conspiracy Theory (PRCT) content across (at least) Portuguese Telegram and Italian news headlines.
Population Replacement Conspiracy Theories are false narratives claiming deliberate orchestration of demographic substitution through immigration. Main variants include:
These narratives are linked to extremist violence (Christchurch 2019, Utøya 2011) and pose serious threats to democratic discourse.
1
2### Basic Usage
3```pythonfrom transformers import AutoModelForCausalLM, AutoTokenizer
4from peft import PeftModel
5import torchLoad base model and tokenizer
6base_model_name = "mistralai/Mistral-7B-Instruct-v0.3"
7model = AutoModelForCausalLM.from_pretrained(
8base_model_name,
9torch_dtype=torch.float16,
10device_map="auto"
11)
12tokenizer = AutoTokenizer.from_pretrained(base_model_name)Load LoRA adapter
13model = PeftModel.from_pretrained(model, "erikbranmarino/Mistral-PRCT")Prepare prompt
14text = "Your Portuguese or Italian text here"
15prompt = f"""Classify if the following text contains Population Replacement Conspiracy Theory (PRCT) content.Text: {text}Classification (YES/NO):"""Generate prediction
16inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
17outputs = model.generate(
18**inputs,
19max_new_tokens=10,
20temperature=0.0,
21do_sample=False
22)
23prediction = tokenizer.decode(outputs[0], skip_special_tokens=True)print(prediction)
24
25### Batch Processing Example
26```pythondef classify_batch(texts, model, tokenizer, batch_size=8):
27"""Classify multiple texts efficiently"""
28predictions = []for i in range(0, len(texts), batch_size):
29 batch = texts[i:i+batch_size]
30 prompts = [f"Classify PRCT: {text}" for text in batch] inputs = tokenizer(prompts, return_tensors="pt", padding=True).to(model.device)
31 outputs = model.generate(**inputs, max_new_tokens=10, temperature=0.0) for output in outputs:
32 pred = tokenizer.decode(output, skip_special_tokens=True)
33 predictions.append(pred)return predictions
34
35## Bias and Ethical Considerations
36
37### Known Biases
38- **Platform bias**: Optimized for Telegram-style informal discourse
39- **Language bias**: Primarily Portuguese, with cross-lingual transfer to Italian
40- **Temporal bias**: Training data from 2020-2024 may not capture evolving narratives
41
42### Ethical Use
43- ⚠️ **Not for automated censorship**: Requires human review
44- ✅ **Research purposes**: Understanding conspiracy theory propagation
45- ✅ **Content flagging**: Assisting moderators, not replacing them
46- ❌ **Surveillance**: Not intended for monitoring individuals
47
48We advocate for freedom of speech and constitutional rights. This tool should support informed moderation, not suppress legitimate discourse.
49
50## Citation (to appear)
51```bibtex@inproceedings{marino2025prct,
52title={Population Replacement Conspiracy Theories Detection on Telegram and News Headlines:
53benchmarking LLMs and BERT models in Portuguese and Italian},
54author={Marino, Erik Bran and Vieira, Renata},
55booktitle={Proceedings of PROPOR 2026},
56year={2026}
57}
58
59## Model Card Authors
60
61Erik Bran Marino (Universidade de Évora, HYBRIDS Project)
62
63## Contact
64
65- **Email**: erik.marino@uevora.pt
66- **Project**: MSCA HYBRIDS (Grant Agreement No. 101073351)
67- **Institution**: Universidade de Évora, Portugal
68
69## License
70
71MIT License - Free for research and educational purposes.
72
73---
74
75**Developed as part of the HYBRIDS Marie Skłodowska-Curie Actions project**