Skip to main content

PROJECT LUMI

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

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

System Architecture

flowchart TD
    Shards["Dataset Sources (HF / PyTorch / Shards)"] --> DataLoader["LuminaMoon Data Engine (SIMD + StringTensor + XXH3)"]
    DataLoader --> TrainLoop["Training Loop (Batch Stream)"]
    DataLoader --> Checkpoint["128B Ping-Pong Checkpoint & WAL"]
    TrainLoop --> Checkpoint
    TrainLoop --> Dispatcher["LuminaV Hardware Dispatcher"]
    Eval["LSO-Eval Suite (Z3 SMT & Parity Gate)"] -.-> Dispatcher
    Dispatcher --> Triton["Triton AOT/JIT GPU (CUDA / ROCm)"]
    Dispatcher --> Vulkan["Vulkan 1.3/1.4 Compute (UMA / SPIR-V)"]
    Dispatcher --> SIMD["Rayon CPU SIMD (AVX-512 / AVX2)"]
    Dispatcher --> Scalar["Reference Scalar Core (Fallback)"]

Projects & Components

Project / Component Path Status Description Documentation
LuminaV Optimizer optimizer/ Active (v1.5.3) Canonical LuminaV v1.5.3 optimizer engine with CPU SIMD (AVX-512/AVX2), Vulkan UMA, and Triton AOT/JIT kernels. Optimizer Guide
LuminaMoon Data Engine data/ Active (v1.0.2) 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
Documentation docs/ Active Centralized documentation portal, developer internal blueprints (docs/optimize/, docs/dataloader/), and ecosystem version audits. Docs Portal
Python Package python/luminamoon/ Active 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
optimizer = LuminaV([weights, biases], lr=1e-3, 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 Algorithm & Data Engine Versioning (v1.5.3)

luminamoon natively implements the canonical LuminaV v1.5.3 reference algorithm and provides explicit version introspection, locking, and backward-compatible modular resolution:

from luminamoon import LuminaV
import luminamoon.data as lmd

# 1. Introspect default algorithm version (Canonical baseline: v1.5.3)
print(LuminaV.getVersion())   # "1.5.3"
print(lmd.get_version())       # "1.5.3"

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

# 3. Dynamic modular resolution & legacy support
# Legacy/historical versions (e.g. "0.9.0", "1.0.0") are automatically resolved
# via on-demand local caching (~/.cache/luminamoon/versions/<ver>/) without failure.
opt_legacy = LuminaV([weights, biases], version="0.9.0")

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 LUMI (luminamoon):

Authors & Maintenance

PROJECT LUMI (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.2.post2

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.2.post2
File Size Uploaded Provenance
luminamoon-1.0.2.post2.tar.gz 240.4 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for luminamoon 1.0.2.post2
File
luminamoon-1.0.2.post2-py3-none-any.whl Python 3 none any Details
luminamoon-1.0.2.post2-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
luminamoon-1.0.2.post2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details
luminamoon-1.0.2.post2-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details

Total release size: 7.8 MB

Release files / luminamoon-1.0.2.post2.tar.gz

Download URL luminamoon-1.0.2.post2.tar.gz
Size 240.4 kB
Tags Source
SHA-256 checksum
How to use checksums
76830f9fe69ae787917695ae1175e482fade1c6c7a6a790ad68babe94b8da123
BLAKE2b-256 checksum
How to use checksums
4894c3623e498e5662f79d4739464f61c3b933e1a2ec1b0f9b53f4dd13b24b91
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.2.post2-py3-none-any.whl

Download URL luminamoon-1.0.2.post2-py3-none-any.whl
Size 61.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fe8456f1fc2fc7f5af8160f6010cac922092a9dce2d69a38efa6e8e57a30c02d
BLAKE2b-256 checksum
How to use checksums
2be281cd51da0391ecb79e0f0ec8a05a320a2a5f95fac55f4ea9dffd7690a8f0
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.2.post2-cp310-abi3-win_amd64.whl

Download URL luminamoon-1.0.2.post2-cp310-abi3-win_amd64.whl
Size 2.4 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
858f9f80da10a201a81fa30341f66081da043c419ea0277b04ed65fd405e8947
BLAKE2b-256 checksum
How to use checksums
103cf00de8be5c4340a54fa0b9e028bb753d1bf2986c28439efcf290d128a4a2
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.2.post2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL luminamoon-1.0.2.post2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.7 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
2289098c382a281cffdc4562b8e7044da7fd7f9c335c6bb41a0df94f78718af1
BLAKE2b-256 checksum
How to use checksums
982c436c944945ae22c22a4ba31c2b673062f123d5ec59dffc6eb19eb160ac87
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.2.post2-cp310-abi3-macosx_11_0_arm64.whl

Download URL luminamoon-1.0.2.post2-cp310-abi3-macosx_11_0_arm64.whl
Size 2.3 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f28388a77e733f6e7a1139925d26b188d04c6ab3db684ac0b979b942b36ad74d
BLAKE2b-256 checksum
How to use checksums
b6dd5c3906bcc83a61ec08d289ffe4119b37b7355ac8d882aa95faa8ddead131
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.2.post2

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.

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