PROJECT LOOMY
Loomy (luminamoon) is the reference implementation and central repository of PROJECT LOOMY, providing low-precision numerical optimization, dataset text preprocessing and data processing utilities, and an evaluation suite developed by Silver Moon (@cloverxion) and Lumina Moon (@cloverx-id) contributors.
Built with a modular Rust and Python architecture under PROJECT LOOMY, luminamoon provides components for CPU/GPU parameter updates, text dataset preprocessing, and numerical verification:
LSO-Eval v1.1.0 Evaluation & Verification Notebook: Open in Google Colab — Empirical Stage II–IV benchmarks executed on
LuminaV v1.5.3under nativetorch.bfloat16(centered_defect=False).
Projects & Components
| Project / Component | Path | Status | Description | Documentation |
|---|---|---|---|---|
| LuminaV Optimizer | optimizer/ |
Active (Math v1.6.0) |
LuminaV v1.6.0 optimizer implementation with CPU SIMD (AVX-512/AVX2), Vulkan UMA, Triton AOT/JIT kernels, Triangle Family (buffer="T1", "T2"), optional contiguous bucket fusion, and Triton JIT pre-warmup. |
Optimizer Guide |
| LuminaMoon Data Engine | data/ |
Active (v1.1.0) |
Modular text preprocessing library: AVX-512/AVX2/NEON SIMD text normalization, dual-layout StringTensor (CPU StringView & GPU contiguous buffers), Shannon entropy filtering, MinHash/XXH3-64 deduplication, PII masking, and 128B Ping-Pong checkpoint recovery. | Data Engine Guide |
| LSO-Eval Suite | eval/ |
Active (v1.1.1) |
Algorithm-agnostic optimizer evaluation & verification suite (LSO-Eval v1.1.0): Z3 SMT solver checks, 2D trajectory benchmarks, numerical parity tests, and Two-Class 4B LLM & Vision evaluation. |
LSO-Eval Guide |
| Changelogs | changelogs/ |
Active |
Version histories separating Software Package releases (v1.0.0–v1.1.0) and LuminaV Algorithm Math versions (v1.0.0–v1.6.0). |
Changelogs |
| Documentation | docs/ |
Active |
Documentation portal, developer guides (docs/optimize/, docs/dataloader/), and dependency version audits. |
Docs Portal |
| Ra-Family Architecture | python/luminamoon/nn/ |
Active (v1.1.0) |
Rational, tanh-free & square-root-free neural components: RaNorm, RaBatchNorm2d (with Conv2d weight folding), RaTanh, RaGELU, PosRaGLU (outlier-free gating in (0, 1)), and RaAttention with Cayley-Padé rational softmax. Dual Triton GPU and Rust AVX2/FMA SIMD acceleration. |
Ra-Family Guide |
| Python Package | python/luminamoon/ |
Active (v1.1.0) |
Unified free-threaded (abi3t) Python namespace exposing LuminaV Optimizer, DataStreamLoader, Ra-Family neural architecture, and PyTorch/NumPy/HuggingFace integration. |
API Reference |
| Scientific References | references/ |
Active |
Theoretical foundations, component mapping, and BibTeX citations for LuminaV (TD-CLM, Triangle Family) and Ra-Family rational neural architectures. | References Guide |
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 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 in IDE autocompletion and LuminaV.__init__ docstrings:
| Parameter | Type | Default | Description |
|---|---|---|---|
lr |
float |
8e-4 (0.0008) |
Learning rate (η). |
betas |
Tuple[float, float] |
(0.9, 0.999) |
Exponential moving average factors (β₁, β₂) for first-moment momentum and second-moment variance. |
eps |
float |
1e-8 |
Numerical stability constant (ε) in the adaptive denominator. |
weight_decay |
float |
0.08 (8e-2) |
Decoupled weight decay coefficient. |
tau |
float |
0.8 |
Denominator temperature scaling factor (τ) for 2-buffer variance damping. |
lam |
float |
0.3 |
Triangle-defect penalty weight (λ) on ` |
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 mode: 2 ("dual", "clm") for 2-Buffer CLM, 1 ("single", "td-clm") for 1-Buffer TD-CLM, "T2" for 2-Buffer Triangle Family (tanh-free), or "T1" for 1-Buffer Triangle Family (tanh-free). |
stochastic_rounding |
bool |
True |
Applies stateless 32-bit MurmurHash3 stochastic rounding when writing to bfloat16 / float16 weights. |
bound |
bool |
True |
Enables adaptive update bounding. |
bound_type |
str | int |
"coordinate" |
Clipping mode: "coordinate" (element-wise clip) 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 into contiguous 1D memory buffers to reduce kernel launch latency on fragmented architectures (e.g. Vision models / ViT). Not recommended for large LLMs or distributed FSDP training. |
bucket_cap_mb |
float |
500.0 |
Maximum memory capacity per contiguous bucket chunk in megabytes when fuse_tensors=True. Partitions large models into bounded chunks. 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 avoid first-step JIT compilation delay. |
ema_decay |
str | float |
"auto" |
EMA decay for lagged cautious/radial scalars ("auto" resolves to 0.80 for buffer=2/"T2" and 0.95 for buffer=1/"T1"). |
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.6.0" |
Selects the active LuminaV mathematical specification version. |
Software vs. Algorithm Versioning (v1.1.0 / Math v1.6.0)
luminamoon maintains two distinct, decoupled version lineages (documented in changelogs/):
-
Software Package Version (
v1.1.0):- Tracks the monorepo distribution, CPython FFI bindings, Rust SIMD crates, neural architecture (
luminamoon.nn), and Data Engine utilities on PyPI (pip install luminamoon). - To reproduce or execute older software package releases in Python, install the desired release directly via standard package management (
pip install luminamoon==1.0.9) or check out official git release tags. - See
changelogs/SOFTWARE_CHANGELOG.md.
- Tracks the monorepo distribution, CPython FFI bindings, Rust SIMD crates, neural architecture (
-
LuminaV Algorithm Math Version (
v1.6.0):- Tracks the mathematical optimization formulas, convergence envelopes, and hardware kernels of the LuminaV Optimizer independently from pip package updates.
- Four canonical mathematical formulations are supported:
1.6.0(canonical latest with Triangle FamilyT1/T2and Padé rational bounds),1.5.5(bucket fusion and Triton pre-warmup),1.5.4(Bitwise-BF16 state promotion), and1.5.3(single-buffer TD-CLM). - Features strict capability enforcement (Option B): locking to older mathematical versions (e.g.,
version="1.5.4") strictly rejects features introduced in later eras (such asbuffer="T2"orfuse_tensors=True) with actionable error messages, guaranteeing uncompromised mathematical reproducibility for scientific publications. - See
changelogs/LUMINAV_ALGORITHM_CHANGELOG.md.
import luminamoon
from luminamoon import LuminaV
import luminamoon.data as lmd
# 1. Inspect Software Package Version vs. Algorithm Math Version
print(luminamoon.__version__) # "1.1.0" (Software package release)
print(lmd.get_version()) # "1.1.0" (Data Engine package module)
print(LuminaV.ALGORITHM_MATH) # "1.6.0" (Canonical mathematical formulation)
print(LuminaV.ALGORITHM_SPEC) # "1.6.0" (Backward-compatible alias)
print(LuminaV.getVersion()) # "1.6.0"
# 2. Inspect capability matrix of any supported specification
caps = LuminaV.get_capabilities("1.5.5")
print(caps["allowed_buffers"]) # (1, 2)
print(caps["supports_triangle_family"]) # False (introduced in 1.6.0)
# 3. Lock algorithm version for scientific checkpoint reproducibility
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 specification
Basic Usage (LuminaMoon Data Engine: Fused Text Preprocessing Pipeline)
from luminamoon.data import FusedPipeline, StringTensor, create_resumable_collate, ResumablePipeline
# 1. Fused single-pass text preprocessing 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. Export to Apache Arrow, Polars, and 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 background prefetching & 128B Ping-Pong checkpointing
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() # Saves Dual-Slot A/B checkpoint and deduplication WAL
For detailed architecture, Shannon entropy filtering, MinHash deduplication, and PyTorch collate_fn adapters, see the Data Engine Guide.
Basic Usage (Ra-Family Rational Neural Architecture)
import torch
from luminamoon.nn import RaNorm, PosRaGLU, RaAttention
# 1. Square-root-free token normalization (L1-mean)
norm = RaNorm(dim=512)
x = torch.randn(2, 64, 512)
x_norm = norm(x)
# 2. Rational gated linear unit with strictly positive bounds in (0, 1)
mlp = PosRaGLU(dim=512, expansion=4)
x_ffn = mlp(x_norm)
# 3. Cayley-Padé rational multi-head attention (SFU-free softmax)
attn = RaAttention(dim=512, num_heads=8, qk_norm=True)
out = attn(x_norm, is_causal=True)
For complete architecture, parameter folding for Conv2d, and standalone NumPy usage, see the Ra-Family Guide.
Verification & CI/CD
All pull requests and releases are tested across Linux, Windows, and macOS:
# Run static analysis across the Rust workspace
cargo clippy --workspace --all-targets -- -D warnings
# Run Rust workspace unit and parity tests (Optimizer + Data Engine)
cargo test --workspace
# Run Python static type check
npx pyright python/luminamoon
# Run standalone NumPy, PyTorch, and Data Engine test 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 verification suite
python -m eval
Developer Resources
For contributors working on PROJECT LOOMY (luminamoon):
- Changelogs (Software & Algorithm):
changelogs/ - Optimizer Modular Documentation:
docs/optimize/ - Data Engine Modular Documentation:
data/ - Optimizer Library Audits:
docs/library_audit/ - Data Standalone Library Audits:
data/docs/library_audit/ - Data Engine Architecture & User Guide:
data/README.md - User Documentation:
docs/en/
Scientific Foundations & Citation
LuminaMoon's algorithms are built upon published theoretical principles, including Maligranda's triangle inequality envelopes, rational neural networks, and decoupled optimization mechanics.
For the full component mapping, algorithm comparisons, and BibTeX entries, see references/README.md and references/bibliography.bib.
To cite this repository in academic work:
@misc{loomy2026,
author = {Silver Moon and {Lumina Moon contributors}},
title = {Loomy: Low-Precision Numerical Optimization, Rational Neural Architecture, and Data Processing},
year = {2026},
publisher = {GitHub},
howpublished = {\url{https://github.com/cloverx-id/luminamoon}},
note = {PROJECT LOOMY repository}
}
Authors & Maintenance
PROJECT LOOMY (luminamoon) is developed and maintained by:
- Silver Moon (@cloverxion)
- Lumina Moon (@cloverx-id) contributors
License
Licensed under the Apache License, Version 2.0. See LICENSE for details.
Metadata
Release files for luminamoon 1.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 | Actions |
|---|---|---|---|---|
| luminamoon-1.1.0.tar.gz | 291.7 kB | Without provenance | Details for luminamoon-1.1.0.tar.gz |
Built distributions (wheels)
Total release size: 22.0 MB
Release files / luminamoon-1.1.0.tar.gz
| Download URL | luminamoon-1.1.0.tar.gz |
|---|---|
| Size | 291.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
80441e4ed239d61bf0bf5cd4c205c5c78ba0b614302330efa6d4c1c4fca68d9c
|
|
BLAKE2b-256 checksum How to use checksums |
ac0ccdc64a04349e25e6fbea89b4c901e90c5601c6e6aab8fe637bd05b067bc7
|
| 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.1.0-py3-none-any.whl
| Download URL | luminamoon-1.1.0-py3-none-any.whl |
|---|---|
| Size | 103.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3e35c7007d9ddda5f17b00a53fc081ea1e6a45fb415802b43579de987e086290
|
|
BLAKE2b-256 checksum How to use checksums |
acde1175c75b5d0fb2800d683160d83cd519c0bb3aa931b830a27e2c8fb805e9
|
| 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.1.0-cp315-abi3.abi3t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | luminamoon-1.1.0-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 |
9b919e04358d62b3dc3c7c59fcab5ed473304f238decc6e4ef1a07f1301701bd
|
|
BLAKE2b-256 checksum How to use checksums |
28d3dcb593c1c8e76f397ec2545704ee4778ca02b01fd0bcaf9648fdc96962f7
|
| 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.1.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | luminamoon-1.1.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.14 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
1487ebc68d808dc88d2d4728e35a784ee5cf7834e175254682af2901f2d1a124
|
|
BLAKE2b-256 checksum How to use checksums |
6e4e04889e472cc2743bc2ab6d7e63b139b3bf881eb5455d9840edd76c0b37de
|
| 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.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | luminamoon-1.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
0312d5b92e1b96f5bf72b54707d65bb22ac5c663df35d1496163f3ad658938cb
|
|
BLAKE2b-256 checksum How to use checksums |
568b61d3022796449b48160035b253811e73a5cc11872b00b32a8b93a7dcfe5e
|
| 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.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | luminamoon-1.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
f8813e487eee254a7e385fcc92fd9f18c63ebe18998c79ab6b337f919371ffbb
|
|
BLAKE2b-256 checksum How to use checksums |
afa2282ac4d33d4b092a6bd5833a58c523de716fcafe86bbfdd67b41a1d543e6
|
| 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.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | luminamoon-1.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
516c6ae8482adc8c96a2b16254d89863cb4ee5d584e742819afcb38348bda6dc
|
|
BLAKE2b-256 checksum How to use checksums |
a3054a9163516732b7f300b7dd95eb36f08c7689e076ddde1c2f9e429181834d
|
| 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.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | luminamoon-1.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
10d196cdead12ed9ae38b6fadb8a1f845d93fffd1978fb1f68cc40951a9c8cae
|
|
BLAKE2b-256 checksum How to use checksums |
e58dc46c6637cbb50ee92dc0bd19f47f90437b02ed0a0cde96d10f3da9c8f1eb
|
| 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.1.0-cp310-abi3-win_amd64.whl
| Download URL | luminamoon-1.1.0-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
99c1cedc3de77e63f89ec8e608f971689f5c5e0a6dce76f158e398974e51a80a
|
|
BLAKE2b-256 checksum How to use checksums |
ae999480b44efd127ada420f97ed5f4d812d6dd3b2283e7766b5ccb615034856
|
| 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.1.0-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | luminamoon-1.1.0-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 |
7581d1ffac8c71cabcb3c3b869f91c7fae7b78c5c09ad28566b89c06e14dcca6
|
|
BLAKE2b-256 checksum How to use checksums |
01cb3b6224089bf44b2a60eccdff9b100ba07ae795b0fd13f5f643d6f24116ed
|
| 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.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.