OpenLanguageModel: Readable and Composable Small-Language-Model Pretraining for Education and Research
Tavish Mankash, Vardhaman Kalloli, Keshava Prasad, Deepan Muthirayan
Abstract
OpenLanguageModel (OLM) is an open-source PyTorch library for building and pretraining small language models while keeping their machinery visible. In OLM, model code reads like the architecture: components are ordinary modules, while Block, Residual, Repeat, and Parallel describe how they are wired. The resulting model can move unchanged from a teaching notebook to a complete pretraining run or a research ablation. OLM connects this readable model layer to tokenizers, local and streaming datasets, optimization, mixed precision, callbacks, checkpoints, and hardware-aware CPU, single-GPU, and single-node multi-GPU execution. We demonstrate the full path by tracing GPT-2 from diagram to code, launching a FineWeb-Edu training script, replacing one attention component, and letting AutoTrainer configure the available machine. The package includes 27 presets across nine familiar model families and documentation that progresses from LM fundamentals to architecture research. Validation shows close agreement with independent reference implementations, 90.6% four-GPU weak-scaling efficiency for a 348M-parameter workload, compact architecture edits, and positive early usability results. OLM is MIT-licensed and available through PyPI, GitHub, and its documentation site.
Create a lesson
Metadata
- Categories
- cs.CL, cs.LG, cs.SE
- Comments
- 8 pages, 3 figures, and 1 table. Website: https://openlanguagemodel.github.io/openlanguagemodel/. Code: https://github.com/openlanguagemodel/openlanguagemodel
Related papers
When Skills Fail to Compose: Compatibility and Retention in Language Models
Shared title terminologycs.CLYan Lin, Zhongliang Guo, Jingyu Sun et al.
PlotTwist: A Creative Plot Generation Framework with Small Language Models
Shared title terminologycs.CLAbhinav Thorat, Ravi Kolla, Jyotin Goel et al.
JOR-Bench: Japanese Operations Research Benchmarks for Large Language Models
Shared title terminologycs.CLYuu Jinnai
DRBench Pro: A Knowledge-Centric Benchmark for Professional Deep Research Agents
Shared title terminologycs.CLHan Huang, Yuchen Yan, Xingyu Wu et al.
Repairing the Trustworthiness of Distilled Language Models
Shared title terminologycs.CLKumar Shubham, Devendra Vyas, Vidushi Agarwal et al.
The Linguistic Knowledge Benchmark: Do Language Models Know the Foundations of Early-Grade Literacy?
Shared title terminologycs.CLMaxime Lelièvre, Alasdair Mackintosh, Dominic Andrews et al.