Skip to main content

Estimate performance, energy, cost, and break-even tradeoffs for pruning coding LLM deployments.

Project description

Atropos

Atropos estimates whether pruning and related optimizations for a coding LLM are worth the engineering effort.

📚 Documentation PyPI version Python versions

Named after the Fate who cuts the thread, Atropos is built for practical deployment questions:

  • How much memory, throughput, energy, and cost improvement is realistic?
  • When does a pruning project break even?
  • How do pruning-only and pruning-plus-quantization compare?
  • Which deployment scenarios justify optimization work?

Atropos Pipeline automates the full workflow—assess, prune, fine-tune, validate, and deploy—only when the math shows it's worth doing.

What's included

  • Python package and CLI
  • built-in scenario presets
  • pruning and quantization strategy composition
  • validation and error handling
  • comparison, batch, and sensitivity-analysis commands
  • Monte Carlo uncertainty analysis
  • CSV-to-markdown report generation
  • markdown / HTML / JSON reporting
  • web dashboard for interactive exploration
  • telemetry collection from vLLM/TGI/Triton inference servers
  • model testing suite for HuggingFace Hub compatibility
  • pruning framework integrations (LLM-Pruner, Wanda, SparseGPT)
  • calibration against real performance metrics
  • Atropos Pipeline for automated optimization
  • tests, CI workflows, pre-commit config, and Makefile

Installation

PyPI (stable release)

pip install atropos-llm

Development installation

python -m venv .venv
source .venv/bin/activate
pip install -e .[dev]

See CHANGELOG.md for version history and release notes.

Pruning Framework Setup

Atropos includes integrations with pruning frameworks (LLM-Pruner, Wanda, SparseGPT) via the external/ submodule.

Wanda Pruning

The external/wanda submodule requires specific dependency versions that may conflict with Atropos' main dependencies. For pruning experiments, you can install these dependencies using the setup script:

python scripts/setup_wanda.py

Alternatively, use the Makefile target: make setup-wanda.

Or install manually following external/wanda/INSTALL.md. Consider using a separate environment.

Other Frameworks

LLM-Pruner and SparseGPT dependencies are included in the main pyproject.toml.

Quick start

Run a preset:

atropos-llm preset medium-coder --strategy structured_pruning --report text

Add quantization:

atropos-llm preset medium-coder --strategy structured_pruning --with-quantization --report text

Use a YAML scenario:

atropos-llm scenario examples/medium_coder.yaml --report json

Compare strategies:

atropos-llm compare medium-coder --strategies mild_pruning structured_pruning --format markdown

Sort comparison by break-even time:

atropos-llm compare medium-coder --strategies mild_pruning structured_pruning --sort-by breakeven --ascending

Batch process a directory of scenarios:

atropos-llm batch examples --strategies mild_pruning structured_pruning --output results.csv

Run sensitivity analysis and export to JSON:

atropos-llm sensitivity medium-coder --strategy structured_pruning --param memory_reduction_fraction --format json --output sensitivity.json

Convert CSV results to markdown report:

atropos-llm csv-to-markdown results.csv --output report.md

Launch the web dashboard:

atropos-llm dashboard --port 8050

Collect telemetry from a running inference server:

atropos-llm collect-telemetry --server-type vllm --url http://localhost:8000 \
    --duration 60 --output telemetry.json --create-scenario

Test HuggingFace models for compatibility:

atropos-llm test-models --device cuda --max-params 3.0 --catalog models.yaml

Validate projections against a real model:

atropos-llm validate medium-coder --model gpt2 --device cuda

Run the automated optimization pipeline:

atropos-llm pipeline medium-coder --config pipeline.yaml --strategy structured_pruning

Strategy model

Built-in strategies intentionally stay conservative:

  • mild_pruning
  • structured_pruning
  • hardware_aware_pruning

Quantization is modeled as a composable bonus via --with-quantization rather than a hardcoded combined preset.

YAML scenario format

name: medium-coder
parameters_b: 34
memory_gb: 14
throughput_toks_per_sec: 40
power_watts: 320
requests_per_day: 50000
tokens_per_request: 1200
electricity_cost_per_kwh: 0.15
annual_hardware_cost_usd: 24000
one_time_project_cost_usd: 27000

Development

make install
make lint
make typecheck
make test

Notes on the model

Atropos is a planning tool, not a training or pruning framework. It uses transparent formulas to estimate:

  • memory footprint changes
  • throughput and latency changes
  • power and energy per request
  • annual cost and CO2e savings
  • break-even time for one-time project cost

The default hardware cost model assumes only part of memory reduction translates into hardware savings. That factor is configurable in AtroposConfig.

Atropos Pipeline

The Pipeline automates the full optimization workflow:

  1. Assessment — Run Atropos analysis on your deployment scenario
  2. Decision gate — Automatically proceed only if projected savings exceed threshold
  3. Pruning execution — Trigger structured pruning via integration with pruning frameworks (LLM-Pruner, Wanda, SparseGPT)
  4. Fine-tuning — Run recovery fine-tuning to restore quality
  5. Validation — Benchmark the optimized model and verify metrics match projections
  6. Deployment — Deploy if validation passes; rollback if not

This closes the loop from estimation to automated execution, only applying optimizations when Atropos predicts they are worthwhile.

Pipeline configuration

pipeline:
  name: my-optimization-pipeline
  auto_execute: true
  thresholds:
    max_break_even_months: 12
    min_annual_savings_usd: 10000
    max_quality_risk: medium
  pruning:
    framework: llm-pruner
    target_sparsity: 0.30
  validation:
    tolerance_percent: 10
    quality_benchmark: humaneval

Run the pipeline:

atropos-llm pipeline medium-coder --config pipeline.yaml

Documentation

See ROADMAP.md for upcoming features and active experiments.

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

atropos_llm-0.4.0.tar.gz (118.2 kB view details)

Uploaded Source

Built Distribution

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

atropos_llm-0.4.0-py3-none-any.whl (93.3 kB view details)

Uploaded Python 3

File details

Details for the file atropos_llm-0.4.0.tar.gz.

File metadata

  • Download URL: atropos_llm-0.4.0.tar.gz
  • Upload date:
  • Size: 118.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for atropos_llm-0.4.0.tar.gz
Algorithm Hash digest
SHA256 da5a8083a9e677cbfffdd6525375742093ebdcf3a39019b88e1c45aa6a806f4b
MD5 a9b8ff1690a7126f28a998c2ddfec372
BLAKE2b-256 ac860c1680478e7ab6e2ab74be07bb77cc6c58998782fcd89ce8be3300a85f13

See more details on using hashes here.

Provenance

The following attestation bundles were made for atropos_llm-0.4.0.tar.gz:

Publisher: release.yml on its-not-rocket-science/atropos

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

File details

Details for the file atropos_llm-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: atropos_llm-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 93.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for atropos_llm-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0384a25cc00f2010ed9e40dc83974405861dadc0de493da7aac73735ab7a1949
MD5 8c5301ff243881793389f8b27ad1a8d3
BLAKE2b-256 86dff5b9b28e5c596466e0252f902b2a27340cfc3c8819f8be1710ed69b38967

See more details on using hashes here.

Provenance

The following attestation bundles were made for atropos_llm-0.4.0-py3-none-any.whl:

Publisher: release.yml on its-not-rocket-science/atropos

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