SuperAPI AI Directory

pythia

Pythia is an open-source large language model suite and interpretability research project released by EleutherAI, aimed at studying how knowledge develops and evolves in autoregressive Transformers during training, combining interpretability analysis and scaling laws. The suite contains 8 model sizes, all trained on the same data in the same order, and provides 154 training checkpoints. All models, data, and code are public, supporting reproducible research. The project also hosts code and documentation for several related papers, such as "Emergent and Predictable Memorization in Large Language Models" and "PolyPythias." The models are hosted on Hugging Face and can be loaded via transformers. It is suitable for research on interpretability, learning dynamics, ethics, and transparency, and requires a certain level of technical ability.

Open website

About this tool

Pythia is an open-source project launched by EleutherAI that combines interpretability analysis and scaling laws to study how knowledge develops and evolves in autoregressive Transformers during training. Its core goal is to provide ready-made model suites for research on interpretability, learning dynamics, and ethics and transparency.

Main capabilities:

  • Provides a suite of models at 8 parameter scales, all trained on the Pile dataset (including a deduplicated version), with all models using exactly the same training data and order, and each model trained for about 300 billion tokens.
  • Each model provides 154 training checkpoints (including initialization, steps 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, and 1000, and then every 1000 steps thereafter), facilitating research on learning dynamics.
  • All models, data, and code are public, and the paper's results have been independently verified by at least one other laboratory.
  • Provides pre-tokenized data files and scripts to reconstruct the data loader used during training.
  • Models are hosted on Hugging Face and can be loaded via transformers; checkpoints in GPT-NeoX format are also provided.
  • The repository also serves as an information and code hub for several related papers, such as "Emergent and Predictable Memorization in Large Language Models" and "PolyPythias: Stability and Outliers across Fifty Language Model Pre-Training Runs."
  • Provides benchmark results (0-shot and 5-shot), covering datasets such as ARC, BLiMP, Lambada, LogiQA, MMLU, Wikitext, and Winogrande.

Usage:

  • Load models via Hugging Face, for example using transformers to load checkpoints such as pythia-70M-deduped.
  • Reproduce training: need to download the pre-tokenized training data (.bin and .idx files), the tokenizer, and configure the GPT-NeoX environment, then start training using the corresponding YAML file.
  • View the training data loader: use the utils/batch_viewer.py tool, which requires first downloading the pre-shuffled dataset and mergingthe shards.
  • Model conversion: use GPT-NeoX's tools/convert_to_hf.py to convert the weights to Hugging Face format.
  • Evaluation: use the LM Evaluation Harness to run benchmark tests, with results saved in the evals/pythia-v1/ directory.

Applicable scenarios:

  • Interpretability research on large language models.
  • Analysis of learning dynamics and the training process.
  • Causal intervention research on the impact of training data on model behavior.
  • Ethics, auditing, and compliance research.
  • Research on the impact of random seeds on model behavior (models trained with multiple random seeds are provided).

Limitations:

  • The model training data is the Pile dataset, which may contain sensitive or biased content.
  • Some benchmark tests use older evaluation tools and may not be reproducible in the current version.
  • Reproducing training requires substantial computational resources and storage, and the process is time-consuming.
  • Not all intermediate-step optimizer states are available for download; contact the authors.
  • Specific fees, prices, platforms, or commercial use terms are not yet provided.