Skip to main content

Experience pipeline parallelism on your laptop. Naive, GPipe, 1F1B — one command.

Project description

pipenaut

Experience pipeline parallelism on your laptop. Naive, GPipe, 1F1B — one command.

No GPUs needed. No cluster setup. Just pip install and run.

Quick Start

pip install pipenaut

# Compare all 3 pipeline schedules
pipenaut compare --workers 4

# Run a single schedule
pipenaut run --schedule 1f1b --workers 4 --steps 20

# Learn about a schedule
pipenaut explain 1f1b

What is this?

Pipeline parallelism splits a neural network across multiple devices (or processes), with each device running one "stage" of the model. Data flows through the pipeline like an assembly line.

pipenaut lets you experience 3 classic pipeline schedules on your local CPU:

Schedule Strategy Bubble Overhead
Naive Forward all → Backward all (sequential) ~75%
GPipe Forward all chunks → Backward all chunks ~43%
1F1B Interleave forward and backward ~19%

Commands

pipenaut compare

Runs all 3 schedules and prints a side-by-side comparison with pipeline timelines and a results table.

pipenaut run

Run a single schedule with detailed output.

Flag Default Description
--schedule, -s 1f1b Schedule: naive, gpipe, 1f1b
--workers, -w 4 Number of pipeline stages
--steps 30 Training steps
--chunks, -c 8 Micro-batches
--batch-size 32 Batch size
--dim 128 Hidden dimension
--layers 16 Total model layers

pipenaut explain

Learn how a schedule works with ASCII diagrams and explanations.

pipenaut explain naive
pipenaut explain gpipe
pipenaut explain 1f1b

Requirements

  • Python >= 3.10
  • PyTorch >= 2.0
  • Works on macOS, Linux, and Windows
  • CPU only (CUDA used automatically if available)

License

MIT

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

pipenaut-0.1.1.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

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

pipenaut-0.1.1-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

Details for the file pipenaut-0.1.1.tar.gz.

File metadata

  • Download URL: pipenaut-0.1.1.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for pipenaut-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5b62f33cec824b359ec19707eaf2e69c0f7cb38e88c4ab66f158f4a5fc8127b7
MD5 2a345e1a73e56f90426defa4ffde75c8
BLAKE2b-256 6000d368148a7778bd86f239724cb8c4078044b4e8cca7488c663e46cd91c909

See more details on using hashes here.

File details

Details for the file pipenaut-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pipenaut-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 18.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for pipenaut-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1ab78d7c373dd2720fc414619a05730af7c8cefece9807ead936a70b62729679
MD5 2d260207145d1d2d1863588532c68d33
BLAKE2b-256 a60f52cb26872b1d951a7be463f35bba365a1f1ffd707ac4cd4b64f836274fb4

See more details on using hashes here.

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