Text Generation
PEFT
Safetensors
English
forecasting
prediction
reinforcement-learning
grpo
lora
mixture-of-experts
politics
trump
future-as-label
Eval Results (legacy)
Instructions to use LightningRodLabs/Trump-Forecaster with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use LightningRodLabs/Trump-Forecaster with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("openai/gpt-oss-120b") model = PeftModel.from_pretrained(base_model, "LightningRodLabs/Trump-Forecaster") - Notebooks
- Google Colab
- Kaggle
Upload README.md with huggingface_hub
Browse files1 unmodified line234567831 unmodified lines404142434445466 unmodified lines535455565758596022 unmodified lines838485868788899091929394959697981 unmodified line1001011021031041051061071081091101111121131141151161171 unmodified linelanguage:- enlicense: apache-2.0library_name: transformerstags:- forecasting- prediction31 unmodified lines### RL-Tuned gpt-oss-120b for Predicting Trump Administration ActionsWe fine-tuned [gpt-oss-120b](https://huggingface.co/openai/gpt-oss-120b) with reinforcement learning to predict Trump administration actions. Trained on the [WWTD-2025](https://huggingface.co/datasets/LightningRodLabs/WWTD-2025) dataset of 2,108 binary forecasting questions generated with the [Lightning Rod SDK](https://github.com/lightning-rod-labs/lightningrod-python-sdk), the model beats GPT-5 on held-out forecasting questions.[Dataset](https://huggingface.co/datasets/LightningRodLabs/WWTD-2025) 路 [Lightning Rod SDK](https://github.com/lightning-rod-labs/lightningrod-python-sdk) 路 [Future-as-Label paper](https://arxiv.org/abs/2601.06336) 路 [Outcome-based RL paper](https://arxiv.org/abs/2505.17989)6 unmodified lines| Model | Brier (With Context) | BSS | Brier (No Context) | BSS | ECE (With Context) | ECE (No Context) ||-------|:---:|:---:|:---:|:---:|:---:|:---:|| GPT-5 | 0.200 | +0.14 | 0.258 | -0.11 | 0.091 | 0.191 || gpt-oss-120b | 0.213 | +0.08 | 0.260 | -0.12 | 0.111 | 0.190 || **gpt-oss-120b RL (this model)** | **0.194** | **+0.16** | **0.242** | **-0.04** | **0.079** | **0.164** |22 unmodified lines## Usage```pythonfrom transformers import AutoModelForCausalLM, AutoTokenizermodel = AutoModelForCausalLM.from_pretrained("LightningRodLabs/Trump-Forecaster",torch_dtype="auto",device_map="auto",trust_remote_code=True,)tokenizer = AutoTokenizer.from_pretrained("LightningRodLabs/Trump-Forecaster", trust_remote_code=True)prompt = """You are a forecasting expert. Given the question and context below, predict the probability that the answer is "Yes".1 unmodified lineRespond with your reasoning, then give your final answer as a probability between 0 and 1 inside <answer></answer> tags."""inputs = tokenizer(prompt, return_tensors="pt").to(model.device)outputs = model.generate(**inputs, max_new_tokens=4096, do_sample=True, temperature=0.7)print(tokenizer.decode(outputs[0], skip_special_tokens=True))```For faster inference with the MoE architecture, use [SGLang](https://github.com/sgl-project/sglang):```pythonimport sglang as sglengine = sgl.Engine(model_path="LightningRodLabs/Trump-Forecaster", trust_remote_code=True, dtype="bfloat16")output = engine.generate(prompt, sampling_params={"max_new_tokens": 4096, "stop": ["</answer>"]})```---1 unmodified line234567831 unmodified lines4041424344454647486 unmodified lines555657585960616222 unmodified lines8586878889909192939495969798991001011021031041051061071081091101111121131141151 unmodified line1171181191201211221231241251261271281291301311321331341351361371381391401411421 unmodified linelanguage:- enlicense: apache-2.0library_name: pefttags:- forecasting- prediction31 unmodified lines### RL-Tuned gpt-oss-120b for Predicting Trump Administration ActionsWe fine-tuned [gpt-oss-120b](https://huggingface.co/openai/gpt-oss-120b) with reinforcement learning to predict Trump administration actions. Trained on the [WWTD-2025](https://huggingface.co/datasets/LightningRodLabs/WWTD-2025) dataset of 2,108 binary forecasting questions generated with the [Lightning Rod SDK](https://github.com/lightning-rod-labs/lightningrod-python-sdk), Trump-Forecaster beats GPT-5 on held-out forecasting questions.This repo contains a **LoRA adapter** (5.3 GB) for gpt-oss-120b. A standalone `merge.py` script is included to produce a full merged model if needed.[Dataset](https://huggingface.co/datasets/LightningRodLabs/WWTD-2025) 路 [Lightning Rod SDK](https://github.com/lightning-rod-labs/lightningrod-python-sdk) 路 [Future-as-Label paper](https://arxiv.org/abs/2601.06336) 路 [Outcome-based RL paper](https://arxiv.org/abs/2505.17989)6 unmodified lines| Model | Brier (With Context) | BSS | Brier (No Context) | BSS | ECE (With Context) | ECE (No Context) ||-------|:---:|:---:|:---:|:---:|:---:|:---:|| GPT-5 | 0.200 | +0.14 | 0.258 | -0.11 | 0.091 | 0.191 || gpt-oss-120b (base) | 0.213 | +0.08 | 0.260 | -0.12 | 0.111 | 0.190 || **Trump-Forecaster** | **0.194** | **+0.16** | **0.242** | **-0.04** | **0.079** | **0.164** |22 unmodified lines## UsageThis repo contains a LoRA adapter trained with [Tinker](https://tinker.computer). The adapter uses Tinker's module naming convention, so it requires a merge step before inference. A standalone `merge.py` script is included.### Merge into full model```bashpip install torch transformers safetensors tqdm huggingface-hubpython merge.py --output ./trump-forecaster-merged```This downloads the base model (MXFP4, ~30 GB), dequantizes to bf16, applies the LoRA adapter, and saves the merged model (~300 GB bf16). Requires ~300 GB RAM, no GPU needed.### Inference with the merged modelWith [SGLang](https://github.com/sgl-project/sglang) (recommended for MoE):```pythonimport sglang as sglengine = sgl.Engine(model_path="./trump-forecaster-merged",tokenizer_path="openai/gpt-oss-120b",trust_remote_code=True,dtype="bfloat16",tp_size=2, # needs 2x 80GB GPUs for bf16)prompt = """You are a forecasting expert. Given the question and context below, predict the probability that the answer is "Yes".1 unmodified lineRespond with your reasoning, then give your final answer as a probability between 0 and 1 inside <answer></answer> tags."""output = engine.generate(prompt, sampling_params={"max_new_tokens": 4096, "stop": ["</answer>"]})print(output["text"])```Or with transformers:```pythonfrom transformers import AutoModelForCausalLM, AutoTokenizermodel = AutoModelForCausalLM.from_pretrained("./trump-forecaster-merged",torch_dtype="auto",device_map="auto",trust_remote_code=True,)tokenizer = AutoTokenizer.from_pretrained("openai/gpt-oss-120b", trust_remote_code=True)inputs = tokenizer(prompt, return_tensors="pt").to(model.device)outputs = model.generate(**inputs, max_new_tokens=4096, do_sample=True, temperature=0.7)print(tokenizer.decode(outputs[0], skip_special_tokens=True))```---
README.md+42-17