Repository navigation
Releases: DaragonTech/LibLayaX
Release list
LibLayaX 1.0.15: models in one .tar file, weight codecs, and the GPU support under Wine
What's new
A model in one .tar file. laya_create now takes the path of an uncompressed .tar
file where it takes a model folder, and reads every file of the model from it. Nothing is
unpacked to disk, and loading takes the same time and memory as from a folder.
Codecs for the weights. A new function, laya_set_codec, lets a program decode the
stored bytes of model.safetensors with a function of its own while a model loads. It works
the same for a model folder and for a .tar file.
A fourth Windows x64 package, vulkan-compat-sse42. CPU and GPU backends on the SSE4.2
baseline, for x64 programs under an emulator that offers no AVX, such as Wine on an Apple
Silicon Mac.
Fixes
- GPU under Wine 10.20 and later. The first question on the GPU stopped the program with
Assertion failed: !status && "vkQueueSubmit". Wine returned no queue for the way the
engine asked for it; the queue is now fetched in a way Wine accepts. - Apple GPUs from Windows and Linux builds. Large full-precision passes are now split for
an Apple GPU in every build, as the macOS build already did.
Compatibility
The API version is still 1. The ten existing functions are unchanged and laya_set_codec is
the eleventh, so programs and bindings written for 1.0.14 work with these libraries as they
are. On the CPU, 1.0.15 gives the same answers as 1.0.14.
A program that must also run with older libraries can look laya_set_codec up at run time;
see Model files.
Packages
| System | Package |
|---|---|
| Windows x64 | avx2, compat-sse42, vulkan, vulkan-compat-sse42 |
| Windows ARM64 | arm64 |
| Linux | x86_64 (folders avx2, compat-sse42, vulkan), arm64 |
| macOS | arm64, arm64-vulkan, x86_64-avx2, x86_64-compat-sse42 |
The vulkan packages run on the CPU or the GPU; the others run on the CPU.
Tested
- Windows x64 and Linux x86-64, on the CPU with a test model: the library's test suite passes
(54 checks) with all seven libraries, and the answers match 1.0.14. .tarmodels and codecs: 23 cases (three tar formats, long names, variant folders, stored
weights with and without a codec, damaged archives), all as expected on Linux and on
Windows under Wine.- GPU from a Windows x64 program under Wine on an Apple M3 Ultra: answers match the CPU, in
full and half precision, confirmed with a diagnostic build of this version.
Details are in History and Platforms and packages.
LibLayaX 1.0.14: first public 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=1to trace every stage of a call,LAYA_CRASH_REPORT=1
for a crash report, and runlaya-probeto 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 findliblaya.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 x64compat-sse42library.
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).