Stock Laya.
32k context. Full kit.

Base Laya, byte-identical weights, with Jev-scale context. Nothing else changed.

01What is Jev?

Jev (TypeSafe AI, Sept 2026) is a System One model: instead of generating text token-by-token like a chatbot, it takes your messy input (state) plus typed questions and returns structured decisions your code can branch on — a choice (pick one option), a score (place on a rubric), or a noul (yes/no probability). Every answer ships with calibrated probabilities and confidence. No prose, no parsing, no format hallucinations. Closed API-only, $0.042/M input tokens, 70–500ms, 64k context (32k state).

02What is Laya?

Laya (Nandakishor Mukkunnoth / ConvAI Innovations — arXiv:2503.23303, arXiv:2510.01237) is the open-weight answer to the same idea: a non-autoregressive System 1 decision engine with the same three primitives (choice / score / noul), Apache-2.0 weights you self-host for $0, ~33ms per decision, 100+ languages via routing. Without that open foundation, none of this exists.

03Laya's context limits

English / typed-decisions512

tokens per forward pass. Long docs get silently truncated.

Multilingual1024

tokens (up to 8k max). Same truncation problem, larger window.

Jev accepts 32k of state. Stock Laya cannot see past ~1 page. That is the entire gap this kit closes.

04What we did

Two paths, zero weight changes (accuracy and calibration identical to base Laya by construction):

1. Native 8k. The ModernBERT encoder already supports 8192 positions (max_position_embeddings=8192) — raise max_len in rl_agent_config.json from 512. No retraining. Validate on your distribution past the trained length.

2. 32k retrieve-then-decide (src/laya_longctx.py): chunk long input → rank chunks against your questions with TF-IDF → keep top-3 inside a true-fit 1280-char state budget (fits the 512 window after question + head) → one forward pass. Millisecond overhead, Router-compatible, document order preserved.

05The full kit — code and all

A. Install — run this in your terminal (shell, not Python):

pip install laya scikit-learn
# alternatives: python -m pip install laya scikit-learn
#   uv pip install laya scikit-learn
#   conda install scikit-learn && pip install laya  (laya is PyPI-only)
# + copy src/laya_longctx.py from github.com/KotalaKishanReddy/laya-plus

B. Decide over 32k of state — run this in Python:

from laya_longctx import LongContextRouter

router = LongContextRouter(preload=True)  # english + multilingual resident

ticket = {"subject": "Downtime + billing dispute",
          "body": open("huge_ticket_thread.txt").read()}  # up to ~32k tokens

questions = {
  "queue": {"type": "choice",
    "instructions": "Which queue owns this?",
    "criteria": {"infra": "outages, downtime",
                   "billing": "refunds, SLA"}},
  "urgency": {"type": "score",
    "instructions": "How urgent?",
    "criteria": ["low", "medium", "high", "critical"]},
  "churn": {"type": "noul",
    "instructions": "Will they cancel?"},
}

res = router.predict(ticket, questions, top_k=3)
print(res["answers"]["queue"]["choice"])       # e.g. infra
print(res["longctx"])  # chunks kept, scores, retrieved True/False

C. Native 8k bump (no code — one config value): in your checkpoint's rl_agent_config.json, set "max_len": 8192 (or 2048 for safety). Short inputs behave exactly as before.

Docs: full guides under /docs on this site (quickstart, primitives, routing, long context, patterns, API). License: additions Apache-2.0; base weights per ConvAI terms; see NOTICE.