TLDR: Pico is a new modular framework, consisting of pico-train and pico-analyze, designed to enable systematic, hypothesis-driven research for small and medium-scale language models. It provides a lightweight training environment with detailed logging of model states, activations, and gradients, coupled with a flexible analysis toolkit to study learning dynamics. This allows researchers to make targeted architectural or training changes, observe their effects, and iterate on ideas in a reproducible manner, supported by open-sourced baseline models.
Developing language models, especially those of small and medium size, often feels more like an art than a precise science. While massive language models frequently improve simply by increasing their scale, the reasons behind many design choices remain unclear. This uncertainty is particularly challenging for smaller language models (SLMs), where tight resource budgets make every decision crucial. Researchers have long needed a more systematic and scientific way to test and refine new ideas in this domain.
Enter Pico, a new lightweight and modular framework designed to bring systematic, hypothesis-driven research to the development of small and medium-scale language models. Pico is not just a single tool; it’s a comprehensive ecosystem comprising two main libraries: pico-train and pico-analyze. Together, these libraries create a practical environment where researchers can make specific changes to a model’s architecture or training procedures and directly observe the impact on its behavior.
Pico-Train: A Clear Path for Model Training
The first component, pico-train, offers a minimalist and transparent training loop for language models. Unlike many existing training libraries that prioritize raw efficiency, pico-train focuses on simplicity, modularity, and ease of modification. This makes it an incredibly flexible foundation for experimental language model research.
Out of the box, pico-train implements ‘pico-decoder’, a transformer model inspired by LLaMA, incorporating modern features like Grouped Query Attention (GQA), Rotary Position Embeddings (RoPE), FlashAttention, SwiGLU activations, and RMSNorm. Most of these components are re-implemented from scratch in plain PyTorch, emphasizing readability and clear documentation. For efficient multi-GPU and distributed training, pico-train is built on Lightning Fabric, ensuring scalability without unnecessary complexity.
A standout feature of pico-train is its systematic checkpointing and version control system. It automatically saves model states in both PyTorch- and Hugging Face-compatible formats, allowing for easy integration into existing pipelines. Crucially, it also captures intermediate activations and gradients at user-defined intervals, providing a granular record of how representations and gradient flows evolve during training. Additionally, it saves the training data batch used for these captures and records evaluation results, all of which are automatically uploaded and version-controlled on Hugging Face. This detailed logging is essential for reproducible, hypothesis-driven research.
To further simplify experimentation, Pico also provides a pre-tokenized, pre-chunked, and pre-shuffled version of the Dolma dataset, called ‘pretokenized-dolma’, on Hugging Face. This removes preprocessing overhead and ensures consistency across different experimental runs.
Pico-Analyze: Unpacking Learning Dynamics
Complementing pico-train is pico-analyze, a general-purpose framework designed to make the analysis of learning dynamics seamless and reproducible. It directly integrates with the detailed checkpoints saved by pico-train, allowing researchers to compute various learning dynamics metrics on trained models.
At its core, pico-analyze applies ‘metrics’ to ‘components’. Metrics offer quantitative insights into model behavior, while components define the specific model elements being analyzed. This flexible design allows for fine-grained analysis. Built-in metrics include sparsity measures (Gini coefficient, Hoyer metric), rank-based metrics (Proportional Effective Rank, Condition Number), representation similarity measures (CKA, PWCCA), and various norms (Frobenius, Nuclear, Infinity). These can be computed on simple components like individual weight matrices or activations, or on compound components like the OV circuit in transformer models.
This two-step abstraction is highly extensible, meaning new metrics and component types can be easily defined, allowing researchers to tailor analyses to specific hypotheses about how language models learn.
Real-World Applications: Case Studies
The research paper highlights Pico’s utility through two case studies: Model-Agnostic Meta-Learning (MAML) and ReLoRA. In the MAML case, Pico helped researchers understand why MAML improved performance, revealing cycles of compression and recovery in the model’s capacity. For ReLoRA, Pico uncovered that repeated low-rank resets led to gradient instability, explaining its unexpected underperformance. In both cases, Pico’s modular training and built-in logging allowed for rapid hypothesis testing and systematic iteration on design choices.
Also Read:
- Improving LLM Problem Solving with Guided Pivotal Optimization
- Tracking the Internal Development of Language Models
Pico Model Suite and Future Directions
To support controlled experiments and comparative studies, the researchers have open-sourced a suite of ‘pico-decoder’ baseline models on Hugging Face, ranging from 11M to 570M parameters. These models, trained under standardized conditions, offer a consistent starting point for evaluating new ideas and scaling laws. Despite being trained on academic-level compute budgets, these models achieve comparable results to established models like Pythia and OPT.
Pico is designed for interpretability and experimentation rather than large-scale production training, acknowledging that the overhead of detailed checkpointing can increase storage and computational costs. However, its focus on transparent training, detailed in-situ logging, and flexible analysis provides a powerful sandbox for advancing hypothesis-driven research in small and medium language model development.
For more in-depth technical details, you can refer to the original research paper: A Modular Framework for Hypothesis-Driven Small Language Model Research.


