Instructions to use EleutherAI/pythia-6.9b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use EleutherAI/pythia-6.9b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="EleutherAI/pythia-6.9b")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("EleutherAI/pythia-6.9b") model = AutoModelForCausalLM.from_pretrained("EleutherAI/pythia-6.9b") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use EleutherAI/pythia-6.9b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "EleutherAI/pythia-6.9b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "EleutherAI/pythia-6.9b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/EleutherAI/pythia-6.9b
- SGLang
How to use EleutherAI/pythia-6.9b 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 "EleutherAI/pythia-6.9b" \ --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": "EleutherAI/pythia-6.9b", "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 "EleutherAI/pythia-6.9b" \ --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": "EleutherAI/pythia-6.9b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use EleutherAI/pythia-6.9b with Docker Model Runner:
docker model run hf.co/EleutherAI/pythia-6.9b
Confidence Cartography — using Pythia's token probabilities as a false-belief sensor
Hi — I recently published a preprint and pip-installable toolkit that uses teacher-forced confidence extraction on causal LMs, with Pythia as the primary model family.
The finding: The ratio of Pythia's token-level confidence on widely-believed falsehoods vs. correct versions correlates with human false-belief prevalence from a YouGov survey (Spearman ρ = 0.652, p = 0.016 at 6.9B). The effect scales monotonically from 160M through 12B. It also detects medical misinformation at 88% accuracy at the 6.9B scale.
The full Pythia scaling curve (160M → 12B) is in the paper — every model size in the suite was tested.
Reproduce in 3 lines:
import confidence_cartography as cc
results = cc.evaluate_mandela_effect("EleutherAI/pythia-6.9b")
print(results)
# MandelaEvaluation(rho=0.652, p=0.016, n=9)
Links:
- Toolkit: confidence-cartography-toolkit
- Paper + full experiments: confidence-cartography
- Preprint: DOI: 10.5281/zenodo.18703506
- HuggingFace model card: bsanch52/confidence-cartography
Pythia was the ideal model family for this work because of the consistent architecture across scales and the deduped training data. Thanks to the EleutherAI team for making these models available.