--- license: apache-2.0 base_model: convaiinnovations/laya tags: - coreml - swift - swev - decision-model - text-classification --- # laya-en-fp32 · Swev A Core ML export of [convaiinnovations/laya](https://huggingface.co/convaiinnovations/laya) for [Swev](https://github.com/danielamitay/swev), a Swift package for local typed decisions. Returns choices, ordinal scores, and probabilities for runtime-defined questions; this export does not generate free-form text. - **Package:** `laya-en-fp32-swev-l4096-k16.mlpackage` (download the entire directory). - **Precision:** FP32 weights and computation. - **Text context:** up to 4,096 tokens including the question, options, and formatting. Swev selects the smallest fitting bucket: 128, 256, 512, 1,024, 2,048, or 4,096. - **Questions:** `choice`, `score`, and `noul`; up to 16 answer options per question and 64 questions per request, evaluated independently. - **Runtime:** Swift 6, macOS 15+ or iOS 18+, with a Swev version supporting schema **2.0**. Export version **0.3.0**. Validated locally on macOS with CPU-only Core ML; memory and compute-unit support depend on the device. Text-only export. Per-field prompt limits also apply; oversized inputs are rejected rather than silently truncated. ## Swift usage Add [Swev](https://github.com/danielamitay/swev) as a Swift package dependency, then: ```swift import Swev let model = try await SwevModel.load(from: HuggingFaceModel( repository: "danielamitay/laya-en-fp32-swev", package: "laya-en-fp32-swev-l4096-k16.mlpackage" )) let response = try await model.predict( state: "apple", questions: [.noul(id: "edible", instructions: "Is this an edible food?")] ) print(try response.noul("edible").noul) ``` The first call downloads the package; later calls reuse Swev’s local download cache. Keep the loaded model resident to avoid recompilation and initialization on each request. See [loading and caching](https://github.com/danielamitay/swev/blob/main/docs/huggingface.md) and [model support](https://github.com/danielamitay/swev/blob/main/docs/models.md). No Python runtime or separate tokenizer/adapter files are required. ## Source and conversion Source checkpoint: [convaiinnovations/laya at `1c5edc17a7ac`](https://huggingface.co/convaiinnovations/laya/tree/1c5edc17a7acd8701df6fc341c0d179f1c62c982). Tokenizer, formatting, and inference settings are bundled in the package. This is a converted export, not a new fine-tune. Uses the English checkpoint at the repository root, built on [ModernBERT-large](https://huggingface.co/answerdotai/ModernBERT-large). Source implementation: [Laya](https://github.com/NandhaKishorM/laya). The export extends its configured context to 4,096 tokens with a 256-token question-prefix budget and retains its checkpoint temperature settings. This is not the multilingual or typed-decisions checkpoint. Conversion tooling and the package contract are documented in [Swev’s conversion guide](https://github.com/danielamitay/swev/blob/main/docs/conversion.md) and [schema reference](https://github.com/danielamitay/swev/blob/main/docs/schema.md). Exported capacity is not a guarantee of task accuracy; evaluate the checkpoint on your own inputs. ## License Apache License 2.0; see [LICENSE](LICENSE). Source model attribution and pinned revisions are listed above. This is an independent Swev-compatible export, not an official release by the original model authors.