Metadata-Version: 2.4
Name: aisim
Version: 0.14.0b1
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Information Technology
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Dist: chex==0.1.87
Requires-Dist: flax==0.10.0
Requires-Dist: google-vizier[jax]==0.1.21
Requires-Dist: googleapis-common-protos<1.75.4
Requires-Dist: jinja2>=3.1.0
Requires-Dist: jax==0.4.38
Requires-Dist: jaxlib==0.4.38
Requires-Dist: packaging>=20.0
Requires-Dist: matplotlib>=3.9.4
Requires-Dist: numpy>=2.1,<3
Requires-Dist: pandas>=2.2.3
Requires-Dist: plotext>=5.3.2,<6
Requires-Dist: plotly>=6.0.1
Requires-Dist: prettytable>=3.16.0
Requires-Dist: pydantic>=2.5
Requires-Dist: psutil>=7.0,<8
Requires-Dist: ijson>=3.4,<4
Requires-Dist: pyarrow>=15.0.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: scipy>=1.13.1
Requires-Dist: tqdm>=4.0.0
Requires-Dist: bokeh
Requires-Dist: nvidia-ml-py
Requires-Dist: munch>=4.0.0
Requires-Dist: optax==0.2.4
Requires-Dist: tfp-nightly[jax]==0.26.0.dev20260626
Requires-Dist: uv ; extra == 'dev'
Requires-Dist: ruff==0.14.1 ; extra == 'dev'
Requires-Dist: pre-commit==4.3.0 ; extra == 'dev'
Requires-Dist: pytest>=9.0.3,<9.2 ; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.26.0 ; extra == 'dev'
Requires-Dist: pytest-cov>=6.1.1 ; extra == 'dev'
Requires-Dist: pytest-md-report==0.8.0 ; extra == 'dev'
Requires-Dist: pytest-mock>=3.14.0 ; extra == 'dev'
Requires-Dist: pytest-split>=0.10.0 ; extra == 'dev'
Requires-Dist: pytest-timeout>=2.3.1 ; extra == 'dev'
Requires-Dist: pytest-xdist==3.8.0 ; extra == 'dev'
Requires-Dist: import-ipynb==0.2 ; extra == 'dev'
Requires-Dist: jsonschema>=4.23 ; extra == 'dev'
Requires-Dist: msgspec>=0.18 ; extra == 'dev'
Requires-Dist: scikit-learn>=1.4 ; extra == 'learned'
Requires-Dist: fastapi>=0.115.12 ; extra == 'service'
Requires-Dist: orjson>=3.10.16 ; extra == 'service'
Requires-Dist: uvicorn>=0.34.2 ; extra == 'service'
Provides-Extra: dev
Provides-Extra: learned
Provides-Extra: service
License-File: LICENSE
License-File: THIRD_PARTY_NOTICES.md
Summary: AISim: GPU-free inference simulation and deployment configuration
Keywords: decode,distributed,dynamo,gpu,inference,llm,nvidia,prefill
Home-Page: https://github.com/ai-dynamo/aisim
Author-email: "NVIDIA Inc." <sw-dl-dynamo@nvidia.com>
License-Expression: Apache-2.0
Requires-Python: >=3.11, <3.14
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: GitHub, https://github.com/ai-dynamo/aisim
Project-URL: Repository, https://github.com/ai-dynamo/aisim.git

<!--
SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
-->

# AISim

Third-party attribution and retained license texts are included in [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).

AISim predicts LLM serving behavior and searches for deployment
configurations offline, without bringing up a GPU serving cluster. The Python
package includes the simulation engine, performance estimator and profiles,
Replay, Sweeper, and deployment generation through the compatibility CLI and
generator SDK.

[Website](https://ai-dynamo.org/aisim/) ·
[Repository](https://github.com/ai-dynamo/aisim) ·
[CLI guide](https://github.com/ai-dynamo/aisim/blob/main/docs/reference/cli.md)

## Install

Use Python 3.11–3.13. This branch builds the renamed `aisim` distribution;
these commands require its publication on your selected index. Until then, use
a historical `aisimulate` release in a separate environment or build from source:

```bash
python3 -m pip install aisim
aisim --help
```

The `aisim` wheel provides both `aisim` and `aisimulate`; both commands
use the same entry point. Python imports remain `aisim` and `aisim_core`.

The built-in engine runs without Dynamo. See the
[installation guide](https://github.com/ai-dynamo/aisim/blob/main/docs/getting-started/installation.md)
for platform requirements, source builds, nightly artifacts, and compatible
Dynamo installations. Documentation on `main` may describe features newer than
the latest published wheel. The optional Dynamo Planner integration requires
additional dependencies described in that guide.

## Migrate from the `aisimulate` distribution

The distributions share their Python files and CLI, so uninstall `aisimulate`
**before** installing or upgrading to `aisim`.

The commands below repair package files in an environment that already has
AISim 0.14.0's dependencies. When upgrading from an older release, insert
`python3 -m pip install aisim==0.14.0 &&` after the uninstall line and before the
force-reinstall line. This dependency installation must succeed before the
following `--no-deps` repair, which leaves those dependencies in place.

```bash
python3 -m pip uninstall -y aisimulate &&
python3 -m pip install --force-reinstall --no-deps aisim==0.14.0 &&
python3 -m pip check
```

If both names are already installed, use a fresh environment or uninstall
`aisimulate` and force-reinstall your selected `aisim` wheel to repair overlapping
files. Keep a Dynamo environment on the old distribution until its Dynamo
release requires `aisim`; otherwise dependency resolution can reinstall
`aisimulate`. Import names remain `aisim` and `aisim_core`.

## Predict one deployment

Save the following as `prediction.yaml`:

```yaml
engine:
  mode: aggregated
  model: Qwen/Qwen3-32B-FP8
  hardware: h200_sxm
  backend: vllm
  workers:
    aggregated: {}
```

```bash
aisim predict --config prediction.yaml --output-dir ./prediction
```

The CLI prints a serving summary and writes the full report to
`prediction/prediction.json`. Prediction uses the built-in `engine` stack by
default; `--stack dynamo` selects a separately installed compatible Dynamo runner.

## Search for a deployment

Save the following as `recommendation.yaml`:

```yaml
traffic:
  source: {type: synthetic, input_tokens: 1024, output_tokens: 128}
  load: {type: concurrency, concurrency: 10}
  stop: {requests: 100}

engine:
  mode: aggregated
  model: Qwen/Qwen3-32B-FP8
  hardware: auto
  backend: {choices: [vllm, sglang]}
  workers:
    aggregated:
      parallelism: {preset: default}

optimization:
  target: throughput_per_gpu
  hardware: h200_sxm
  constraints:
    max_candidate_gpus: 8

optimizer:
  max_trials: 8
```

```bash
aisim recommend --config recommendation.yaml --output-dir ./recommendation
```

This quickstart evaluates suggestions for the explicit 1,024-input/128-output-token,
10-concurrent-request workload above, with an eight-trial budget.

Inspect `recommendation/recommendation.json` for search results and
`recommendation/recommendations/` for concrete prediction YAML files to replay.
The [CLI guide](https://github.com/ai-dynamo/aisim/blob/main/docs/reference/cli.md)
covers workload inputs, latency constraints, and detailed output. To create
deployment manifests and launch scripts, use the bundled compatibility CLI or
generator SDK; see the
[deployment generation guide](https://github.com/ai-dynamo/aisim/blob/main/docs/sweeper/deployment-generation.md).

## Documentation and coverage

- [Replay](https://github.com/ai-dynamo/aisim/blob/main/docs/replay/README.md) and
  [Sweeper](https://github.com/ai-dynamo/aisim/blob/main/docs/sweeper/README.md)
  — embed replay and configuration search through Python APIs.
- [Core API](https://github.com/ai-dynamo/aisim/blob/main/docs/perf-model/api/python.md)
  — engine, performance-model, and memory contracts.
- [FPE Support Matrix](https://ai-dynamo.org/aisim/fpe-support-matrix/)
  — forward-pass estimator coverage.
- [Feature Support Matrix](https://ai-dynamo.org/aisim/feature-support-matrix/)
  — serving techniques replayed per engine.
- [E2E Accuracy Overview](https://ai-dynamo.org/aisim/e2e-accuracy/) and
  [FPM Accuracy Overview](https://ai-dynamo.org/aisim/fpm-accuracy/)
  — published accuracy evidence.
- [Development guide](https://github.com/ai-dynamo/aisim/blob/main/DEVELOPMENT.md)
  — source setup and tests.
- [Contributing](https://github.com/ai-dynamo/aisim/blob/main/CONTRIBUTING.md) and
  [Code of Conduct](https://github.com/ai-dynamo/aisim/blob/main/CODE_OF_CONDUCT.md)
  — contribution requirements and community guidelines.

Estimator coverage is separate from serving-accuracy and deployment validation.
Use the published evidence for your workload and verify deployment choices with
real benchmarks.

## Legacy CLI compatibility

The wheel provides the legacy `aiconfigurator` command through AISim 0.13.0.
Removal is targeted for AISim 0.14.0, after every remaining workflow has a
verified replacement in the unified CLI. Use `aisim` for new prediction and
recommendation workflows. The
[migration guide](https://github.com/ai-dynamo/aisim/blob/main/docs/aic-backward-compatibility/migration.md)
explains replacements and remaining differences; the
[legacy CLI guide](https://github.com/ai-dynamo/aisim/blob/main/docs/aic-backward-compatibility/cli.md)
documents retained commands.

The canonical Python imports are `aisim` and `aisim_core`. AISim
0.13.0 removes the `aiconfigurator` and `aiconfigurator_core` import namespaces;
see the [Python source migration guide](https://github.com/ai-dynamo/aisim/blob/main/docs/aic-backward-compatibility/migration.md#python-imports-and-resources)
for replacement imports. The legacy executable remains available as described above.

When upgrading from standalone AIConfigurator, remove the old distributions first
so that AISim owns the installed files. The dependency prerequisites and additional
install step in [Migrate from the `aisimulate` distribution](#migrate-from-the-aisimulate-distribution)
also apply here:

```bash
python3 -m pip uninstall -y aiconfigurator aiconfigurator-core aisimulate &&
python3 -m pip install --force-reinstall --no-deps aisim==0.14.0 &&
python3 -m pip check
```

