> ## Documentation Index
> Fetch the complete documentation index at: https://docs.r3al.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Output & manifest

> Every job produces a quantized ONNX plus a verifiable manifest.

## The deliverable

When `quantize()` or `train_qat()` finishes on the platform, the SDK downloads and unpacks the bundle into your `output_dir`:

```text theme={null}
output_dir/
├── model.quantized.onnx      ← quantized model (stem matches source;
│                               QAT jobs write model_qat.quantized.onnx)
└── r3alai_manifest.json      ← proof + full config, shipped inside the bundle
```

`result.path` points at this directory, so local `load()` and `benchmark()` work on it directly.

## The manifest

`r3alai_manifest.json` ships inside every downloaded bundle. It is the customer-facing proof that a model was processed by R3AL.AI:

```json theme={null}
{
  "quantized": true,
  "producer": "R3AL.ai Quant SDK",
  "format": "onnx",
  "source_model": "model.onnx",
  "output_model": "model.quantized.onnx",
  "method": "ptq_dynamic",
  "config": {
    "method": "ptq_dynamic",
    "bits": 8,
    "mode": "ptq"
  },
  "domain": "production-v1",
  "created_at": "2026-07-19T12:00:00+00:00"
}
```

| Field                    | Meaning                                      |
| ------------------------ | -------------------------------------------- |
| `quantized` / `producer` | Confirms the file came from the R3AL engine  |
| `method`                 | The method used                              |
| `config`                 | The full config used for the job             |
| `domain`                 | Optional free-form tag you pass with the job |
| `created_at`             | UTC timestamp                                |

## Embedded ONNX metadata

The quantized ONNX file itself is stamped with metadata properties, so provenance survives even if the manifest is separated from the model:

```python theme={null}
import onnx

model = onnx.load("model.quantized.onnx")
print({p.key: p.value for p in model.metadata_props})
# {'r3al_quantized': 'true', 'r3al_method': 'ptq_dynamic', 'r3al_bits': '8'}
```

## Loading a quantized bundle

The SDK resolves the manifest for you when loading (locally, via onnxruntime):

```python theme={null}
from r3alai.quant import Quantizer

bundle = Quantizer().load("./out")
session = bundle["session"]      # onnxruntime.InferenceSession
manifest = bundle["manifest"]    # parsed manifest dict
bundle["path"]                   # path to the resolved .onnx file
```
