A clean, modular framework for training large language models with modern PyTorch features
Project description
Optimus-DL
Optimus-DL is a modular, high-performance research framework for training Large Language Models (LLMs) and other deep learning models. It leverages modern PyTorch features (AMP, DDP, Compile) and a flexible, composition-based architecture.
Key Features
- Modular "Recipe" Architecture: Clean separation between model definitions, data pipelines, and training logic.
- Hydra-based Configuration: Hierarchical, type-safe, and easily conveniently override-able configurations.
- Universal Metrics System: Lazy evaluation and automatic distributed aggregation of metrics.
- Modern PyTorch: Built-in support for Mixed Precision (AMP), Distributed Data Parallel (DDP), and
torch.compile. - Registry System: easy dependency injection and component swapping via a centralized registry.
Quick Start
Installation
# Clone the repository
git clone <repository-url>
cd optimus-dl
# Install in editable mode with dependencies
pip install -e .
Training
Training is orchestrated via scripts/train.py using Hydra configs.
# Run with default configuration (Llama2 on TinyShakespeare)
python scripts/train.py
# Override specific parameters
python scripts/train.py model=gpt2 optimization.batch_size=64 common.use_gpu=true
Project Structure
optimus_dl/: Main package source code.core/: Fundamental utilities (logging, registry, device management).modules/: Pluggable components (models, optimizers, data loaders).recipe/: Orchestration logic (training loops, evaluation).
configs/: Hierarchical Hydra configuration files.scripts/: Entry points for training and evaluation.
Development
The project enforces strict code quality standards.
# Run tests
pytest
# Format code
black .
isort .
# Type check
mypy .
License
MIT License.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file optimus_dl-0.0.2.tar.gz.
File metadata
- Download URL: optimus_dl-0.0.2.tar.gz
- Upload date:
- Size: 116.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f0d0a46195d783f4bdf229585d2c26a6f8027621da1615d23c418ca4de5ef4b
|
|
| MD5 |
47475b5f616c396805acbe6b812bd806
|
|
| BLAKE2b-256 |
e2502304ff42700131c90d64b620d51707d76470e50002260b832739e00ec2ea
|
Provenance
The following attestation bundles were made for optimus_dl-0.0.2.tar.gz:
Publisher:
publish.yml on alexdremov/optimus-dl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
optimus_dl-0.0.2.tar.gz -
Subject digest:
6f0d0a46195d783f4bdf229585d2c26a6f8027621da1615d23c418ca4de5ef4b - Sigstore transparency entry: 774224619
- Sigstore integration time:
-
Permalink:
alexdremov/optimus-dl@1e15df521f47b28f20516d40adf563c5d7235ab3 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/alexdremov
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1e15df521f47b28f20516d40adf563c5d7235ab3 -
Trigger Event:
release
-
Statement type:
File details
Details for the file optimus_dl-0.0.2-py3-none-any.whl.
File metadata
- Download URL: optimus_dl-0.0.2-py3-none-any.whl
- Upload date:
- Size: 106.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4093d05f1e87fc6b2cc19f4e4d5712765f98eed52d055d6c0c28837d811b0663
|
|
| MD5 |
a6adbb7880b9b0198c957a40ce42cb5f
|
|
| BLAKE2b-256 |
282f3c66d71b8137cdd3aa6f32c63454292b632ee374c0511b0480214c9fbe1a
|
Provenance
The following attestation bundles were made for optimus_dl-0.0.2-py3-none-any.whl:
Publisher:
publish.yml on alexdremov/optimus-dl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
optimus_dl-0.0.2-py3-none-any.whl -
Subject digest:
4093d05f1e87fc6b2cc19f4e4d5712765f98eed52d055d6c0c28837d811b0663 - Sigstore transparency entry: 774224620
- Sigstore integration time:
-
Permalink:
alexdremov/optimus-dl@1e15df521f47b28f20516d40adf563c5d7235ab3 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/alexdremov
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1e15df521f47b28f20516d40adf563c5d7235ab3 -
Trigger Event:
release
-
Statement type: