Skip to main content

No project description provided

Project description

dlcalc

PyPI version checks

random command line tools for deep learning

Installation

pip install dlcalc

or

git clone https://github.com/jfc4050/dlcalc
cd dlcalc
pip install -e .

After this you should have access to the command line tools described below. Some people may need to add --user to their pip install command for them to properly go under $PATH.

Tools

Performance Modeling

3D Training Calculator

Calculator for estimating various performance characteristics of 3D parallel transformer model training:

  • memory consumption
  • pipeline bubble
  • communication overhead
  • compute intensity
  • etc..

This calculator is focused primarily on pretraining, so you won't find calculations for things like LoRA or RLHF/DPO/etc.

For more details run:

3dtrn -h

We've include a sample config you can use to see what the output looks like:

3dtrn examples/llama3_70b.yaml

We recommend pairing this with a profiler of your choice (NVIDIA Nsight Systems and PyTorch Profiler Traces are two good ones), and checking that what you see in the profiler is in the same ballpark as the theoretical values estimated by the calculator. If they are way off, you now know where to spend your investigation/debugging time.

NOTE: If you look at the sample config, you'll see that it takes an instance type which is used to derive various hardware specifications like intra/inter node bandwidth, theoretical FLOPS per device, number of accelerators per node, etc. You can check hardware.py to see what instance types are supported, you'll have to add it there if the instance type you're interested in isn't represented.

Topology

Topology Visualizer

Given a kubernetes pod name prefix for some compute cluster, retrieve AWS network topology info and plot. For more details run:

topoviz -h

Topology Evaluator

Evaluates how optimal a given training job's physical topology is (in terms of network hops in each DP ring). For more details run:

topoeval -h

Topology-Aware Scheduler

Topology-aware instance selection and rank assignment for maximally efficient DP communication. For more details run:

topoassign -h

KPIs

Samples/Sec -> Tokens/Day Converter

Pretty self explanatory, for more details run:

sps2tpd -h

Samples/Sec -> MFU Converter

If you're not familiar with what Model Flops Utilization (MFU) means, refer to Google's PaLM paper. Otherwise pretty self explanatory, for more details run:

sps2mfu -h

Misc.

Checkpoint Summarizer

Gives a human-readable summarization of keys, values, and tensor shapes in a given (PyTorch) model checkpoint. For more details run:

ckpt-summarize -h

Development

install development dependencies

pip install -e .[dev]

static checks can be run with

bash checks

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

dlcalc-0.1.10.tar.gz (42.2 kB view details)

Uploaded Source

Built Distribution

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

dlcalc-0.1.10-py3-none-any.whl (35.7 kB view details)

Uploaded Python 3

File details

Details for the file dlcalc-0.1.10.tar.gz.

File metadata

  • Download URL: dlcalc-0.1.10.tar.gz
  • Upload date:
  • Size: 42.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for dlcalc-0.1.10.tar.gz
Algorithm Hash digest
SHA256 796094bc052d2a41230946b8d8dfbe8d6385dc8291b3e6161b05e3ac9b488198
MD5 a87d4aa636630972861deaa458759c18
BLAKE2b-256 fdfe69a1a90de4b22c56ee63a89b58c46baf4c556de1133c6785d84d9566712e

See more details on using hashes here.

Provenance

The following attestation bundles were made for dlcalc-0.1.10.tar.gz:

Publisher: pypi-publish.yml on jfc4050/dlcalc

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

File details

Details for the file dlcalc-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: dlcalc-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 35.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for dlcalc-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 6eb0341bf942eba396f8c1818b6b9879b4d95b8e8af710ebafa52fca56504363
MD5 67a722037f32367666e6e57432089bfc
BLAKE2b-256 04a2ed8c11b68c463f0d56335be64f525d18ab4a09ff10172e293ed946981878

See more details on using hashes here.

Provenance

The following attestation bundles were made for dlcalc-0.1.10-py3-none-any.whl:

Publisher: pypi-publish.yml on jfc4050/dlcalc

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