Skip to content

TristanDonze/LLM-Fallacy-Detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fine-tuning LLMs to Mimic Political Speeches and Detect Fallacious Arguments

Authors: Tristan Donzé, Pablo Bertaud-Velten Institution: Institut Polytechnique de Paris


Overview

This project explores the dual challenge of generating political speeches in Donald Trump's rhetorical style and detecting logical fallacies in political discourse. We fine-tuned several LLMs using QLoRA to create both a fallacy detection system and a model that imitates Donald Trump's speech style.


Key Features

  • Trump-Style Speech Generation: A model fine-tuned to mimic Donald Trump's rhetorical style.
  • Fallacy Detection: A system to detect logical fallacies in political arguments.
  • Quantitative Analysis: Evaluation of fallacious arguments in generated speeches compared to baseline models.

Datasets

Fallacy Detection Datasets

Trump Speeches Datasets


Methodology

Models Fine-tuned

  • Phi4-mini-Instruct (Link)
    • 16-bit quantized
  • Mistral-7B-Instruct-v0.3 (Link)
    • 8-bit quantized
  • Mistral-Small-24B-Instruct-2501 (Link)
    • 4-bit quantized

Fine-tuning Process

  • QLoRA Fine-tuning:
    • 4-bit quantization
    • Low-rank adapters (rank=32)
    • Lora alpha = 64
    • Dropout at 0.05

Evaluation

  • Trump Model:
    • Qualitative analysis: Mimics Trump's style and rhetorical patterns.
    • Quantitative analysis: BERTScore, ROUGE, BLEU, and binary classifier for style similarity.
  • Fallacy Detection Model:
    • Goal: Find logical fallacies in texts. Finetuned to achieve this.
    • Performance metrics: Accuracy, precision, recall, and F1 score.
    • Comparison of finetuned vs. baseline models.

Setup

Installation

git clone https://github.com/your-repo/llm-political-speeches-fallacy-detection.git
cd llm-political-speeches-fallacy-detection
pip install -r requirements.txt

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors