Laya Release Notes: What's New in 0.3.12, 0.3.11 and 0.3.10

Track Laya Python package releases: routed batches, schema-driven decide(), prediction hooks, per-language calibration, faster loading, the Jev-compatible server and more.

Last updated: Sep 24, 2026

Laya moves fast: the laya package went from 0.2.1 to 0.3.12 on PyPI between September 19 and September 24, 2026. This page summarises what changed in each release that matters for developers, linked to the upstream sources.

Install or upgrade:

pip install -U laya

Sources: PyPI release history and the upstream README. The checkpoints themselves have not changed across these releases.

0.3.12 — September 24, 2026

  • Correct routed batches. Router.predict_batch keeps two requests apart when their choice options are the same but in a different order, so every request gets the same answer as its own predict call (#166). Predict hooks now run for every request in a batch, so a redaction hook also covers batched traffic.
  • Schema-driven decisions. agent.decide(state, schema=...) accepts a JSON schema or a pydantic model and returns typed values in one forward pass:
schema = {
    "type": "object",
    "properties": {
        "department": {"type": "string", "enum": ["billing", "support", "sales"]},
        "urgency": {"type": "integer", "minimum": 0, "maximum": 2},
        "needs_human": {"type": "boolean"},
    },
}
agent.decide("I was charged twice, refund me.", schema=schema)
# {"department": "billing", "urgency": 2, "needs_human": True}
  • Faster, same answers. The state is tokenized once per call instead of once per question; predict_batch(..., sort_by_length=True) reduces padding on mixed-length batches; Apple GPUs use fp16 once a call has enough question rows.
  • More hooks. A BaseHook class to subclass, and process-wide default hooks for tracers and metrics.
  • Per-language calibration. lang_temperatures= applies your own per-language temperatures; the Router passes the detected language through. Nothing ships with values.
  • answer_confidence. Every answer also reports max(p), next to the unchanged confidence.
  • Fixes. A blank lang= falls through to detection; laya-serve enforces its body-size limit on chunked uploads.
  • CLI and TypeScript. laya "..." --preset triage; laya-ts gains hooks, one-pass state tokenization, and routing and e-mail parity with Python.

0.3.11 — September 23, 2026

  • Routed batches. Router.predict_batch(requests) routes each request, groups by checkpoint and question set, and scores each group in shared forward passes. Each request can set its own model, task, lang or lang_guess.
  • Prediction hooks. Opt-in hooks around every decision on Agent, Router and ONNXAgent — audit, trace, redact, cache or gate results.
  • transformers 4.x and Apple GPUs. Checkpoints re-saved by transformers 5 load with correct RoPE settings on 4.x; predict() no longer crashes on MPS builds without an autocast backend.
  • Stricter noul questions. A criteria dict keyed anything other than true/false is rejected; use labels to change the wording.
  • Safer HTTP server. Timing-safe API key checks, request size and question limits (413), 400 for malformed JSON, no path leaks. Docker Compose binds to loopback by default.
  • More hardware. Native ARM64 and DGX Spark container builds, and a local web GUI demo.

0.3.10 (and 0.3.9) — September 23, 2026

0.3.10 changed only the README; its code equals 0.3.9. Everything new since 0.3.6:

  • About 10x faster loading. laya.load() drops from about 22 s to about 2 s on CPU with bit-identical answers.
  • import laya no longer loads torch, so routing, language detection and e-mail cleaning run in lightweight processes.
  • Batch scoring with agent.predict_batch(states, questions).
  • Opt-in fast paths: a TileLang GPU path (laya.load(..., fast=True)), torch.compile, and ONNXAgent on ONNX Runtime.
  • Local serving: the Jev-compatible laya-serve, the laya CLI, an MCP server, LangChain/LangGraph integrations and the laya-ts TypeScript package. See Self-host Laya.
  • Better routing for plain-ASCII Spanish, Italian, Portuguese and French, CJK text containing Latin brand names, romanized Bangla and Azerbaijani.
  • Fine-tuning notebook fixes: calibration is fitted on a held-out slice rather than training data (#186).

Earlier releases

VersionReleased
0.3.6September 22, 2026
0.3.5September 21, 2026
0.3.4September 20, 2026
0.2.1 – 0.3.3September 19, 2026

Upgrade notes

  • Python 3.10 or newer is required.
  • Re-check confidence thresholds after upgrading if you use batching or mixed precision; upstream notes that changed batch shapes can cause small floating-point differences near decision thresholds.
  • The Hugging Face model card already mentions a 0.3.13; it had not been published on PyPI at the time of writing.

Last verified: September 24, 2026.