madewithlaya

Catalog / Documents & data

0087GitHub

chunklaya: why Laya stops reading after ~200 tokens, and a chunking harness that fixes it

Measures the decision head's attention drop-off on long inputs across 400 documents, then chunks, screens and aggregates, or locates the one passage that matters.

Open source ↗ github.comcostfree, no extra cost over a larger context windowtime-
myxamediyar/chunklayaREADME ↗
# chunklaya

Long-input harness for [Laya](https://github.com/NandhaKishorM/laya), the open-weights System 1
decision model: typed questions — `noul`, `choice`, `score` — answered over one piece of text in a
single forward pass, no autoregression. It's the open answer to TypeSafe's closed Jev.

Laya's checkpoints are configured for 512–1024 tokens, and Jev reads 32k. So what happens if you just
feed Laya more text? Not what you'd guess. The encoder handles long input fine — it's pretrained to
8192 tokens. The problem is the decision head sitting on top of it, and it's a weirder failure than
"runs out of context": past roughly the first 200 tokens, it stops paying attention to anything you
give it. A fact buried in the middle of a long document is effectively invisible to it.

This repo measures that failure precisely, then fixes it: chunk the input into passages, screen each
one, combine the results — or, when the question names something you can search for, locate the one
passage that matters and let Laya read just that. Tested on 400 documents with real confidence
intervals, at no extra cost over just cranking up the context window, and now against Jev on a
public needle benchmark (below).

The narrative version is in [WRITEUP.md](WRITEUP.md), if you want the story instead of the reference.

## What you get over plain Laya

| | Plain Laya | + chunklaya |
|---|---|---|
| Classify or rate a long, coherent document | Fine up to 4096 tokens once you raise `max_len` (0.98–0.99 acc) | No change needed |
| Find whether something occurs anywhere in a long, multi-part input | Chance past the first ~200 tokens (AUC 0.51, CI includes 0.5) | 0.88 at every position, no filtering; 1.000 once known label noise is removed |
| How precise the per-passage detector is | The default `nou

Also filed under Documents & data

  1. 0104

    zero-shot-ie-bench: GLiNER 2.5, GLiFormer, GLiClass, Laya, Von and Jev in one web UI

    Seven zero-shot extraction and classification families demoed, benchmarked and cross-compared, with sizes, licences and costs in one table.

    @umstek · Documents & data · free for the local rows

  2. 0103

    Zero-shot benchmark: Laya's advertised win over Jev does not reproduce on four datasets

    Frozen protocol, raw predictions, calibration and latency for Jev 1.13, PrismNLI-0.4B and Laya. Laya ties Jev on dair-ai/emotion and trails by 10–33 points elsewhere.

    @elcronos · Documents & data

  3. 0102

    jevbench: Jev vs GPT-5-mini, Claude Sonnet 5, fine-tuned DistilBERT, BART NLI and Laya

    Six classifiers over SST-2, AG News and more, reporting accuracy, macro-F1, ECE, p50/p95 latency, throughput and cost side by side. Laya runs locally on MPS or CPU.

    @dhruvmehra · Documents & data · $0 for the local rows

  4. 0098

    Agentic GraphRAG over S&P 10-Ks with Laya as a shadow decision engine beside Jev

    Anthony Alcaraz's talk demo routes typed decisions through Jev and shows Laya's answers beside them. On the TSMC run Laya rejected every true claim; that's the point.

    @AnthonyAlcaraz · Documents & data · free (Laya shadow); Bedrock for reasoning