# pllm.preparation Python API

Public objects, practical usage, and research context for pllm.preparation.

[View canonical HTML](https://pllm.run/sdk/reference/python/pllm/preparation/)

Document ID: `pllm.docs.reference.python.pllm.preparation`  
Release: `0.1.0`

Preparation components define offline inventory production and trusted preparation roles without placing preparation work on the online inference path. Presence documents API availability, not complete model, security, or deployment coverage; check [implementation status](/sdk/reference/status/) before relying on a path.

## Research context

Relevant design inputs: [DASH](/research/papers/r01-dash/), [ReDASH](/research/papers/r02-redash/). PLLM's implementation and evidence claims remain independent.

## Python SDK example

The example performs a bounded offline task and checks an observable result. It does not download a checkpoint or contact a provider.

```python
import pllm.preparation as preparation

provider = preparation.ModelAwareCorrections()
assert provider.component == "pllm/model-aware-corrections"
```

API: [`pllm.preparation`](/sdk/reference/python/pllm/preparation/#objects-and-signatures)

## Objects and signatures

### `BFVCorrelations`

Selects component `pllm/bfv-correlations/v1` during `preparation`; it provides `bfv-correlation-generation` for roles client, preparation.

- Canonical object: `pllm.preparation.BFVCorrelations`
- Kind: `class`
- Signature/type: `__init__(self, *, poly_modulus_degree: int=4096) -> None`
- Public exports: `pllm.preparation.BFVCorrelations`
- Public members: `descriptor: ComponentDescriptor`; `__init__(self, *, poly_modulus_degree: int=4096) -> None`; `classmethod describe(cls) -> ComponentDescriptor`

### `HEAuthenticatedPreprocessing`

Selects component `pllm/he-authenticated-preprocessing` during `preparation`; it provides `he-authenticated-preprocessing` for roles client, preparation.

- Canonical object: `pllm.preparation.HEAuthenticatedPreprocessing`
- Kind: `class`
- Signature/type: `__init__(self, *, poly_modulus_degree: int=4096, threads: int=1, enable_linear_correlations: bool=True) -> None`
- Public exports: `pllm.preparation.HEAuthenticatedPreprocessing`
- Public members: `descriptor: ComponentDescriptor`; `__init__(self, *, poly_modulus_degree: int=4096, threads: int=1, enable_linear_correlations: bool=True) -> None`; `classmethod describe(cls) -> ComponentDescriptor`

### `ModelAwareCorrections`

Selects component `pllm/model-aware-corrections` during `preparation`; it provides `one-use-masked-linear-corrections` for roles preparation.

- Canonical object: `pllm.preparation.ModelAwareCorrections`
- Kind: `class`
- Signature/type: `__init__(self) -> None`
- Public exports: `pllm.ModelAwareCorrections`, `pllm.preparation.ModelAwareCorrections`
- Public members: `descriptor: ComponentDescriptor`; `__init__(self) -> None`; `classmethod describe(cls) -> ComponentDescriptor`

### `PreparationProvider`

Immutable `PreparationProvider` record carrying `component`, `params` for the workflow where preparation components define offline inventory production and trusted preparation roles without placing preparation work on the online inference path.

- Canonical object: `pllm.preparation.PreparationProvider`
- Kind: `class`
- Signature/type: `constructor not exposed`
- Public exports: `pllm.preparation.PreparationProvider`

### `create_preparation_app`

Builds the preparation ASGI application from validated runtime dependencies.

- Canonical object: `pllm.runtime.preparation_server.create_preparation_app`
- Kind: `function`
- Signature/type: `(config: 'GatewayConfig', engine: 'MaskedTransformerEngine', *, audit_hook: 'Callable[[str, bytes], None] \| None' = None, push_client: 'httpx.AsyncClient \| None' = None) -> 'FastAPI'`
- Public exports: `pllm.create_preparation_app`, `pllm.preparation.create_preparation_app`
