Chunklaya unlocks long context for Laya
chunklaya is an open-source Apache 2.0-licensed harness designed to scale Laya, an open-weights System 1 decision model, into an effective local alternative to TypeSafe's proprietary Jev model for long documents. To overcome Laya's decision-head opening bias past 200 tokens, chunklaya splits text into discrete passage chunks, replaces uncalibrated default queries with descriptive prompts to cut false positives by 25x, and uses length-sorted batching to run efficiently on consumer hardware.
Non-autoregressive System 1 decision models represent an efficient, high-throughput alternative to generative LLMs for classification and routing, and chunklaya demonstrates that thoughtful passage-level orchestration can completely eliminate deep context blindness in small models without expensive fine-tuning.
• Overcoming Severe Decision-Head Bias: Laya's decision head fails to attend to information placed past token ~200; by chunking text into separate passages where each starts at position zero, chunklaya recovers needle-in-a-haystack detection AUC from chance to 1.000 on clean labels.
• Prompt Formulation as Calibration: Replacing raw boolean `noul` queries with 4-way descriptive `choice` questions dropped false-positive rates from 7.7% to 0.3% on identical weights, demonstrating how question structuring can compensate for uncalibrated model heads.
• Compute Parity on Consumer Hardware: Through length-sorted dynamic batching, chunklaya eliminates padding overhead and achieves roughly 483 ms per document on an M4 Pro chip, matching the execution speed of a single unchunked long forward pass.
• Pragmatic Local Alternative to Jev: Provides a fully offline, privacy-first option for developers wanting low-latency, deterministic decision-making without relying on closed cloud APIs like TypeSafe Jev.
DISCOVERED
1h ago
2026-09-19
PUBLISHED
1h ago
2026-09-19
RELEVANCE
AUTHOR
michael_chomsky