lignum
Fast inference for LightGBM and XGBoost models, with predictions that are bit-identical to the library that trained them.
pip install pylignum
import lignum
model = lignum.load("model.txt") # LightGBM model.txt / JSON, XGBoost .json / .ubj
preds = model.predict(X) # numpy array, or Arrow data (pyarrow, polars, ...)
The package is installed as pylignum and imported as lignum.
What it does
-
Exact. Raw scores and probabilities equal
booster.predict(...)bit for bit, including NaN, zero-as-missing and categorical splits, for LightGBM and XGBoost (XGBoost's float32 arithmetic included). -
Fast to start.
model.save("model.bin")writes a binary file that loads by memory mapping in well under a millisecond. -
Fast to predict. A cache-friendly interpreter for any batch size, and an optional compiled mode that turns the trees into native code with the system C compiler in a few seconds:
model.compile(library="model.so") # once, where a compiler is available model = lignum.load("model.bin", compiled="model.so") # production: no compiler needed
model.autotune(X_sample)measures both on your data and uses each where it is faster. -
Arrow input without copies.
predictreads pyarrow tables and batches, polars data frames and any object with the Arrow PyCapsule interface directly; dictionary columns are categories. -
C API for services in other languages (
include/lignum/c_api.h), with Arrow input as well.
Requirements
Python 3.10 or newer, numpy. Wheels are available for Linux (x86_64, aarch64), macOS 15+ (arm64, x86_64) and Windows (x64); other platforms build from source with a C++20 compiler. The compiled mode needs a C compiler at compile time only (cc on Linux and macOS; Visual Studio, MinGW gcc or clang on Windows).
Links
- Source and issues: https://github.com/misterekkk/lignum
- Documentation: https://misterekkk.github.io/lignum/
Metadata
Release files for pylignum 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pylignum-0.2.0.tar.gz | 2.0 MB | With provenance | Details for pylignum-0.2.0.tar.gz |
Built distributions (wheels)
Total release size: 11.2 MB
Release files / pylignum-0.2.0.tar.gz
| Download URL | pylignum-0.2.0.tar.gz |
|---|---|
| Size | 2.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f96c2a5cc3ff2692b279cbb6f2cb716cffd7b3b14b1a4aff3af28b839b8bfc8f
|
|
BLAKE2b-256 checksum How to use checksums |
ce1442a33210f4b0dfea37586068f6f87a678e6f8bfe09719071f501dd53c0a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / pylignum-0.2.0-cp312-abi3-win_amd64.whl
| Download URL | pylignum-0.2.0-cp312-abi3-win_amd64.whl |
|---|---|
| Size | 632.4 kB |
| Tags | CPython 3.12 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
ad84fbe97565b4702c2178fcc1d49ea9517e47af141a7fec481d8c94ea7e690d
|
|
BLAKE2b-256 checksum How to use checksums |
72719dde8cfb516683b9677dcbf84f776238f3b8198bbde64f9763e4bb0252b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / pylignum-0.2.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pylignum-0.2.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 737.9 kB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
8f6768071666310749338f25763163445535d3ec820fa680bb2559510c4b7dae
|
|
BLAKE2b-256 checksum How to use checksums |
a51dd36b8e0942aa3601ab033bed2de779e739af1c9cc8c2a44122ab6e80bd78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / pylignum-0.2.0-cp312-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
| Download URL | pylignum-0.2.0-cp312-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 612.1 kB |
| Tags | CPython 3.12 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
cf8485188fd18f3d0729d18d473e40c9dc41e569a35acdb2b92452c9aa76c172
|
|
BLAKE2b-256 checksum How to use checksums |
d55bfe871f91c3c21f736b76009cb5084786346b979231b48589a46a3904fbc2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / pylignum-0.2.0-cp312-abi3-macosx_15_0_x86_64.whl
| Download URL | pylignum-0.2.0-cp312-abi3-macosx_15_0_x86_64.whl |
|---|---|
| Size | 600.8 kB |
| Tags | CPython 3.12 abi3 macOS 15.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
9ad941c5ee138948997d4b102124fc43bbb413bb8c90b99186886b11ca90cd10
|
|
BLAKE2b-256 checksum How to use checksums |
9895d5799dd8f7b2505bb3c122aa8f68de0e85ff541a0751b0917eee740bfc25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / pylignum-0.2.0-cp312-abi3-macosx_15_0_arm64.whl
| Download URL | pylignum-0.2.0-cp312-abi3-macosx_15_0_arm64.whl |
|---|---|
| Size | 498.6 kB |
| Tags | CPython 3.12 abi3 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7298c3fb0b97e717bbc54add88ad197768a5d2da0a29f09e23afe89a75c719fd
|
|
BLAKE2b-256 checksum How to use checksums |
9f6bb8bbbbc9639bd4c42e18e1252695237249d80e80a13a6ef826059c0b6035
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / pylignum-0.2.0-cp311-cp311-win_amd64.whl
| Download URL | pylignum-0.2.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 633.0 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
d8e85d63c7d387a469e6c03c612eb8b94a57e8043f8d3000410bad47c3a2e1f2
|
|
BLAKE2b-256 checksum How to use checksums |
424f7cc2b9de00f3312306cc5b01f7cfa5b8b6c37fec02330d1bd24d64425667
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / pylignum-0.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pylignum-0.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 742.9 kB |
| Tags | CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
c76a9234e8788c375413a9d78028a908d4641cb88f52e5f5dddc1951a63be1d9
|
|
BLAKE2b-256 checksum How to use checksums |
98d2bfec05a06f75931b7895156f305d39fee5fc7ef225c1aebfcb591be68233
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / pylignum-0.2.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
| Download URL | pylignum-0.2.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 616.9 kB |
| Tags | CPython 3.11 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
0a0ccfabf65b61ac8b282153fabfaa8020a8ed4d8ae92f51f74723372d69e986
|
|
BLAKE2b-256 checksum How to use checksums |
d1308cad8ce136753e880f9a998d61a88227591cee2de8c18060ef940ea95d0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / pylignum-0.2.0-cp311-cp311-macosx_15_0_x86_64.whl
| Download URL | pylignum-0.2.0-cp311-cp311-macosx_15_0_x86_64.whl |
|---|---|
| Size | 602.3 kB |
| Tags | CPython 3.11 macOS 15.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
646056e100a4e792bd602922ff0a06ea9c0487ca924113e451cf88e9f2158565
|
|
BLAKE2b-256 checksum How to use checksums |
3c5882ca1fe717386ed5ee4b3ed1392ce5618116bb07f5bb9e009fb5c7b8c48d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / pylignum-0.2.0-cp311-cp311-macosx_15_0_arm64.whl
| Download URL | pylignum-0.2.0-cp311-cp311-macosx_15_0_arm64.whl |
|---|---|
| Size | 500.3 kB |
| Tags | CPython 3.11 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
0f53c6e467444e1a9d1dc1c7f849bc4f8df5b32fd951d8fa9ee5752487bc0607
|
|
BLAKE2b-256 checksum How to use checksums |
a1dcbc6bde9ad764f9372f7d07c425c59dbe23af64aa91b08ac16781f3158399
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / pylignum-0.2.0-cp310-cp310-win_amd64.whl
| Download URL | pylignum-0.2.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 632.6 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
0777a76aaeb6a47f97f785873b29bc1cf884cb58d72314dfa7261ac95d5c05ba
|
|
BLAKE2b-256 checksum How to use checksums |
406279be1b5dbcd4070efbfc9ebabbdded8a1be1880892baba8cdb49023e243b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / pylignum-0.2.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pylignum-0.2.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 743.5 kB |
| Tags | CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
2f186ece770a1194b4f7e489e06b3e38493c7ef3857bf98b4a72df1a57cfdc26
|
|
BLAKE2b-256 checksum How to use checksums |
65d73e77a6821cbee0979ef734c7466f82262fd3a7a019f08ba3c9b2c8934ea9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / pylignum-0.2.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
| Download URL | pylignum-0.2.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 617.4 kB |
| Tags | CPython 3.10 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
cdb47a09c6ddfeca61f9dbcea15a1aa42a85ef8c82683155847ab568672e4d35
|
|
BLAKE2b-256 checksum How to use checksums |
92b522b36b700095688d75fcf4837ff9b679e0127444decef3b8ecdc5263406e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / pylignum-0.2.0-cp310-cp310-macosx_15_0_x86_64.whl
| Download URL | pylignum-0.2.0-cp310-cp310-macosx_15_0_x86_64.whl |
|---|---|
| Size | 602.7 kB |
| Tags | CPython 3.10 macOS 15.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
50e0717db08cc1392735c735b8ffa660da87d02ee79ca0787d0cda6ef981a6e7
|
|
BLAKE2b-256 checksum How to use checksums |
bb2a22e38d17dcf565c0bc1a9abb853f9fddc9f16d686b85168ab7976158d204
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / pylignum-0.2.0-cp310-cp310-macosx_15_0_arm64.whl
| Download URL | pylignum-0.2.0-cp310-cp310-macosx_15_0_arm64.whl |
|---|---|
| Size | 500.7 kB |
| Tags | CPython 3.10 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
5c4e71e81dbfe056ac05c1637e73f0159087ca210b1c1f5009790ee6efbd7019
|
|
BLAKE2b-256 checksum How to use checksums |
c0fd844e7a1f544739eb8f236733a5d2752e4c1e088f427c8bd103a9ff06c26d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logSecurity for pylignum 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 16 files in this release have been uploaded with provenance metadata.
Attestation for pylignum-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.