Architecture

System Architecture Overview

How MoroAI's six core architectural subsystems assemble into a closed-loop local model adaptation foundry.

Architectural Layers

MoroAI is designed as an integrated six-layer pipeline that transforms raw unstructured data into deployed, continuously self-improving local models:

1. Epistemic Data Layer

Ingests raw CSV, JSONL, and text documents. Applies Positive Pointwise Mutual Information (PPMI), Resnik Information Content, and the MI Guard to retain critical domain corner cases while eliminating redundancy.

2. Hardware-Aware Recipe Layer

Probes local GPU architecture (CUDA, Apple Silicon Metal, ROCm). Mathematically computes activation memory and parameter gradients to output a zero-OOM moro.yaml recipe.

3. Self-Healing Execution Layer

Executes QLoRA / LoRA fine-tuning under an active supervisor. Catches CUDA memory limits and loss spikes with a 5-step autonomous recovery sequence.

4. Multi-Layer Evaluation Layer

Tests checkpoints across deterministic schema constraints, semantic LLM accuracy, Wasserstein distribution drift, and adversarial perturbation invariance.

5. Release Governance & Serving Layer

Quantizes weights to GGUF (Q4_K_M/Q8_0), signs cryptographic SHA-256 SBOM provenance records, and injects Modelfiles directly into local Ollama or vLLM engines.

6. DPO Continuous Alignment Layer

Mines real-world user interactions and feedback logs for chosen/rejected preference pairs to trigger offline alignment loops.

State Management & Lineage DAG

All operations are tracked in a local SQLite database (.moro/state.db) modeled as a Directed Acyclic Graph (DAG). Every deployed model can be audited backward to the exact data lines, token entropy, hyperparameter seeds, and hardware profile used in its creation.