Core training module for the Open Language Model (OLMo)
Project description
OLMo-core
Building blocks for OLMo modeling and training
Examples || Docs || PyPI || Beaker Images || License || Changelog
Installation
First install PyTorch according to the instructions specific to your operating system. Then you can install from PyPI with:
pip install ai2-olmo-core
Official training scripts
Official training scripts for various model sizes can be found in src/scripts/train/
. Throughput numbers are reported below.
Model size | Context Length | Script | Throughput[^1] | MFU |
---|---|---|---|---|
1B | 4K | OLMo-1B.py |
45-46K TPS | 39-40% |
7B | 4K | OLMo-7B.py |
9.7-10K TPS | 47-48% |
13B | 4K | OLMo-13B.py |
4.4-4.6K TPS | 41-42% |
[^1]: Throughput numbers reported in tokens per second per device, measured on a cluster of H100 GPUs.
Development
After cloning OLMo-core and setting up a Python virtual environment, install the codebase from source with:
pip install -e .[all]
The Python library source code is located in src/olmo_core
. The corresponding tests are located in src/test
. The library docs are located in docs
. You can build the docs locally with make docs
.
Code checks:
- We use
pytest
to run tests. You can run all tests withpytest -v src/test
. You can also pointpytest
at a specific test file to run it individually. - We use
isort
andblack
for code formatting. Ideally you should integrate these into your editor, but you can also run them manually or configure them with a pre-commit hook. To validate that all files are formatted correctly, runmake style-check
. - We use
ruff
as our primary linter. You can run it withmake lint-check
. - We use
mypy
as our type checker. You can run it withmake type-check
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for ai2_olmo_core-1.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ed6d9c04097890cf53b843b83f2e7e94ed5337365f41c5e0b0289b4e5070657 |
|
MD5 | bc54efe56e58ed56b954d9750e4bd4a9 |
|
BLAKE2b-256 | 6546b4e79dd699adfaa0b4bb11f78051e58d785360e15aeb19777329c0c5f8c2 |