Instructions to use emergent-wisdom/thl-llama-3.3-70b-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use emergent-wisdom/thl-llama-3.3-70b-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/llama-3.3-70b-instruct-bnb-4bit") model = PeftModel.from_pretrained(base_model, "emergent-wisdom/thl-llama-3.3-70b-lora") - Transformers
How to use emergent-wisdom/thl-llama-3.3-70b-lora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="emergent-wisdom/thl-llama-3.3-70b-lora") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("emergent-wisdom/thl-llama-3.3-70b-lora", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use emergent-wisdom/thl-llama-3.3-70b-lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "emergent-wisdom/thl-llama-3.3-70b-lora" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "emergent-wisdom/thl-llama-3.3-70b-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/emergent-wisdom/thl-llama-3.3-70b-lora
- SGLang
How to use emergent-wisdom/thl-llama-3.3-70b-lora 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 "emergent-wisdom/thl-llama-3.3-70b-lora" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "emergent-wisdom/thl-llama-3.3-70b-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "emergent-wisdom/thl-llama-3.3-70b-lora" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "emergent-wisdom/thl-llama-3.3-70b-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use emergent-wisdom/thl-llama-3.3-70b-lora with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for emergent-wisdom/thl-llama-3.3-70b-lora to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for emergent-wisdom/thl-llama-3.3-70b-lora to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for emergent-wisdom/thl-llama-3.3-70b-lora to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="emergent-wisdom/thl-llama-3.3-70b-lora", max_seq_length=2048, ) - Docker Model Runner
How to use emergent-wisdom/thl-llama-3.3-70b-lora with Docker Model Runner:
docker model run hf.co/emergent-wisdom/thl-llama-3.3-70b-lora
THL-Llama-3.3-70B-LoRA
A LoRA adapter for Llama-3.3-70B-Instruct trained using Temporal Hindsight Learning (THL) — a framework that converts raw historical logs into high-quality reasoning supervision by having a Teacher model generate "ideal prediction" traces using hindsight.
Paper: Temporal Hindsight Learning: Training Calibrated Reasoners with Future Oracles
Key Result
The THL Student (this model) achieves accuracy parity with its Teacher (Gemini 3 Flash, a ~1T frontier model) on genuinely unseen February–May 2025 events (Mann-Whitney U, p=0.97), while significantly outperforming the untrained base model (p<0.001). A 70B model trained on 505 reasoning traces matches a model with an order of magnitude more parameters.
Model Details
- Base model:
meta-llama/Llama-3.3-70B-Instruct(4-bit quantized via Unsloth) - Adapter: LoRA (rank 16, alpha 16) targeting all linear modules (q, k, v, o, gate, up, down projections)
- Quantization: 4-bit NF4 via QLoRA
- Knowledge cutoff: December 2023 (base model)
- Developed by: Henrik Westerberg / Emergent Wisdom
- License: MIT
Training
- Method: Supervised fine-tuning on Teacher-generated "Ideal Prediction" reasoning traces
- Teacher: Gemini 3 Flash Preview (knowledge cutoff: January 2025)
- Training data: 505 reasoning traces across 106 global events from January–December 2024
- Reasoning structure: Each trace follows the Forecasting Pentagon — five angles (Structural/Mechanism, Economic/Incentives, Political/Social, Base Rates/Precedents, Temporal/Pacing)
- Hardware: NVIDIA T4 on Google Colab Free Tier
- Framework: Unsloth + PEFT 0.18.1
Evaluation
Evaluated on 15 genuinely unseen events from February–May 2025 (75 exam prompts across all five Pentagon angles). Scored by Claude Opus 4.6 (independent Auditor from a different model family than the Teacher).
| Model | Role | Median Score | vs Base |
|---|---|---|---|
| Base Llama-3.3 | Frozen (Dec 2023) | Lower | — |
| THL Student | Trained on 2024 | Higher | p<0.001 |
| Gemini 3 Flash | Teacher baseline | Comparable | p=0.97 vs THL |
Usage
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base_model = AutoModelForCausalLM.from_pretrained(
"meta-llama/Llama-3.3-70B-Instruct",
load_in_4bit=True,
)
model = PeftModel.from_pretrained(base_model, "emergent-wisdom/thl-llama-3.3-70b-lora")
tokenizer = AutoTokenizer.from_pretrained("emergent-wisdom/thl-llama-3.3-70b-lora")
Reasoning Format
The model produces structured reasoning traces:
**What I know from the context:**
[Analysis of provided context clues]
**What I know from my training (pre-2024):**
[Relevant pre-cutoff knowledge]
**Causal Analysis:**
[Step-by-step causal reasoning]
**My Prediction:**
[Calibrated prediction with probability estimates]
Citation
@misc{westerberg2026thl,
author = {Westerberg, Henrik},
title = {Temporal Hindsight Learning: Training Calibrated Reasoners with Future Oracles},
year = {2026},
publisher = {Emergent Wisdom}
}
Repository
- Code & data: emergent-wisdom/temporal-hindsight-learning
- Website: emergentwisdom.org
- Downloads last month
- 2