Skip to main content

👁️ LMM 🦀

LMM

Work In Progress ASI (Best Run) Crates.io Docs.rs Crates.io Downloads PyPI version NPM version made-with-rust Rust License Maintenance

Share On Reddit Share On X Share On Linkedin

LMM (Large Mathematical Model) is a pure‑Rust framework that models higher‑dimensional reality through symbolic mathematics and physics simulation; Inspired by the Pharaonic model of intelligence: compress the world into durable, universal equations. No training. No GPU. No API key.

🐧 Linux (Recommended) 🪟 Windows 🐳 Docker
lmm-linux lmm-windows lmm-linux
Download lmm binary Download lmm.exe binary docker pull wiseaidev/lmm
cargo install lmm --features rust-binary cargo install lmm --features rust-binary docker run -it wiseaidev/lmm
lmm ← launches CLI lmm ← launches CLI Read DOCKER.md

🎬 Demo

The following demonstrates the symbolic prediction engine generating coherent English sentences powered entirely by deterministic mathematical equations and structural Subject-Verb-Object grammar; No neural networks, no statistical models. The engine supports a full suite of CLI subcommands including predict, summarize, sentence, paragraph, essay, and ask, enabling multi-paragraph construction driven entirely by mathematics.

🧠 What Does LMM Provide?

LMM bridges multimodal perception and actionable scientific discovery through five tightly integrated layers:

Layer Modules Purpose
Perception perception.rs, tensor.rs Raw bytes → normalised tensors
Symbolic equation.rs, symbolic.rs, discovery.rs GP symbolic regression, differentiation, simplification
Physics physics.rs, simulation.rs ODE models + Euler / RK4 / RK45 / leapfrog integrators
Causal causal.rs SCM graphs, do-calculus interventions, counterfactuals
Cognition consciousness.rs, world.rs, operator.rs Full perceive → encode → predict → act loop

⚙️ Architecture

flowchart TD
    A["Raw Input\n(bytes / sensors)"]
    B["MultiModalPerception\n → Tensor"]
    C["Consciousness Loop\nperceive → encode → predict\nevaluate → plan (lookahead)"]
    D["WorldModel\n(RK4 physics)"]
    E["SymbolicRegression\n(GP equation search)"]
    F["CausalGraph\nintervention / counterfactual"]
    G["Expression AST\ndifferentiate / simplify"]

    A --> B --> C
    C --> D
    C --> E
    E --> G
    G --> F
    D --> F

🔬 Key Capabilities

  • 🧬 Genetic Programming: population-based symbolic regression with template seeding (linear, quadratic, periodic) and variable-enforcement guards.
  • 📐 Symbolic Calculus: automatic differentiation (chain rule, product rule, trig) and constant-folding simplification.
  • 🌀 Physics Suite: Harmonic Oscillator, Lorenz Attractor, Pendulum, SIR Epidemic, N-body Gravity; All implement Simulatable.
  • 🔢 Field Calculus: N-D gradient, Laplacian, divergence, and 3-D curl via central differences.
  • 🔗 Causal Reasoning: structural causal models, do(X=v) interventions, and counterfactual queries.
  • 🧩 Neural Operators: circular convolution with SGD kernel learning and Fourier spectral operators.
  • 🔤 Text ↔ Equation: losslessly encode any text string into a symbolic equation and recover it exactly via integer residuals.
  • 🔮 Symbolic Prediction: equation-native text continuation using sliding-window GP regression and vocabulary anchoring.
  • 🎲 Stochastic Enhancement: synonym-bank word replacement (--stochastic) delivers unique output each run while preserving mathematical sentence structure.
  • 🎨 Spectral Image Synthesis: generate procedural PPM images from a text prompt by hashing it into Fourier wave components.

📦 Installation

The lmm crate ships the following Cargo features:

Feature Description
rust-binary Enables the standalone lmm terminal CLI executable
cli Core CLI scaffolding (subsets of rust-binary)
net Internet-aware ask command via DuckDuckGo search
python Python extension module via pyo3 / maturin
node Node.js native add-on via napi-derive

🦀 Rust

The lmm library is available on crates.io. For the complete API reference, installation guide, and worked examples, see the Rust usage guide.

💻 Command-Line Interface

The lmm binary supports 15 subcommands spanning simulation, discovery, encoding, prediction, summarisation, and rich text generation: all powered by pure equations.

For the full option reference and usage examples, see the CLI documentation or run lmm --help after installing with cargo install lmm --features rust-binary.

🐍 Python

The Python bindings are published to PyPI as lmm-rs and are installed with pip install lmm-rs. Built with maturin, the package ships pre-compiled wheels for major CPython versions and runs a fully embedded Tokio runtime; no asyncio required.

For installation instructions, configuration options, and full method signatures, see the Python usage guide.

🟩 Node.js

The Node.js bindings are published to npm as @wiseaidev/lmm and are installed with npm install @wiseaidev/lmm. Built with napi-rs, the package ships a pre-compiled .node add-on with TypeScript type definitions.

For installation instructions, type definitions, and examples, see the Node.js usage guide.

🌐 WebAssembly (WASM)

LMM natively targets wasm32-unknown-unknown. Because reqwest switches to the browser fetch API automatically, you can deploy LMM inside Rust frontend frameworks such as Yew, Dioxus, and Leptos without any additional glue code.

For CORS considerations, build steps, and usage details, see the WASM usage guide.

🤖 Agent Framework

The lmm-agent crate extends LMM with a fully autonomous, equation-based agent layer; no LLM, no API key, no training data.

Document Description
AGENT.md Architecture, quick-start, types, and async API reference
DERIVE.md #[derive(Auto)] macro: generated traits and field contract
lmm-agent README Crate-level API reference, builder, and example
lmm-derive README Macro crate details and field rules

📰 Publications & Research

The architecture, formal mathematics, and paradigm are fully documented in the official whitepaper: Read the Whitepaper (PDF).

Blog Posts

📝 Citation

If you use LMM in your research, please cite our whitepaper:

@article{harmouch2026lmm,
  author  = {Mahmoud Harmouch},
  title   = {Mathematics Is All You Need: Training-Free Language Generation via
             Symbolic Regression and Stochastic Determinism},
  year    = {2026},
  url     = {https://github.com/wiseaidotdev/lmm}
}

🤝 Contributing

Contributions are welcome! Feel free to open issues or pull requests on GitHub.

📄 License

Licensed under the MIT License.

⭐ Star Us

If you use or enjoy LMM, please leave us a star on GitHub! It helps others discover the project and keeps the momentum going ☕.

Star History Chart

Metadata

Release files for lmm-rs 0.2.8

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

Built distribution (wheel)

Table of built distributions (wheels) for lmm-rs 0.2.8
File Interpreter ABI Platform
lmm_rs-0.2.8-cp312-cp312-manylinux_2_38_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.38+ x86-64 Details

Release files / lmm_rs-0.2.8-cp312-cp312-manylinux_2_38_x86_64.whl

Download URL lmm_rs-0.2.8-cp312-cp312-manylinux_2_38_x86_64.whl
Size 3.3 MB
Tags CPython 3.12 Linux glibc 2.38+ x86-64
SHA-256 checksum
How to use checksums
e88755ce136fec2fee7f55858f420387943c364fe66469314c0ba86e7cac8ecc
BLAKE2b-256 checksum
How to use checksums
17b75ec12ac2ade81f432742735da7f3e4cd186eb385387a26f936412e6acda0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Security for lmm-rs 0.2.8

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