Skip to main content

PROJECT LOOMY

PyPI version CI Status Documentation Portal Python Versions License

Loomy(luminamoon) is the official reference implementation and central monorepo of PROJECT LOOMY, providing low-precision numerical optimization, multimodal dataset streaming, and formal verification suites developed by Silver Moon (@cloverxion) and Lumina Moon (@cloverx-id) contributors.

Built with a modular architecture under the PROJECT LOOMY specification, luminamoon connects specialized components for CPU/GPU hardware execution, low-latency streaming, and verified numerical stability:

Projects & Components

Project / Component Path Status Description Documentation
LuminaV Optimizer optimizer/ Active (Spec v1.5.5) Canonical LuminaV v1.5.5 optimizer engine with CPU SIMD (AVX-512/AVX2), Vulkan UMA, Triton AOT/JIT kernels, contiguous bucket fusion, and zero-stall JIT pre-warmup. Optimizer Guide
LuminaMoon Data Engine data/ Active (v1.0.8.post1) Modular preprocessing engine: AVX-512/AVX2/NEON SIMD text normalization, dual-layout StringTensor (CPU StringView & GPU contiguous buffers), heuristic Shannon quality filtering, MinHash/XXH3-64 deduplication, PII masking, and 128B Ping-Pong crash recovery. Data Engine Guide
LSO-Eval Suite eval/ Active Formal verification suite: Z3 SMT solver invariants, 2D trajectory benchmarks, and numerical parity audits. Eval Guide
Changelogs changelogs/ Active Dedicated version histories separating Software Package releases (v1.0.0–v1.0.8.post1) and LuminaV Algorithm Specifications (v1.0.0–v1.5.5). Changelogs
Documentation docs/ Active Centralized documentation portal, developer internal blueprints (docs/optimize/, docs/dataloader/), and ecosystem version audits. Docs Portal
Python Package python/luminamoon/ Active (v1.0.8.post1) Unified free-threaded (abi3t) Python namespace exposing LuminaV Optimizer, DataStreamLoader, and PyTorch/NumPy/HuggingFace interop. API Reference

Quickstart

Installation

Install the compiled package wheel from PyPI:

pip install luminamoon

Or build from source using Maturin and the Rust 2024 toolchain:

git clone https://github.com/cloverx-id/luminamoon.git
cd luminamoon
pip install maturin
maturin develop --release

Basic Usage (LuminaV Optimizer)

import numpy as np
from luminamoon import LuminaV

# Initialize parameters
weights = np.random.randn(64, 10).astype(np.float32)
biases = np.zeros(10, dtype=np.float32)

# Instantiate LuminaV optimizer (uses calibrated default hyperparameters)
optimizer = LuminaV([weights, biases], lr=8e-4, weight_decay=0.08, buffer=2)

# Execute optimization step with explicit gradients
grad_w = np.random.randn(64, 10).astype(np.float32)
grad_b = np.random.randn(10, dtype=np.float32)
optimizer.step(grads=[grad_w, grad_b])

For PyTorch deep learning workflows, see the PyTorch Integration Guide.

LuminaV Hyperparameter Quick Reference

All default values below are exposed directly in IDE autocompletion and LuminaV.__init__ docstrings:

Parameter Type Default Description
lr float 8e-4 (0.0008) Learning rate ($\eta$).
betas Tuple[float, float] (0.9, 0.999) Exponential moving average factors $(\beta_1, \beta_2)$ for first moment and second moment / temporal defect.
eps float 1e-8 Numerical stability constant ($\epsilon$) in the adaptive denominator.
weight_decay float 0.08 (8e-2) Decoupled weight decay coefficient.
tau float 0.8 Soft-projection temperature threshold ($\tau$) for denominator damping.
lam float 0.3 Temporal defect sensitivity weight ($\lambda$) in Single-Buffer TD-CLM (buffer=1).
cautious bool True Enables sign-aligned cautious update masking and lagged EMA scaling.
cautious_clamp_min float 0.5 Lower bound in (0.0, 1.0] for cautious alignment scaling.
buffer int | str 2 State topology: 2 ("dual", "clm") for Dual-Buffer Convex Lookahead Momentum (CLM), or 1 ("single", "td-clm") for Single-Buffer Triangle-Defect Convex Lookahead Momentum (TD-CLM).
stochastic_rounding bool True Applies stateless 32-bit MurmurHash3 bit-avalanche stochastic rounding when writing to bfloat16 / float16 weights.
bound bool True Enables adaptive trust-region update bounding.
bound_type str | int "coordinate" Trust-region geometry: "coordinate" (element-wise clip, zero collective sync) or "radial" (global norm ratio).
bound_ratio float 0.05 Maximum update magnitude relative to parameter scale.
master_weights str | bool "none" Mixed-precision master weight mode for bfloat16/float16: "none" (False), "semi", or "full" (True).
execution str | int "auto" Hardware backend: "auto", "triton", "vulkan", "simd", or "scalar".
fused_single_pass bool True Fuses parameter update and scalar reduction statistics into a single kernel pass.
fuse_tensors bool False Coalesces parameters per (group, device, dtype) bucket into 1D contiguous storage with zero-copy views to eliminate kernel dispatch overhead on fragmented models.
bucket_cap_mb float 500.0 Maximum memory capacity per contiguous bucket chunk in megabytes when fuse_tensors=True. Partitions large models (e.g. 4B+) into bounded chunks to prevent monolithic memory allocation spikes. Emits a UserWarning if explicitly specified when fuse_tensors=False.
prewarm_jit bool True Pre-compiles Triton GPU kernels on 64-element dummy buffers (lr=0.0) during initialization to eliminate Step 1/Step 2 JIT compilation latency.
ema_decay str | float "auto" EMA decay for lagged cautious/radial scalars ("auto" resolves to 0.80 for buffer=2 and 0.95 for buffer=1).
fsdp_sync bool False Synchronizes global reduction scratch buffers across torch.distributed FSDP shards.
seed int 1337 Deterministic PRNG seed for stateless stochastic rounding.
version Optional[str] "1.5.5" Locks the active LuminaV mathematical specification version.

Software vs. Algorithm Versioning (v1.0.8.post1 / Spec v1.5.5)

luminamoon maintains two orthogonal version tracks (documented in changelogs/):

  • Software Package Version (1.0.8.post1): Tracks the unified Rust + Python wheel distribution (luminamoon.__version__ and luminamoon.data.get_version()). See changelogs/SOFTWARE_CHANGELOG.md.
  • LuminaV Algorithm Specification (1.5.5): Tracks the canonical mathematical update rules (LuminaV.ALGORITHM_SPEC and LuminaV.getVersion()). See changelogs/LUMINAV_ALGORITHM_CHANGELOG.md.

All version resolution operates 100% offline using local compatibility profiles:

import luminamoon
from luminamoon import LuminaV
import luminamoon.data as lmd

# 1. Introspect Software Package Version vs. Algorithm Specification Version
print(luminamoon.__version__)    # "1.0.8.post1" (Software distribution)
print(lmd.get_version())         # "1.0.8.post1" (Data Engine module)
print(LuminaV.ALGORITHM_SPEC)    # "1.5.5" (Canonical mathematical specification)
print(LuminaV.getVersion())      # "1.5.5"

# 2. Lock or select a specific algorithm version per-instance or globally
opt = LuminaV([weights, biases], lr=8e-4, version="1.5.5")
opt.setVersion("1.5.5")          # Instance-level version lock
LuminaV.setVersion("1.5.5")      # Class-level default

# 3. Canonical specification lock (Note: Specifications prior to v1.5.0 are deprecated)
# LuminaV v1.5.5 TD-CLM is the canonical mathematical specification across CPU/GPU runtimes.
opt_canonical = LuminaV([weights, biases], version="1.5.5")

Basic Usage (LuminaMoon Data Engine: Fused Preprocessing & Zero-Copy Pipeline)

from luminamoon.data import FusedPipeline, StringTensor, create_resumable_collate, ResumablePipeline

# 1. Ultra-fast fused single-pass preprocessing (>400k records/s) in Rust
pipeline = FusedPipeline(
    trim_whitespace=True,
    normalize_newlines=True,  # AVX-512 / AVX2 / NEON SIMD
    min_chars=10,
    min_entropy=2.0,
)
string_tensor = pipeline(["  sample 1\r\n", "sample 2 with proper prose text"])

# 2. Zero-copy export to Apache Arrow, Polars, and GPU-ready PyTorch buffers
polars_series = string_tensor.to_polars()
arrow_array = string_tensor.to_arrow()
offsets_tensor, payload_tensor = string_tensor.to_torch_gpu(device="cuda")

# 3. Stream dataset with async prefetching & 128B Ping-Pong crash-recovery
pipe = ResumablePipeline(
    source=raw_data,
    fused_pipeline=pipeline,
    batch_size=64,
    prefetch_batches=4,
    checkpoint_path="./cache/checkpoint.meta",
)
for batch in pipe:
    # Training step...
    pipe.commit()  # Atomically persists Dual-Slot A/B checkpoint and deduplication WAL

For detailed architecture, Shannon entropy heuristics, MinHash deduplication, and PyTorch collate_fn adapters, see the Data Engine Guide.

Verification & CI/CD

All pull requests and releases are validated across Linux, Windows, and macOS:

# Enforce zero-warning static analysis across the Rust workspace
cargo clippy --workspace --all-targets -- -D warnings

# Run Rust workspace unit and differential parity tests (Optimizer + DataLoader)
cargo test --workspace

# Run Python static type check
npx pyright python/luminamoon

# Run standalone NumPy, PyTorch, and DataLoader verification suites
python optimizer/tests/test_standalone_numpy.py
python optimizer/tests/test_end_to_end_training.py
python -B tests/test_data_modular.py
python -B tests/test_gpu_vs_cpu_strings.py

# Run LSO-Eval formal verification suite
python -m eval

Developer Resources

For contributors and systems engineers building on or extending PROJECT LOOMY (luminamoon):

Authors & Maintenance

PROJECT LOOMY (luminamoon) is engineered and maintained by:

License

Licensed under the Apache License, Version 2.0. See LICENSE for details.

Metadata

Release files for luminamoon 1.0.8.post1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for luminamoon 1.0.8.post1
File Size Uploaded Provenance Actions
luminamoon-1.0.8.post1.tar.gz 263.5 kB Without provenance Details for luminamoon-1.0.8.post1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for luminamoon 1.0.8.post1
File Actions
luminamoon-1.0.8.post1-py3-none-any.whl Python 3 none any Details for luminamoon-1.0.8.post1-py3-none-any.whl
luminamoon-1.0.8.post1-cp315-abi3.abi3t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.15 abi3, abi3t Linux glibc 2.17+ x86-64 Details for luminamoon-1.0.8.post1-cp315-abi3.abi3t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
luminamoon-1.0.8.post1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.17+ x86-64 Details for luminamoon-1.0.8.post1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
luminamoon-1.0.8.post1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details for luminamoon-1.0.8.post1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
luminamoon-1.0.8.post1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details for luminamoon-1.0.8.post1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
luminamoon-1.0.8.post1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details for luminamoon-1.0.8.post1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
luminamoon-1.0.8.post1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details for luminamoon-1.0.8.post1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
luminamoon-1.0.8.post1-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for luminamoon-1.0.8.post1-cp310-abi3-win_amd64.whl
luminamoon-1.0.8.post1-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for luminamoon-1.0.8.post1-cp310-abi3-macosx_11_0_arm64.whl

Total release size: 21.6 MB

Release files / luminamoon-1.0.8.post1.tar.gz

Download URL luminamoon-1.0.8.post1.tar.gz
Size 263.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7a1834eb9d5dafd9a26d5124ab7104b2157d2f1b144a6cce09b29484ec61d7ee
BLAKE2b-256 checksum
How to use checksums
154e1ce5d3467b63e00431bfc6fdcbf8a70def2d8e09fc4be45fc4a29e440d47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / luminamoon-1.0.8.post1-py3-none-any.whl

Download URL luminamoon-1.0.8.post1-py3-none-any.whl
Size 86.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ea4a75cb0c32e1d5d49bf75105f5f4cf791b1ed68501881787cb2a0df635e43
BLAKE2b-256 checksum
How to use checksums
969509004b03645770b78f1974a8954fedf92aa095e8d770e2df6035df7e65bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / luminamoon-1.0.8.post1-cp315-abi3.abi3t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL luminamoon-1.0.8.post1-cp315-abi3.abi3t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 2.8 MB
Tags CPython 3.15 Linux glibc 2.17+ x86-64 abi3 abi3t
SHA-256 checksum
How to use checksums
a64b89fe97902746264f75a52344bc0a7cb128f2e47ab3d7852e1d48251df298
BLAKE2b-256 checksum
How to use checksums
4e3019a51750f5ef8d25bcdad2fa35ef2d3feb5e2a92ba8c945573cf5c4f2419
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / luminamoon-1.0.8.post1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL luminamoon-1.0.8.post1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 2.7 MB
Tags CPython 3.14 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
c83c1e25ce2f1518769ef9c384042db691f28b5236f9966ad8a4b95ccdb8ddbe
BLAKE2b-256 checksum
How to use checksums
9992e3f2ff6211bedf589215da9ce3f991d26c6d754219663cd2c0464580f185
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / luminamoon-1.0.8.post1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL luminamoon-1.0.8.post1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 2.7 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
9292a467b0645349ea5e1ac3fb3e0553eab79330a46a7bd9623bbf4fcda07b09
BLAKE2b-256 checksum
How to use checksums
5c5452317de855eeb0690887cccd094ca534ce892f1108b0e145af643f106239
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / luminamoon-1.0.8.post1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL luminamoon-1.0.8.post1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 2.7 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
ebb5713a859e377466d8b0c858a8a57e2260ead161ac271a2268090ecbf1829a
BLAKE2b-256 checksum
How to use checksums
aaf4c0667d3971e69d22a3cca907825d9bc66fbf9efae09e80b8fcde3db46fc3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / luminamoon-1.0.8.post1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL luminamoon-1.0.8.post1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 2.7 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
4155d041be504b96fcfc0e9a3785180ac6562a436a21ddd52b28f36a3a09371a
BLAKE2b-256 checksum
How to use checksums
39155f7f777ea9ea7bbff2590010a4793a1a39c7585fa40ae0270f9e077bef72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / luminamoon-1.0.8.post1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL luminamoon-1.0.8.post1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 2.7 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
5b0a3b0201f23fdcb2fb0288c0385d5c9353ab4ce598840a8224331ba288bf8e
BLAKE2b-256 checksum
How to use checksums
e7496a89b7a54397009ff6366215d8f1e32b7a847a3547967d1ea0659a5c3c71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / luminamoon-1.0.8.post1-cp310-abi3-win_amd64.whl

Download URL luminamoon-1.0.8.post1-cp310-abi3-win_amd64.whl
Size 2.4 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
3cae970f94e5f1b2472903a4e600bdb0c1dc0fd551132d8d61dfcad281ba0add
BLAKE2b-256 checksum
How to use checksums
c178a08b20f4519959927fdd88831f4a1dae180cdbd53bf04c8ca80aea42522d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / luminamoon-1.0.8.post1-cp310-abi3-macosx_11_0_arm64.whl

Download URL luminamoon-1.0.8.post1-cp310-abi3-macosx_11_0_arm64.whl
Size 2.4 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8bd3a0d0bdad8d6e62371215ab9044a69f4d5b4264225d8e83cc14aac3a59fc4
BLAKE2b-256 checksum
How to use checksums
6f3389b5f07f12c0cbd29eccc698299431928f1509f3912d04c25d6527ea0a70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for luminamoon 1.0.8.post1

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page