SecretLab/trump-mistral-adapter
<div align="center">
Trump Mistral Adapter
<img src="https://img.shields.io/badge/MODEL-Mistral--7B-blue?style=for-the-badge" alt="Model: Mistral-7B"/> <img src="https://img.shields.io/badge/ADAPTER-LoRA-red?style=for-the-badge" alt="Adapter: LoRA"/> <img src="https://img.shields.io/badge/STYLE-Trump-yellow?style=for-the-badge" alt="Style: Trump"/>
</div>
"This adapter, believe me folks, it's tremendous. It's the best adapter, everyone says so. We're going to do things with this model that nobody's ever seen before."
A fine-tuned language model that captures Donald Trump's distinctive speaking style, discourse patterns, and policy positions. This LoRA adapter transforms Mistral-7B-Instruct-v0.2 to emulate the unique rhetorical flourishes and speech cadence of the former U.S. President.
<div align="center"> <img src="https://img.shields.io/badge/๐ฃ๏ธ Speech Patterns-โ-success" alt="Speech Patterns"/> <img src="https://img.shields.io/badge/๐๏ธ Policy Positions-โ-success" alt="Policy Positions"/> <img src="https://img.shields.io/badge/๐ Repetition Style-โ-success" alt="Repetition Style"/> <img src="https://img.shields.io/badge/๐ Hand Gestures-โ-lightgrey" alt="Hand Gestures"/> </div>
๐ Overview
๐ Getting Started
๐ป Python Implementation
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
from peft import PeftModel
import torch
# Configuration
base_model_id = "mistralai/Mistral-7B-Instruct-v0.2"
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_compute_dtype=torch.float16,
bnb_4bit_quant_type="nf4",
bnb_4bit_use_double_quant=True,
)
# Load model and tokenizer
model = AutoModelForCausalLM.from_pretrained(
base_model_id,
quantization_config=bnb_config,
device_map="auto",
torch_dtype=torch.float16
)
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
# Apply adapter
model = PeftModel.from_pretrained(model, "nnat03/trump-mistral-adapter")
# Generate response
prompt = "What's your plan for border security?"
input_text = f"<s>[INST] {prompt} [/INST]"
inputs = tokenizer(input_text, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_length=512, temperature=0.7, do_sample=True)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response.split("[/INST]")[-1].strip())๐ฎ Ollama Integration
For simplified local deployment:
# Pull the model
ollama pull nnat03/trump-mistral
# Run the model
ollama run nnat03/trump-mistralAccess this model via the Ollama library.
๐ Example Output
<table> <tr> <th width="20%">Topic</th> <th>Response</th> </tr> <tr> <td>Border Security</td> <td><i>"First of all, we need the wall. The wall is very important. It's not just a wall, it's steel and concrete and things that are very, very strong. We have 450 miles completed. It's an incredible job."</i></td> </tr> <tr> <td>Joe Biden</td> <td><i>"Joe Biden, I call him 1% Joe. His numbers are way down. He's a corrupt politician. He's been there for 47 years. Where has he been? What's he done? There's nothing."</i></td> </tr> </table>
โ๏ธ Technical Details
๐ Training Data
This model was trained on authentic speech patterns from:
- Trump interviews dataset (pookie3000/trump-interviews)
- Trump speeches dataset (bananabot/TrumpSpeeches)
๐ง Model Configuration
LoRA rank: 16 (tremendous rank, the best rank)
Alpha: 64
Dropout: 0.05
Target modules: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj๐ง Training Parameters
Batch size: 4
Gradient accumulation: 4
Learning rate: 2e-4
Epochs: 3
LR scheduler: cosine
Optimizer: paged_adamw_8bit
Precision: BF16๐ฏ Applications
<div align="center"> <table width="80%"> <tr> <td align="center" width="33%"><b>๐ Education</b><br><small>Political discourse analysis</small></td> <td align="center" width="33%"><b>๐ฌ Research</b><br><small>Rhetoric pattern studies</small></td> <td align="center" width="33%"><b>๐ญ Creative</b><br><small>Interactive simulations</small></td> </tr> </table> </div>
โ ๏ธ Notes and Limitations
This model mimics a speaking style but does not guarantee factual accuracy or represent actual views. It may reproduce biases present in the training data and is primarily intended for research and educational purposes.
๐ Citation
@misc{nnat03-trump-mistral-adapter,
author = {nnat03},
title = {Trump Mistral Adapter},
year = {2023},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/nnat03/trump-mistral-adapter}}
}<div align="center"> <p><b>Framework version:</b> PEFT 0.15.0</p> <p>Created for NLP research and education</p> <p><small>"We're gonna have the best models, believe me."</small></p> </div>
