laya typed decisions on Core ML
LayaManager: Swift port of laya (open Jev-style decision model, Apache-2.0). choice / score / noul answers with calibrated probabilities from one encoder pass, no generated tokens. Fixed-length Core ML buckets (128/256/512/1024 tokens × 32 options) from FluidInference/laya-coreml; fp16 or e8 (int8 embedding table, 30% smaller, same accuracy).
LayaTokenizer: mmBERT/Gemma byte-fallback BPE, byte-exact with HuggingFace tokenizers on the conversion fixtures.
FluidUseLaya CLI: answer, tetris, benchmark.
LayaTetrisDemo: laya scores every candidate landing live on the Neural Engine, with a stdout console for a tmux/asitop split.
Benchmarks.md: CUA-S1-FORMS and laya on one page, every number backed by a checked-in report.
Numbers (Apple M5 Pro)
- 99.5% of ops on the Neural Engine; 3.7 ms per short question end to end, ~15,800 Tetris decisions/min.
- Accuracy identical to PyTorch on laya's 10 published suites (3,899 questions, ≥99.8% row agreement) and on the five-task Laya-vs-Jev table; p50 5.2 ms vs 61.6 ms for PyTorch on the same CPU.
Package
.package(url: "https://github.com/FluidInference/FluidUse.git", from: "0.2.0")
Pull requests: #1, #3.