Instructions to use 71821Nikki/TrumpGeneration with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 71821Nikki/TrumpGeneration with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="71821Nikki/TrumpGeneration")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("71821Nikki/TrumpGeneration") model = AutoModelForCausalLM.from_pretrained("71821Nikki/TrumpGeneration") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use 71821Nikki/TrumpGeneration with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "71821Nikki/TrumpGeneration" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "71821Nikki/TrumpGeneration", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/71821Nikki/TrumpGeneration
- SGLang
How to use 71821Nikki/TrumpGeneration with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "71821Nikki/TrumpGeneration" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "71821Nikki/TrumpGeneration", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "71821Nikki/TrumpGeneration" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "71821Nikki/TrumpGeneration", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use 71821Nikki/TrumpGeneration with Docker Model Runner:
docker model run hf.co/71821Nikki/TrumpGeneration
๐ง TrumpGeneration
TrumpGeneration is a fine-tuned version of OpenAI's GPT-2, trained on the speeches of Donald J. Trump. This model is designed to generate text in Trump's distinctive rhetorical style โ bold, direct, and uniquely expressive.
๐ Model Card
- Model Name:
TrumpGeneration - Base Model:
gpt2 - Author: @71821Nikki
- License: MIT
- Intended Use: Text generation
- Not intended for: Factual Q&A, neutral summarization, or sensitive applications
๐ Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("71821Nikki/TrumpGeneration")
model = AutoModelForCausalLM.from_pretrained("71821Nikki/TrumpGeneration")
prompt = "The American people"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(
**inputs,
max_length=100,
do_sample=True,
top_k=50,
top_p=0.95,
temperature=0.9
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
๐ฌ Example Output
The American people are stronger than ever before. We've created more jobs, lowered taxes, and taken care of our veterans like nobody else. We're bringing back common sense, we're bringing back greatness โ and we're never going to stop. Believe me.
โ ๏ธ Disclaimer
This model may generate biased, exaggerated, or politically charged content. It reflects the tone and rhetoric of Donald Trump's public speaking and is intended for educational and creative use only. Use responsibly.
๐ Acknowledgements
- Built using Hugging Face Transformers
- Base model: OpenAI GPT-2
- Trained and released by @71821Nikki
- Downloads last month
- 3