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.1

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.1
File Size Uploaded Provenance Actions
kedi_laya-0.1.1.tar.gz 14.0 kB Without provenance Details for kedi_laya-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 23.5 kB

Release files / kedi_laya-0.1.1.tar.gz

Download URL kedi_laya-0.1.1.tar.gz
Size 14.0 kB
Tags Source
SHA-256 checksum
How to use checksums
89e661ac8fdc423cc513af444e00adf7341fb7229a1a744386d965a3f085f19c
BLAKE2b-256 checksum
How to use checksums
9fa16e69b25d6e0ae59900e773b43c57f68c4632d292535c29b1103f27baf908
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.1-py3-none-any.whl

Download URL kedi_laya-0.1.1-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
85ec7787f1a4f944f5fff13bbc5d9257736a90eeefca7a8761ae695f9e2280c3
BLAKE2b-256 checksum
How to use checksums
26441363b001f000ef997fa35cef31fe5fea2be9b80de2625d0e574f13b7eebe
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.1

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.1 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