Instructions to use LForster/epoch_powell_135M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LForster/epoch_powell_135M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LForster/epoch_powell_135M")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("LForster/epoch_powell_135M", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use LForster/epoch_powell_135M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LForster/epoch_powell_135M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LForster/epoch_powell_135M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/LForster/epoch_powell_135M
- SGLang
How to use LForster/epoch_powell_135M 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 "LForster/epoch_powell_135M" \ --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": "LForster/epoch_powell_135M", "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 "LForster/epoch_powell_135M" \ --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": "LForster/epoch_powell_135M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use LForster/epoch_powell_135M with Docker Model Runner:
docker model run hf.co/LForster/epoch_powell_135M
Enoch Powell GPT
A small language model fine-tuned to speak as Enoch Powell in UK Parliamentary debate.
Model Details
- Architecture: GPT (12-layer, 768-dim, 12-head) — ~125M parameters
- Base model: Pretrained from scratch on the full UK Hansard corpus (~51K parliamentary documents)
- Fine-tuning: Supervised fine-tuning on 2,452 Enoch Powell question-answer pairs extracted from Hansard
- Tokenizer: Custom BPE tokenizer trained on Hansard text
- Context length: 2048 tokens
Training Pipeline
- Pretraining: Base language model trained on all UK Hansard records (parliamentary debates, questions, speeches). This gives the model fluency in parliamentary English.
- SFT: Fine-tuned on Enoch Powell's speeches using chat-format supervision. Training pairs are either direct Q&A exchanges from Hansard, or Powell's speeches paired with the debate topic heading as a question prompt.
SFT Details
| Metric | Value |
|---|---|
| Training conversations | 2,452 |
| Validation conversations | 129 |
| Supervised tokens | ~355K |
| Best validation loss | 2.40 |
| Optimizer | Muon + AdamW |
| Weight decay | 0.1 |
| LR schedule | Cosine with 10% warmup |
| Epochs | 2 |
| Early stopping | Yes (best val loss checkpoint) |
Usage
python -m scripts.chat_cli \
--checkpoint-dir <path-to-checkpoint> \
--device-type cuda \
--dtype bfloat16 \
--prompt "What is your view on immigration?"
Intended Use
This model is a research project and historical curiosity. It generates text in the style of Enoch Powell's parliamentary contributions as recorded in Hansard. It is not intended to accurately represent Powell's views, produce factually correct statements, or serve as a reference for his political positions.
Limitations
- Small model: 125M parameters. Responses can drift off-topic or become repetitive, especially for longer generations.
- Parliamentary register only: Trained exclusively on Hansard, so the model speaks in formal parliamentary English. It does not reproduce Powell's non-parliamentary writing or speeches (e.g. the "Rivers of Blood" speech is not in the training data).
- Not factually grounded: The model generates plausible-sounding parliamentary text but may attribute incorrect statements, cite nonexistent debates, or confuse procedural details.
- Historical bias: The training data reflects the language and attitudes of mid-20th century British parliamentary debate.
Dataset
Training data is sourced from common-pile/uk_hansard on HuggingFace. Powell's contributions are identified by speaker attribution regex matching and paired with either the preceding question or the debate topic heading.