Skip to main content

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-47K TPS 39-41%
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 with pytest -v src/test. You can also point pytest at a specific test file to run it individually.
  • We use isort and black 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, run make style-check.
  • We use ruff as our primary linter. You can run it with make lint-check.
  • We use mypy as our type checker. You can run it with make type-check.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ai2_olmo_core-1.1.0.tar.gz (125.5 kB view details)

Uploaded Source

Built Distribution

ai2_olmo_core-1.1.0-py3-none-any.whl (145.7 kB view details)

Uploaded Python 3

File details

Details for the file ai2_olmo_core-1.1.0.tar.gz.

File metadata

  • Download URL: ai2_olmo_core-1.1.0.tar.gz
  • Upload date:
  • Size: 125.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.15

File hashes

Hashes for ai2_olmo_core-1.1.0.tar.gz
Algorithm Hash digest
SHA256 c05010fc039d20f4b2d0fd8073b978cff2b44035b6cf2bb47f251106e6fe0341
MD5 21b4e4c06e0d8a3e6302cf6b39644857
BLAKE2b-256 44337b1f5ce7e981742f4dcd68f859da543ba750495ddb69e2c878d67bfb9fcd

See more details on using hashes here.

File details

Details for the file ai2_olmo_core-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ai2_olmo_core-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 34d3f37dc769617314425be2c0d2f0f2b62d9dd4a8f4ceed88e7c168f0939bb8
MD5 752dc61e6a751a38b02b13172497ec70
BLAKE2b-256 50129404bcd78c46f72d8b695932913667b5f052400bb546a40d711dade8ab0b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page