Skip to content

LibLayaX 1.0.14: first public release

Choose a tag to compare

@felipedaragon felipedaragon released this 02 Oct 17:19
· 4 commits to main since this release

First public release of LibLayaX: a shared library and C API, built on
laya.cpp, that runs the
Laya typed-decision model inside your own program.
No server, no Python: load the model once, then ask it yes/no, multiple-choice and score
questions about a piece of text and get JSON back.

Downloads

System Package Contents
Windows x64, CPU with AVX2 laya-windows-1.0.14-avx2.zip CPU
Windows x64, any CPU, or x64 emulation on Windows on ARM laya-windows-1.0.14-compat-sse42.zip CPU
Windows x64 with a GPU laya-windows-1.0.14-vulkan.zip CPU + Vulkan
Windows ARM64, native laya-windows-arm64-1.0.14.zip CPU
Linux x86-64 laya-linux-1.0.14.zip avx2, compat-sse42 and vulkan folders
Linux ARM64 laya-linux-arm64-1.0.14.zip CPU
macOS, Apple Silicon laya-macos-1.0.14-arm64.zip CPU
macOS, Apple Silicon with GPU laya-macos-vulkan-1.0.14-arm64.zip CPU + Vulkan (MoltenVK)
macOS, Intel laya-macos-1.0.14-x86_64-avx2.zip, …-compat-sse42.zip CPU

Each package has the library (laya.dll / liblaya.so / liblaya.dylib), the header
laya_c.h, and the test tools (test-capi, laya-bench, laya-probe, laya-diag).
The Windows packages also include laya.lib and laya.def for linking from C and C++.

The model is not included. Download it (about 800 MB) from
convaiinnovations/laya on Hugging Face;
the README explains which files are needed.

What is in this release

  • C API version 1: ten functions, JSON in and JSON out, safe to call from several threads.
  • CPU backend on every platform; Vulkan GPU backend on Windows x64, Linux x86-64 and
    Apple Silicon.
  • Native Windows ARM64 library, with a fix for a hang when the calling program has
    floating-point exceptions enabled.
  • Diagnostics: set LAYA_DEBUG=1 to trace every stage of a call, LAYA_CRASH_REPORT=1
    for a crash report, and run laya-probe to check the machine before loading a model.

Speed

English model, batch of 16 questions:

Machine Backend Questions per second
RTX 5080 Laptop Vulkan, fp16 about 670
Apple M3 Ultra Vulkan, bf16 170
Core Ultra 9 275HX CPU about 21
Apple M3 Ultra CPU 14

Tested

Run with the real model on this version: Windows 11 ARM64 (native, and the x64
compat-sse42 library under emulation), Ubuntu 24.04 ARM64, and macOS on Apple Silicon (CPU).

Built but not yet run on real hardware at this version: Windows x64 on an x64 PC,
Linux x86-64, macOS Intel, and the Vulkan backend on Linux. Reports are welcome.

Language bindings

The library can be called from any language that can load a C library. Ready-made bindings
live in their own repositories: DLaya (Delphi and Free Pascal), RLaya (Rust) and
LLaya (Lua 5.1 to 5.4).

Notes

  • On Linux, run the test tools with LD_LIBRARY_PATH=. so they find liblaya.so.
  • The library is 64-bit only.
  • Use the package that matches the architecture of your program, not of the machine:
    an x64 program on Windows on ARM needs the x64 compat-sse42 library.

Credits

Laya by NandhaKishorM (Apache-2.0) is the original model and Python implementation.
laya.cpp by Lars Karlslund (MIT) is the C++ port this library is built on.
LibLayaX was written by Claude (Anthropic) under the direction of Felipe Daragon (DaragonTech).