CoolFace
Modelpublic

erikbranmarino/Mistral-PRCT

sourceHugging Facemitupdated 10mo agoView on Hugging Face
0likes11downloads
Model Card

πŸ” Mistral-PRCT

A LoRA fine-tuned Mistral-7B model for detecting Population Replacement Conspiracy Theory (PRCT) content across (at least) Portuguese Telegram and Italian news headlines.

![License: MIT](https://opensource.org/licenses/MIT) ![Base Model](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.3)

Overview

Mistral-PRCT is a LoRA adapter fine-tuned on Portuguese Telegram messages for detecting Population Replacement Conspiracy Theories. The model demonstrates strong cross-domain generalization, achieving competitive performance on Italian news headlines despite being trained exclusively on informal social media discourse.

Key Metrics

DatasetF1-MacroF1-BinaryAccuracy
Telegram PT (in-domain)0.8190.7000.896
News ITA (cross-domain)0.7530.6880.771

Model Description

Mistral-PRCT is a LoRA (Low-Rank Adaptation) fine-tuned version of Mistral-7B-Instruct-v0.3, specifically adapted for detecting Population Replacement Conspiracy Theory (PRCT) content. The model was trained on Portuguese Telegram messages and demonstrates robust cross-domain transfer to Italian news headlines.

What are PRCTs?

Population Replacement Conspiracy Theories are false narratives claiming deliberate orchestration of demographic substitution through immigration. Main variants include:

  • β€”The Great Replacement Theory
  • β€”White Genocide
  • β€”Kalergi Plan
  • β€”Eurabia

These narratives are linked to extremist violence (Christchurch 2019, UtΓΈya 2011) and pose serious threats to democratic discourse.

Model Configuration

Architecture

  • β€”Base Model: Mistral-7B-Instruct-v0.3 (7B parameters)
  • β€”Adapter Type: LoRA (Low-Rank Adaptation)
  • β€”LoRA Rank: 16
  • β€”LoRA Alpha: 32
  • β€”Target Modules: qproj, vproj, kproj, oproj

Label Mapping

  • β€”0: Non-PRCT content
  • β€”1: PRCT content (supports/mentions replacement narratives)

Input Requirements

  • β€”Maximum sequence length: 2048 tokens
  • β€”Input type: Text (Portuguese, Italian, Spanish)
  • β€”Preprocessing: Standard Mistral tokenization

Intended Uses & Limitations

βœ… Intended Uses

  • β€”AI-assisted content moderation (with human oversight)
  • β€”Research on conspiracy theory propagation
  • β€”Cross-domain and multilingual PRCT detection
  • β€”Analysis of informal social media discourse

⚠️ Limitations

  • β€”Training bias: Optimized for Portuguese Telegram messages
  • β€”Cross-domain performance: 6.6pp F1-macro drop on formal news (expected)
  • β€”Language coverage: Best on Portuguese, good on Italian, untested on other Romance languages
  • β€”Inference cost: ~4.6s per sample (slower than zero-shot but higher accuracy)

Important: Should be used as part of a broader content moderation strategy, not as sole decision-maker.

Training Data

  • β€”Primary training: Portuguese Telegram messages (n=919)
  • β€”Domain: Informal social media discourse, conspiracy-oriented channels
  • β€”PRCT prevalence: 15.7%
  • β€”Annotation: Expert annotators (Krippendorff's Ξ±=0.58)
  • β€”Time period: 2020-2024

Training Procedure

Hyperparameters

  • β€”Learning rate: 2e-5
  • β€”Batch size: 4 (with gradient accumulation)
  • β€”Training steps: 600
  • β€”Optimizer: AdamW 8-bit
  • β€”LoRA dropout: 0.05
  • β€”Weight decay: 0.01

Hardware

  • β€”GPU: NVIDIA A100 40GB
  • β€”Training time: ~2 hours
  • β€”Framework: PyTorch + PEFT

Results

In-Domain Performance (Telegram PT)

MetricScore
Accuracy0.896
Precision (Macro)0.797
Recall (Macro)0.848
F1-Macro0.819
F1-Binary0.700
Inference Time4.62s/sample

Cross-Domain Performance (News ITA)

MetricScore
Accuracy0.771
Precision (Macro)0.748
Recall (Macro)0.786
F1-Macro0.753
F1-Binary0.688
Inference Time4.50s/sample

Key Finding: Training on informal Portuguese Telegram enhances detection of implicit PRCT framing in formal Italian news, demonstrating effective cross-domain transfer from social media to journalistic discourse.

Usage

Installation

bashpip install transformers peft torch

### Basic Usage

from peft import PeftModel import torchLoad base model and tokenizer basemodelname = "mistralai/Mistral-7B-Instruct-v0.3" model = AutoModelForCausalLM.frompretrained( basemodelname, torchdtype=torch.float16, devicemap="auto" ) tokenizer = AutoTokenizer.frompretrained(basemodelname)Load LoRA adapter model = PeftModel.frompretrained(model, "erikbranmarino/Mistral-PRCT")Prepare prompt text = "Your Portuguese or Italian text here" prompt = f"""Classify if the following text contains Population Replacement Conspiracy Theory (PRCT) content.Text: {text}Classification (YES/NO):"""Generate prediction inputs = tokenizer(prompt, returntensors="pt").to(model.device) outputs = model.generate( **inputs, maxnewtokens=10, temperature=0.0, dosample=False ) prediction = tokenizer.decode(outputs[0], skipspecial_tokens=True)print(prediction)

Batch Processing Example

pythondef classify_batch(texts, model, tokenizer, batch_size=8):
"""Classify multiple texts efficiently"""
predictions = []for i in range(0, len(texts), batch_size):
    batch = texts[i:i+batch_size]
    prompts = [f"Classify PRCT: {text}" for text in batch]    inputs = tokenizer(prompts, return_tensors="pt", padding=True).to(model.device)
    outputs = model.generate(**inputs, max_new_tokens=10, temperature=0.0)    for output in outputs:
        pred = tokenizer.decode(output, skip_special_tokens=True)
        predictions.append(pred)return predictions

## Bias and Ethical Considerations

### Known Biases
- **Platform bias**: Optimized for Telegram-style informal discourse
- **Language bias**: Primarily Portuguese, with cross-lingual transfer to Italian
- **Temporal bias**: Training data from 2020-2024 may not capture evolving narratives

### Ethical Use
- ⚠️ **Not for automated censorship**: Requires human review
- βœ… **Research purposes**: Understanding conspiracy theory propagation
- βœ… **Content flagging**: Assisting moderators, not replacing them
- ❌ **Surveillance**: Not intended for monitoring individuals

We advocate for freedom of speech and constitutional rights. This tool should support informed moderation, not suppress legitimate discourse.

## Citation (to appear)

title={Population Replacement Conspiracy Theories Detection on Telegram and News Headlines: benchmarking LLMs and BERT models in Portuguese and Italian}, author={Marino, Erik Bran and Vieira, Renata}, booktitle={Proceedings of PROPOR 2026}, year={2026} }

Model Card Authors

Erik Bran Marino (Universidade de Γ‰vora, HYBRIDS Project)

Contact

  • β€”Email: erik.marino@uevora.pt
  • β€”Project: MSCA HYBRIDS (Grant Agreement No. 101073351)
  • β€”Institution: Universidade de Γ‰vora, Portugal

License

MIT License - Free for research and educational purposes.


Developed as part of the HYBRIDS Marie SkΕ‚odowska-Curie Actions project