laghu-rs
The optional Rust core of laghu. laghu loads model2vec static embedding models with far less memory than model2vec and gives the same vectors. With laghu-rs installed, laghu runs normalization, pre-tokenization, the Unigram Viterbi search and mean pooling in Rust threads, over the same memory-mapped files.
pip install laghu-rs # or: pip install 'laghu[rust]'
Nothing else changes: laghu finds laghu-rs and uses it for the models it supports. Output is identical, bit for bit, to laghu's pure-Python path and to model2vec 0.9.
On potion-multilingual-128M, 500-character chunks on 14 cores of an M3 Max:
| path | chunks/s | private memory |
|---|---|---|
| laghu with laghu-rs | 39,750 | 64 MB |
| laghu, pure Python | 1,736 | 67 MB |
| model2vec 0.9 | 5,276 | 1,360 MB |
laghu falls back to pure Python when laghu-rs is not installed or LAGHU_RUST=0 is set. It keeps Python's normalization and pre-tokenization when the tokenizers crate inside laghu-rs is not the same version as the installed Python tokenizers, or when the two disagree on a set of probe texts.
laghu-rs needs Python 3.11 or later. Building it from source needs Rust and a C compiler.
Metadata
Release files for laghu-rs 0.1.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 | |
|---|---|---|---|---|
| laghu_rs-0.1.0.tar.gz | 13.3 kB | Without provenance | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| laghu_rs-0.1.0-cp311-abi3-win_amd64.whl | CPython 3.11 | abi3 | Windows x86-64 | Details |
| laghu_rs-0.1.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.11 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| laghu_rs-0.1.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.11 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| laghu_rs-0.1.0-cp311-abi3-macosx_11_0_arm64.whl | CPython 3.11 | abi3 | macOS 11.0+ ARM64 | Details |
| laghu_rs-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl | CPython 3.11 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 7.4 MB
Release files / laghu_rs-0.1.0.tar.gz
| Download URL | laghu_rs-0.1.0.tar.gz |
|---|---|
| Size | 13.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1a7c53a046409d106321c2a7f82426bef8ff92ff46653d67bca243c893dababf
|
|
BLAKE2b-256 checksum How to use checksums |
44bc5ef40c967a1d7f7d0b20596f3f4dd823bb9f3a63d5a1d4d16b696b1b181b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / laghu_rs-0.1.0-cp311-abi3-win_amd64.whl
| Download URL | laghu_rs-0.1.0-cp311-abi3-win_amd64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.11 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
2c87dea6619f53cb265216b008a750b29a055d17b5949842b9b82711dbfce3f6
|
|
BLAKE2b-256 checksum How to use checksums |
a978115d44905e7dddcceb2a7c2c5fa54136111a34b1de45e4a827b58ec49fac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Release files / laghu_rs-0.1.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | laghu_rs-0.1.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
e388d58ffa1c6641140ee213b736ab9e62c39c4f06d2280d4683babe5f17fe4c
|
|
BLAKE2b-256 checksum How to use checksums |
4095cbb23ec4e6289045bf9720918bb7b7b1a2bb1e0c56bc25593d8662544d5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Release files / laghu_rs-0.1.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | laghu_rs-0.1.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
304100a2ff768c86f8198f25a13a45a838785f02914d3dd8e049910e66b8e07a
|
|
BLAKE2b-256 checksum How to use checksums |
f99b0e66db298c63cb0de7209d466379a14835c17ef939757d889a2e2eff3452
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Release files / laghu_rs-0.1.0-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | laghu_rs-0.1.0-cp311-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.11 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
e84833cbf3a890f2366f094f71f68c4e3cb8f9c740904b36c0e81a6ec4e588cd
|
|
BLAKE2b-256 checksum How to use checksums |
3142adeeb276ae50300ae576984890957fa0f1a76b601a64830a24c741b7d599
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / laghu_rs-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl
| Download URL | laghu_rs-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.11 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
aba008029cebd704cd59668aef49984daa17e7d7ba84e4062c27155b971e2cfe
|
|
BLAKE2b-256 checksum How to use checksums |
46fefbbca157e3079d5800142166b66a32662c85f3cf309b316bc8a9ac8e8f33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Security for laghu-rs 0.1.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.