Authors: Tristan Donzé, Pablo Bertaud-Velten Institution: Institut Polytechnique de Paris
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.
- 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.
- Sources:
- Total: ~5700 annotated samples
- Preprocessing: Formatted as instruction-output pairs for fallacy detection.
- Sources:
- Total: 630 speeches
- Preprocessing: Instruction-output pairs generated using Gemini's API.
- 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
- QLoRA Fine-tuning:
- 4-bit quantization
- Low-rank adapters (rank=32)
- Lora alpha = 64
- Dropout at 0.05
- 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.
git clone https://github.com/your-repo/llm-political-speeches-fallacy-detection.git
cd llm-political-speeches-fallacy-detection
pip install -r requirements.txt