# Reproduce the queueing timing model

This public bundle contains the original deterministic Python model, its unit tests, the six model output files, and a runnable Jupyter notebook. It uses no inference server, API credentials, or network access. The model is not an AIPerf implementation, GPU benchmark, or production latency estimate.

## Run locally

Requirements: Python 3.10 or later. To execute the notebook locally, extract the linked reproducibility package. It contains the notebook, its `timing_model.py` dependency, all model data, tests, and this README. Use Jupyter with Python 3 and IPython installed. The notebook uses only the Python standard library plus the notebook display module.

From this directory:

    python3 -m unittest -v test_timing_model.py
    python3 timing_model.py --output-dir /tmp/inference-timing-results

From the extracted package root, run the tests and open `inference_queueing.ipynb` in Jupyter. Keep the notebook beside `timing_model.py` and the included `data/` folder so its relative imports and data reads work. The notebook reruns the model, checks its summaries against data/sweep.csv, and plots the two timing boundaries.

## Contents

- timing_model.py: deterministic FIFO simulator and output generator.
- test_timing_model.py: model invariants and edge-case tests.
- data/requests.csv: all 80 request rows for the four scenarios.
- data/timeline.csv: post-event queue states.
- data/sweep.csv: scenario-level summaries.
- data/four_requests.csv: four-request illustration.
- data/delayed_issuance.csv: separate pre-credit delay example.
- data/results.json: machine-readable assumptions and results.
- inference_queueing.ipynb: notebook with model verification and plot.

Times are idealized integer milliseconds. The model uses 20 requests per case, 400 ms constant service, one FIFO slot, an empty starting system and a full drain. All waiting is before dispatch; no network, server queue, batching, token generation, GPU work, failures, or random noise are modeled.
