CoolFace
Modelpublic

SecretLab/trump-mistral-adapter

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
3likes13downloads
Model Card

<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

FeatureDescription
Base ModelMistral-7B-Instruct-v0.2
ArchitectureLoRA adapter (Low-Rank Adaptation)
Training FocusCommunication style, rhetoric, and response patterns
LanguageEnglish

๐Ÿš€ Getting Started

๐Ÿ’ป Python Implementation

python
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:

bash
# Pull the model
ollama pull nnat03/trump-mistral

# Run the model
ollama run nnat03/trump-mistral

Access 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:

๐Ÿ”ง 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

bibtex
@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>