Metadata-Version: 2.4
Name: xpyd-sim
Version: 0.3.0
Summary: OpenAI-compatible LLM inference simulator for xPyD
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: fastapi>=0.111.0
Requires-Dist: uvicorn>=0.30.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: numpy>=1.26.0
Requires-Dist: scipy>=1.12.0
Requires-Dist: matplotlib>=3.8.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
Requires-Dist: pytest-timeout>=2.3.0; extra == "dev"
Requires-Dist: ruff>=0.3.0; extra == "dev"
Requires-Dist: isort>=5.13.0; extra == "dev"
Provides-Extra: e2e
Requires-Dist: xpyd-proxy>=1.2.0; extra == "e2e"

# xPyD-sim

OpenAI-compatible LLM inference simulator for [xPyD](https://github.com/xPyD-hub).

Simulates prefill and decode nodes with realistic behavior for testing xPyD-bench and xPyD-proxy without real GPU hardware.

## Features

- Separate prefill and decode node simulators
- Full OpenAI API compatibility (/v1/completions, /v1/chat/completions, /v1/models)
- Configurable latency (prefill delay, decode delay per token)
- Streaming support with realistic token-by-token delivery
- EOS simulation with configurable output length distribution
- All OpenAI API parameters accepted
- Spec-compliant response formats

## Install

```bash
pip install xpyd-sim
```

## Quick Start

```bash
# Start prefill node
xpyd-sim prefill --port 8001

# Start decode node
xpyd-sim decode --port 8002
```

## License

TBD
