laya-mlx
Copyright 2026 laya-mlx contributors

This product includes software derived from Laya:
https://github.com/NandhaKishorM/laya
Copyright Convai Innovations and Laya contributors. Licensed under Apache-2.0.
Original upstream source revision: 573e5b62696ba441230cd6be71d593331b5d23af

The token sequence construction, question rendering, confidence calculation,
presets, email utilities and language router are adapted from Laya.
The neural network is reimplemented using Apple's MLX, following Laya's
DecisionModel and the ModernBERT architecture in Hugging Face Transformers.
Model weights are downloaded separately from Convai Innovations on Hugging Face;
they are not included in this repository.

Selected inference, input validation, routing, language and email fixes adapted
from upstream revision 4aa6761 (v0.3.23 source tree). This is a selective sync,
not an implementation of every upstream API. The neural architecture parity
reference remains 573e5b62696ba441230cd6be71d593331b5d23af.

Additional lifecycle/registry, language, email, tournament and confidence-gate
behavior adapted from upstream revision
1adc59f7e371deb601fcfa18a14e25db238addcc (v0.4.1). Parallel option layout and masks
are reimplemented in MLX and checked against that revision. Sequential model
parity remains checked against the original reference above.

Unreleased host API migration: NandhaKishorM/laya v0.4.12,
commit ffc142012af63d015fa19f05f29f9c5ff329a2cc (Apache-2.0).
Host extraction incorporates the laya-coreml port with native MLX backend adaptations.

Additional applicable host behavior adapted from NandhaKishorM/laya v0.4.17,
commit fe9a6c35023a7d94102e7feaaeaae8857d9d1b07, v0.4.34,
commit 80a1da1fa5448ea12163f4d977935625a0aea670, v0.4.35,
commit b1d656952f0f9581ea691a70cb6f38abf3eb13a9, v0.4.37,
commit d1282e791d71e92f24f816ff3836e4fd1c2ded4a, v0.5.1,
commit 090c540ec4cd0e5c71d539d952f0250e97399fcb, v0.5.2,
commit e150aa92a0d4059ac621875b39b620847cf1b88a, v0.5.3,
commit abefd7d955008a59287b0fa8c5753cb323307693, and v0.5.4,
commit 60a6ce910b4a2edb2b77e00d8fddeb24349610c8 (Apache-2.0).
See docs/UPSTREAM.md for source mapping and native backend boundaries.
