Skip to main content

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


Download files

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

Source Distribution

optimus_dl-0.0.2.tar.gz (116.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

optimus_dl-0.0.2-py3-none-any.whl (106.5 kB view details)

Uploaded Python 3

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

Hashes for optimus_dl-0.0.2.tar.gz
Algorithm Hash digest
SHA256 6f0d0a46195d783f4bdf229585d2c26a6f8027621da1615d23c418ca4de5ef4b
MD5 47475b5f616c396805acbe6b812bd806
BLAKE2b-256 e2502304ff42700131c90d64b620d51707d76470e50002260b832739e00ec2ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for optimus_dl-0.0.2.tar.gz:

Publisher: publish.yml on alexdremov/optimus-dl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for optimus_dl-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4093d05f1e87fc6b2cc19f4e4d5712765f98eed52d055d6c0c28837d811b0663
MD5 a6adbb7880b9b0198c957a40ce42cb5f
BLAKE2b-256 282f3c66d71b8137cdd3aa6f32c63454292b632ee374c0511b0480214c9fbe1a

See more details on using hashes here.

Provenance

The following attestation bundles were made for optimus_dl-0.0.2-py3-none-any.whl:

Publisher: publish.yml on alexdremov/optimus-dl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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