laya-coreml
Copyright 2026 laya-coreml contributors

This product includes software adapted from Laya (Apache-2.0):
https://github.com/NandhaKishorM/laya
Copyright Convai Innovations and Laya contributors.
Upstream source revision: 573e5b62696ba441230cd6be71d593331b5d23af

Prompt construction, tokenization, result formatting, validation fixtures,
the ModernBERT architecture implementation, and the Snake game, policy, terminal
UI, recording/export and benchmark tools are adapted from laya-mlx:
https://github.com/mizorewww/laya-mlx
Copyright 2026 laya-mlx contributors. Licensed under Apache-2.0.
Adapted revision: fc1df62828a3fedf4d8229fdac1cbd85f1cdf337
Changes: Core ML runtime, export-only PyTorch graph, fixed/ranged shape input
handling, Core ML validation, device planning, and performance measurement;
ANE graph/runtime, portable model bundles and offline Core ML Snake integration.

The model follows Laya's DecisionModel and Hugging Face Transformers ModernBERT.
Original checkpoint weights belong to their respective upstream authors and
are downloaded separately. No weights are included in this repository.
This is an independent project, not an official Convai Innovations or Apple release.

Selected prompt validation, noul labels, truncation diagnostics and answer-confidence
fixes synchronized through upstream 4aa6761be8173de4ce6d92c31b3e40b6eaf59a7c,
via laya-mlx ca5940aa9286dbbdfaacbecbdb7b337295ad36a2.
The architecture and model weights remain based on the original pinned revision.

Runtime routing, lifecycle synchronization, custom checkpoint registration,
confidence gating, tournament/shortlist decisions, language detection and email
cleaning synchronized through upstream 1adc59f7e371deb601fcfa18a14e25db238addcc
(v0.4.1), via laya-mlx 9f00d592fcf843753e6d3edd2eab63ec2b44f3c9.
Parallel option layout adapted for the export-only PyTorch graph and Core ML
input signatures. Existing sequential Core ML and ANE bundles remain supported;
parallel checkpoints require a matching newly converted general Core ML graph.
