laya β€” Apple Core AI conversion

Community conversion of convaiinnovations/laya to an Apple Core AI .aimodel bundle, runnable on macOS 27 on Apple Silicon.

Laya is a non-autoregressive System 1 decision model: it takes a state and typed questions and returns typed answers with calibrated probabilities in one forward pass. It never generates text. That maps onto a Core AI graph exactly β€” one DecisionModel.forward, no KV cache, no decoding loop β€” so the whole model is a single exported program here.

Use

pip install -r requirements.txt
import asyncio
from laya_coreai import LayaCoreAI

async def main():
    model = await LayaCoreAI.load(".")
    result = await model.predict(
        state="Hi, we were billed twice for March. Please refund the duplicate today.",
        questions={"department": {"type": "choice",
                        "instructions": "Which department should handle this?",
                        "criteria": {"billing": "invoices, payments, refunds",
                                     "technical": "bugs, outages, system errors"}}},
    )
    print(result["answers"]["department"]["choice"])   # billing

asyncio.run(main())

The laya package is used for tokenization, question normalization and answer decoding, so the prompts are byte-identical to the PyTorch path. Every neural forward pass runs through Core AI.

Shape

  • One request per forward pass, padded to a fixed 512-token / 192-option-marker graph. A request that does not fit raises CapacityError β€” nothing is silently truncated.
  • Host tensors are int32 (the Core AI runtime's integer type) and the marker mask is bool.
  • Weights are the original FP32 encoder and decision head; nothing is quantized.
  • The act head is exported too, but upstream reports its signal is not usable yet (issue #185), so treat act_logits as present-for-completeness rather than something to gate on.

Numerical drift

Measured against Laya's own runtime on the same machine β€” the reference is the package's eager PyTorch forward fed the identical tensors, built with build_sequence, so the only difference is the conversion itself.

  • 6 cases (choice, noul, score) β€” all selected answers matched: True
  • largest absolute probability difference: 0.000001

This measures conversion drift only. It is not a benchmark of Laya's accuracy or calibration; see the upstream model card and issues for those.

Files

  • decision.aimodel/ β€” the exported Laya forward (encoder + typed head + scorer + act head)
  • laya_coreai.py β€” host adapter: tokenize, normalize, pad, call, decode
  • manifest.json β€” source repo, pinned revision, shapes, precision, input/output names
  • tokenizer/, encoder/config.json, config.json, rl_agent_config.json β€” the checkpoint's own host-side files, including the shipped calibration temperatures
  • validation.json β€” the measurement below, case by case

Independent community conversion β€” not an official Apple or Convai release. Converted on macOS 27.0.1 with coreai-core 1.0.0b3 / coreai-torch 0.4.3.

Downloads last month
19
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for ahmedandaloes/laya-CoreAI

Quantized
(69)
this model

Collection including ahmedandaloes/laya-CoreAI