Skip to main content

Kedi Laya

Local Laya decision models without a TypeSafe dependency. Pydantic AI and LangChain are optional integrations, not required to import the client.

Use kedi-decisions[laya-mlx] on Apple Silicon or kedi-decisions[laya] for upstream PyTorch. Add langchain for that framework. The current packages are development versions in this monorepo and have not been published yet.

from kedi_laya import LayaClient

with LayaClient("path/to/checkpoint", backend="mlx") as client:
    evaluator = client.as_evaluator(threshold=0.85)
    result = evaluator.evaluate_sync(
        state="The duplicate charge has been refunded.",
        schema={
            "type": "object",
            "properties": {"refunded": {"type": "boolean", "description": "Has the refund been completed?"}},
            "required": ["refunded"],
        },
    )
    print(result.values)

LayaModel and LayaChatModel are available from kedi_laya or their respective integrations.pydantic and integrations.langchain modules. They accept a checkpoint, backend, threshold, and load_options. A borrowed client can be shared between models; closing a wrapper never closes a borrowed client.

backend="auto" prefers an installed MLX runtime on Apple Silicon, otherwise selects Torch. Explicit mlx or torch makes deployment deterministic. Missing or failing selected runtimes raise an error; there is no inference-error fallback to another backend. Weights load lazily once per client. The provider identifier is always laya, and model.backend reports the selected runtime.

MLX-owned models are checked against the actual tokenizer and context budget before inference. Injected predictors and Torch retain their own context handling. Real inference has been verified on the multilingual MLX checkpoint; Torch must not be considered verified by the mocked loader tests.

The optional tool selector only executes parameterless calls through the host framework. Parameterized tool choices raise ToolCallProposed; the model does not invent arguments. Raw generated text and unsupported schemas are rejected.

Metadata

Release files for kedi-laya 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kedi-laya 0.1.0
File Size Uploaded Provenance Actions
kedi_laya-0.1.0.tar.gz 14.0 kB Without provenance Details for kedi_laya-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kedi-laya 0.1.0
File Interpreter ABI Platform Actions
kedi_laya-0.1.0-py3-none-any.whl Python 3 none any Details for kedi_laya-0.1.0-py3-none-any.whl

Total release size: 23.5 kB

Release files / kedi_laya-0.1.0.tar.gz

Download URL kedi_laya-0.1.0.tar.gz
Size 14.0 kB
Tags Source
SHA-256 checksum
How to use checksums
732b58780f03010e0e65cb299074a65314d7374a949877eb69cf26ef30e21010
BLAKE2b-256 checksum
How to use checksums
9d2c8e25ee3b6a3ca5f465b5f80cf4cbf5df534d7f5d9423d8164abd1a95347f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / kedi_laya-0.1.0-py3-none-any.whl

Download URL kedi_laya-0.1.0-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0c35605a803dff46b20361bb60a98838bddfc9971ef26989438dbf0167fbf095
BLAKE2b-256 checksum
How to use checksums
2ec1a6965338acf106299e2faba4ce4d622fe6f9ef114eb0a31734ca07958954
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Security for kedi-laya 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page