MoE Sovereign
A Self-Hosted Multi-Model Orchestrator with Template-Based Expert Routingfor Sovereign AI Infrastructure
Documentation •
Website •
Issues •
Changelog
Motivation
Commercial AI APIs process every request on infrastructure the customer neither owns nor can inspect. Training-data extraction, prompt logging, and retroactive policy changes are documented incidents. The European regulatory framework --- in particular GDPR Articles 25 and 32 --- mandates data protection by design, a requirement difficult to discharge with an opaque black box in a foreign jurisdiction.
MoE Sovereign is a fully self-hosted multi-model orchestrator with template-based expert routing that runs entirely on your own hardware. No data leaves your network. No cloud dependency. No vendor lock-in.
Architecture
flowchart TD
subgraph Clients["Client Layer"]
CC["Claude Code"]
OW["Open WebUI"]
API["Any OpenAI Client"]
end
subgraph Orchestrator["MoE Orchestrator (LangGraph)"]
Cache{"L0/L1 Cache<br/>Valkey + ChromaDB"}
Planner["Planner<br/><i>phi4:14b</i>"]
subgraph Experts["Parallel Expert LLMs"]
E1["Code Reviewer"]
E2["Researcher"]
E3["Domain Expert"]
end
MCP["28 MCP Tools<br/><i>AST-Whitelist + PPTX</i>"]
GraphRAG["Neo4j GraphRAG"]
Judge["Judge / Merger<br/><i>llama3.3:70b</i>"]
GapCheck{"Gap Detector<br/><i>COMPLETE?</i>"}
Replan["Agentic Re-Plan<br/><i>up to 3 rounds</i>"]
end
subgraph Storage["Persistence Layer"]
Neo4j[("Neo4j<br/>Knowledge Graph")]
Chroma[("ChromaDB<br/>Vector Cache")]
Kafka["Kafka<br/>Event Stream"]
Valkey[("Valkey<br/>State & Sessions")]
PG[("PostgreSQL<br/>Users & Checkpoints")]
end
Clients -->|"/v1/chat/completions<br/>/v1/messages<br/>/v1/responses"| Cache
Cache -->|Miss| Planner
Cache -->|Hit| Response
Planner --> E1
Planner --> E2
Planner --> E3
E1 --> MCP
E2 --> MCP
E3 --> MCP
MCP --> GraphRAG
GraphRAG --> Judge
Judge --> GapCheck
GapCheck -->|"COMPLETE"| Response["Response"]
GapCheck -->|"NEEDS_MORE_INFO"| Replan
Replan -->|"inject gap context"| Planner
Response -->|Ingest| Kafka
Kafka --> Neo4j
Response -->|Cache Write| Chroma
Judge -.->|"Retry on<br/>low score"| Planner
style Orchestrator fill:#f0f4ff,stroke:#4a6fa5
style Experts fill:#e8f5e9,stroke:#388e3c
style Storage fill:#fff8e1,stroke:#f9a825
Pipeline Stages
| Stage | Description |
|---|
| 1. Cache | L0 query-hash (Valkey, 30 min TTL), L1 semantic similarity (ChromaDB, cosine < 0.15), and a conservative knowledge-bypass tier: similar-but-not-exact queries skip the LLM when the prior answer was high-confidence and still fresh (cosine < 0.25, confidence ≥ 0.85, within TTL) |
| 2. Planner | Decomposes request into 1--4 subtasks with expert category assignment |
| 3. Experts | T1 models (≤20B) screen with confidence gating; T2 (24--80B) engage only on low confidence |
| 4. Tools | 28 MCP precision tools (math, subnet, date, legal, PPTX) via AST-whitelist — eliminates hallucinations within the deterministic computation boundary |
| 5. GraphRAG | Neo4j context enrichment with domain-scoped entity filters and trust-score decay. CAG layer intercepts static compliance domains (BAIT, VAIT, DORA, KRITIS) before the Neo4j query and injects pre-loaded authoritative text directly. Corrective RAG gate (Yan et al. 2024) scores each retrieved entity for query relevance and discards low-signal results before injection. Episode hints from past similar tasks are appended as routing context |
| 6. Judge | Synthesises expert outputs, evaluates quality, retries on failure (up to 3 attempts) |
| 7. Agentic Re-Plan | Lightweight gap detector checks completeness; if unresolved, injects findings into a new planner round (up to 3 agentic iterations) |
| 8. Ingest | Validated knowledge flows back into Neo4j via Kafka for graph accumulation acceleration |
Module Structure
The orchestrator codebase is organised into focused packages. main.py is a thin entry point (~1 500 LOC) holding the FastAPI app, lifespan, middleware, and graph wiring. All domain logic lives in dedicated packages:
moe-infra/
├── main.py # FastAPI app, lifespan, middleware, graph wiring (~1 500 LOC)
├── config.py # All os.getenv() — typed config constants
├── state.py # Shared mutable globals (redis_client, _userdb_pool, …)
├── prompts.py # Static prompt text + routing detection regexes
├── metrics.py # Single Prometheus registry
├── parsing.py # Stateless parsers: JSON extraction, confidence, history truncation
├── context_budget.py # Per-model context-window estimation
│
├── routes/ # FastAPI APIRouters (one per concern)
│ ├── health.py # /health, /metrics
│ ├── watchdog.py # /api/watchdog/*, Starfleet feature toggles
│ ├── mission_context.py # /api/mission-context
│ ├── graph.py # /graph/*
│ ├── feedback.py # /v1/feedback, /v1/memory/ingest
│ ├── admin_*.py # Benchmark, ontology, stats admin endpoints
│ ├── models.py # /v1/models
│ ├── ollama_compat.py # /api/* (Ollama protocol)
│ └── anthropic_compat.py # /v1/messages, /v1/responses, /v1/chat/completions
│
├── services/ # Business logic — no FastAPI imports
│ ├── auth.py # OIDC + API key validation + budget enforcement
│ ├── tracking.py # Usage logging, request lifecycle, budget counters
│ ├── routing.py # Expert template + per-template prompt resolution
│ ├── templates.py # Expert template + Claude Code profile loading
│ ├── llm_instances.py # ChatOpenAI singletons (judge, planner, ingest, search)
│ ├── inference.py # Node selection, fallback chain, Thompson sampling
│ ├── helpers.py # Progress reports, semantic memory, self-evaluation
│ ├── skills.py # Server-side skill resolution + ADMIN_APPROVED hard-lock
│ ├── healer.py # Ontology gap-healer (one-shot + dedicated subprocess)
│ ├── kafka.py # Fire-and-forget Kafka publish helper
│ └── pipeline/ # OpenAI / Anthropic / Ollama / Responses API handlers
│ ├── chat.py # OpenAI chat completions
│ ├── anthropic.py # Anthropic Messages API + tool/MoE/reasoning handlers
│ ├── ollama.py # Ollama-protocol streaming wrappers
│ └── responses.py # OpenAI Responses API
│
├── graph/ # LangGraph node implementations
│ ├── router_nodes.py # cache_lookup, semantic_router, fuzzy_router, _route_cache
│ ├── tool_nodes.py # mcp_node, graph_rag_node, math_node_wrapper
│ ├── planner.py # planner_node + plan sanitization + topological levels
│ ├── expert.py # expert_worker (parallel expert execution)
│ ├── research.py # research_node + research_fallback + domain extraction
│ └── synthesis.py # merger_node, thinking_node, resolve_conflicts_node, critic_node
│
├── pipeline/
│ ├── __init__.py # LangGraph graph builder — assembles nodes into the pipeline DAG
│ └── state.py # AgentState TypedDict (67 fields across 3 categories)
│
├── web_search.py # SearXNG integration with domain-reliability scoring
├── math_node.py # SymPy-backed math node (solve, integrate, differentiate)
├── graph_rag/ # GraphRAG query, entity linking, ontology, corrections
├── federation/ # Push / pull federation client to MoE Libris hubs
├── mcp_server/ # 28 MCP precision tools (AST-whitelisted)
├── admin_ui/ # Admin backend: experts, users, budgets, cleanup manager
├── prompts/systemprompt/ # 15 expert system prompts (English, "Respond in German.")
├── tests/ # 195 unit + integration + smoke tests (all green)
└── benchmarks/ # Overnight benchmark suite, GAIA runner, result injection
The orchestrator started as an 11 190-line monolith in main.py. A 14-phase split (Q2 2026) decomposed it into the structure above without a single behavioural change — every phase ended with the full test suite green. See docs/ARCHITECTURE.md for the detailed module map.
Key Capabilities
A) Core AI & Orchestration
| Capability | Description |
|---|
| 1 | Deterministic Expert Routing | Versioned, auditable templates --- not a probabilistic black box |
| 2 | Two-Tier Escalation | T1 screens fast; T2 engages only when needed --- incl. a low-confidence rescue that lets a trivial query escalate to T2 when T1 returns weak/empty output (TRIVIAL_LOW_CONF_RESCUE_ENABLED) |
| 3 | Neo4j GraphRAG | Trust-score self-healing, contradiction detection, domain-scoped filters |
| 4 | Community Knowledge Bundles | Export/import learned knowledge as JSON-LD with regex-based privacy scrubbing (PII, secrets, hostnames) |
| 5 | 51 MCP Precision Tools | AST-whitelisted --- 100% accuracy on deterministic tasks; includes wikidata_sparql, pubmed_search, crossref_lookup, openalex_search, duckduckgo_search, web_browser (Splash JS rendering), wayback_fetch, github_search_issues with fuzzy label resolution |
| 6 | VRAM-Aware Scheduling | Per-node VRAM limits, warm-model affinity, sticky sessions |
| 8 | Claude Code Integration | Full Anthropic Messages API with 6 profiles and streaming thinking blocks |
| 9 | Deployment Flexibility | One OCI image → LXC (tested), Docker Compose (tested), Podman rootless (tested), Helm/K8s (architecturally prepared, community validation requested) |
| 10 | 9.3× Accumulation Speedup | 707 s → 76 s latency over 5 benchmark epochs |
| 12 | Agentic Re-Planning Loop | After each synthesis the Judge checks completeness; unresolved gaps trigger a focused re-plan with injected context --- up to 3 autonomous iterations per request; domain-aware search cache prevents result poisoning across iterations |
| 13 | PowerPoint Generation | MCP generate_pptx tool creates fully formatted .pptx presentations from structured content and delivers them as signed Garage (S3) download links |
B) Security, Sovereignty & Admin
| Capability | Description |
|---|
| 7 | Multi-Tenant RBAC | Per-user token budgets, template permissions, SSO (Authentik/OIDC) |
| 11 | Autonomous Disk Management | System Cleanup Manager in Admin UI: configurable TTL per subsystem, daily cron automation, LangGraph checkpoint archiving, Docker build-cache pruning, history tracking with averages |
| 14 | Selective Template & Profile Export | Admin UI: individual templates and CC profiles can be checkbox-selected for targeted export --- no need to export the full set every time |
| 15 | Endpoint Availability Graph | System Monitoring shows a 24-hour stepped-line chart per inference server (UP/DOWN, 5-min resolution via Prometheus query_range) |
| 16 | API Endpoint Budget Overview | Per-endpoint budget cards with spend, limit, and colour-coded progress bar — read live from LiteLLM x-litellm-key-spend / x-litellm-key-max-budget headers |
| 17 | User Budget Response Headers | /v1/chat/completions returns X-MoE-Budget-Daily-Used and X-MoE-Budget-Daily-Limit — clients can gate on quota without a separate API call |
| 22 | Pipeline Transparency Log | Per-request routing log: expert domains engaged, complexity level, latency, cache hit, agentic rounds — queryable via /v1/admin/pipeline-log with CSV export for BI tools |
| 24 | Claude Desktop & Cowork Gateway | Full Anthropic Third-Party Inference Gateway spec: display_name in /v1/models, /v1/messages/count_tokens endpoint, X-Claude-Code-Session-Id tracking — compatible with Claude Desktop, Claude Cowork, and Claude Code out of the box. Run scripts/setup-claude-desktop.sh to auto-configure |
C) Enterprise Data Management (moe-codex Extension)
This feature group requires the optional moe-codex
enterprise stack (Apache NiFi, Marquez/OpenLineage, lakeFS). It is not part of the
moe-sovereign core and is deployed as a separate compose stack.
See the moe-codex repository for setup instructions.
| Capability | Description |
|---|
| 29 | OpenLineage Data Lineage (Marquez) | Five pipeline hook points (/v1/chat/completions, /v1/messages, /v1/responses, merger_node, kafka_ingest) emit OpenLineage 2.0.2 START/COMPLETE/FAIL events to a Marquez backend — fire-and-forget, no-op when MARQUEZ_URL is empty. Palantir Foundry-comparable lineage visibility for every MoE pipeline run |
| 30 | Enterprise Stack Dashboard | Admin UI /enterprise page surfaces NiFi, Marquez and lakeFS reachability with live latency probes, plus the most recent OpenLineage runs from Marquez. Auto-refreshes every 30 s; gracefully hides when INSTALL_ENTERPRISE_DATA_STACK=false |
| 31 | lakeFS Bundle Versioning | Every successful /graph/knowledge/import archives the JSON-LD bundle as a content-addressed commit on the moe-knowledge lakeFS repository — git-style audit log queryable via /api/enterprise/versioning/log, point-in-time bundle download via services.versioning.get_bundle_at() for rollback. Fire-and-forget; no-op when LAKEFS_ENDPOINT is empty |
| 32 | NiFi ETL Submission | Knowledge events (Kafka ingest + bundle import) are forwarded to a configurable NiFi ListenHTTP processor (NIFI_INGEST_URL), so downstream NiFi flows can fan out to S3/Solr/Elastic/Snowflake without orchestrator changes. JSON in body, MoE metadata as X-MoE-* FlowFile attributes; admin dashboard surfaces NiFi system diagnostics (uptime, heap, threads, version) at /api/enterprise/etl/status |
| 33 | Unified Data Catalog | Admin UI /catalog page aggregates datasets across all three back-ends in one searchable, source-filterable table — Marquez datasets per namespace, Neo4j entity-domain breakdown (entities/relations/syntheses), and lakeFS repositories with commit counts. Foundry-Catalog-equivalent cross-source browsing without leaving the admin UI |
| 34 | Branch-based Approval Workflow | POST /v1/graph/knowledge/import/pending stages a bundle on a lakeFS branch instead of Neo4j; admins review pending bundles in , then approve (= Neo4j import + lakeFS merge to main) or reject (= branch delete). Adds an explicit gate before any external knowledge enters the live graph |
Federated Knowledge Ecosystem
MoE Sovereign goes beyond a local RAG system. With community knowledge bundles, deployments exchange domain knowledge (law, Kubernetes, React, medicine) without sharing proprietary data or source code.
flowchart LR
subgraph Instance_A["Deployment A<br/><i>Banking</i>"]
GA[("Neo4j<br/>3 150 entities")]
end
subgraph Instance_B["Deployment B<br/><i>Healthcare</i>"]
GB[("Neo4j<br/>2 800 entities")]
end
subgraph Instance_C["Deployment C<br/><i>DevOps</i>"]
GC[("Neo4j<br/>1 200 entities")]
end
GA -- "Export Bundle<br/>(privacy-scrubbed)" --> Bundle["JSON-LD<br/>Knowledge Bundle"]
GB -- "Export Bundle" --> Bundle
Bundle -- "Import<br/>(trust-capped)" --> GC
Bundle -- "Import" --> GA
style Bundle fill:#e3f2fd,stroke:#1565c0,stroke-width:2px
Privacy protection: Metadata stripping • Regex detection of PII/secrets • Sensitive relation-type filter • ⚠ Human-in-the-loop responsible for contextual/structural PII (see Privacy Scrubber limitations)
Import safety: Entity MERGE (no duplicates) • Trust ceiling (0.5) • Contradiction detection via moe.linting
Every new installation enriches the collective knowledge graph. Every bundle import accelerates all participants. This is the network effect for open-source AI.
Benchmarks
| Benchmark | Score | Reference |
|---|
| GAIA Level 1 | 60% | GPT-4o: 33% • Claude 3.7: 44% • MoE Sovereign: 60% (6/10, moe-aihub-free-gremium-deep-wcc, best run) ⚠ |
| GAIA Level 2 | 50% | GPT-4o Mini: <30% • MoE Sovereign: 50% (5/10) — multi-hop database lookups, github issue events, Wikidata SPARQL ⚠ |
| GAIA Level 3 | 40% | MoE Sovereign: 40% (4/10) — complex multi-step research chains ⚠ |
| GAIA Overall | 46.7% | GPT-4o Mini reference: 44.8% • MoE Sovereign best: 46.7% (14/30) — 5 iterative runs 2026-04-25 ⚠ |
| Math Precision (MCP) | 10/10 | Deterministic AST computation, 0% variance |
| Security Code Review | 9.0/10 | SQLi + XSS identified and fixed |
| Adversarial MCP | 9/9 blocked | All code injection attempts stopped by AST firewall |
| 69 LLM Model Test | phi4:14b | Best planner/judge from 69 models tested |
| Accumulation Effect | 9.3× | 707 s → 76 s over 5 epochs (GraphRAG + cache); cold/warm latency difference, not a controlled causal ablation |
⚠ GAIA evaluation integrity note: One evaluation run inadvertently used non-sovereign (cloud) inference for the Planner/Judge nodes. The results above reflect that run. A controlled sovereign GAIA run is pending. See whitepaper Section 14 for full disclosure.
Quick Start
One-Line Install
Debian / Ubuntu:
curl -sSL https://raw.githubusercontent.com/moe-sovereign/moe-sovereign/main/install.sh | bash
macOS (Docker Desktop or rootless Podman; run as a regular user, never with sudo):
curl -fsSL https://raw.githubusercontent.com/moe-sovereign/moe-sovereign/main/install-macos.sh | bash
Manual Setup
git clone https://github.com/moe-sovereign/moe-sovereign.git
cd moe-sovereign
cp .env.example .env
nano .env # Set credentials and inference server URLs
sudo docker compose up -d
curl http://localhost:8002/v1/models
| Endpoint | URL |
|---|
| API (OpenAI-compatible) | http://<host>:8002/v1 |
| API (Anthropic/Claude Code) | http://<host>:8002/v1/messages |
| Admin UI | http://<host>:8088 |
Deployment Targets
flowchart LR
OCI["One OCI Image<br/><i>multi-stage, non-root</i>"]
OCI --> Solo["<b>Solo</b><br/>LXC / single VM<br/>~1.5 GiB RAM"]
OCI --> Team["<b>Team</b><br/>Docker Compose<br/>~6 GiB RAM"]
OCI --> Ent["<b>Enterprise</b><br/>Helm / K8s<br/>HA, HPA, PDB"]
Solo --> LXC["LXC / Proxmox"]
Team --> DC["Docker Compose"]
Team --> Pod["Podman (rootless) ✓"]
Ent --> K3s["K3s / Kubernetes"]
Ent --> OCP["OpenShift"]
style OCI fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
| Target | Status | Profile | Command |
|---|
| Docker Compose | Tested | team | docker compose up -d |
| LXC / Proxmox | Tested | solo | deploy/lxc/setup.sh |
| Podman (rootless) | Tested | team | curl -sSL https://raw.githubusercontent.com/moe-sovereign/moe-sovereign/main/install.sh | bash |
| K3s / Kubernetes | CI-validated (Helm charts) | enterprise | helm install moe charts/moe-sovereign |
| OpenShift | Implemented, environment-unvalidated | enterprise | helm install with openshift.enabled=true |
All targets use the same OCI image --- no code forks, no feature loss.
Services
| Container | Port | Purpose |
|---|
langgraph-orchestrator | 8002 | Core API (OpenAI + Anthropic compatible) |
moe-admin-ui | 8088 | Admin: experts, models, users, budgets, knowledge export, system cleanup manager |
mcp-precision | 8003 | 27 deterministic tools (math, date, subnet, law) |
neo4j-knowledge | 7474 | Knowledge graph (GraphRAG) |
terra_cache | 6379 | Valkey: state, sessions, performance scores |
chromadb-vector | 8001 | Semantic vector cache |
moe-kafka | 9092 | Event streaming (ingest, audit, feedback) |
terra_checkpoints | 5432 | PostgreSQL: user DB, LangGraph checkpoints |
moe-prometheus | 9090 | Metrics collection |
moe-grafana | 3000 | Dashboards (GPU, pipeline, infrastructure) |
Agent Integration
| Agent | Endpoint | Configuration |
|---|
| Claude Code | /v1/messages | export ANTHROPIC_BASE_URL=https://your-server |
| Codex CLI | /v1/responses | export OPENAI_BASE_URL=https://your-server |
| OpenCode | /v1/chat/completions | Provider config in config.toml |
| Aider | /v1/chat/completions | export OPENAI_BASE_URL=https://your-server/v1 |
| Continue.dev | /v1/chat/completions or /v1/responses | Add in .continue/config.json |
| Open WebUI | /v1/chat/completions | Add as OpenAI-compatible connection |
Ecosystem & Integrations
- openDesk Edu —
Educational digital workplace for universities, with planned
integration of MoE Sovereign as a self-hosted AI orchestration layer.
Competitive Landscape
| Feature | MoE Sovereign | Palantir AIP | Databricks | Glean | LocalAI | CrewAI | Ollama+WebUI |
|---|
| Multi-expert routing | ✓ | ✓ | ✓ | --- | ~ | ~ | --- |
| Deterministic routing | ✓ | ✓ | --- | --- | --- | --- | --- |
| Knowledge graph | ✓ | ✓ | ~ | ✓ | --- | --- | --- |
| VRAM-aware scheduling | ✓ | --- | --- | --- | --- | --- | ~ |
| Knowledge export/import | ✓ | --- | --- | --- | --- | --- | --- |
| MCP precision tools | ✓ | --- | --- | --- | ~ | --- | --- |
| Air-gap / fully local | ✓ | ~ | --- | --- | ✓ | ✓ | ✓ |
| Open source | ✓ | --- | ~ | --- | ✓ | ✓ | ✓ |
Note on Palantir comparison: The table above compares technical feature presence, not product maturity or enterprise support depth. Palantir AIP is a commercially mature platform with thousands of engineers, extensive certifications, and a global support organisation. MoE Sovereign is an open-source project addressing the same architectural problem space — with full data sovereignty, zero licence cost, and complete code auditability as its differentiating properties. See Palantir Comparison for a detailed assessment.
Hardware Requirements
| Resource | Minimum (solo) | Recommended (team) |
|---|
| OS | Debian 11+ / Ubuntu 22.04+ | Debian 13 (trixie) |
| RAM | 8 GB | 16 GB+ |
| CPU | 4 cores | 8 cores+ |
| Disk | 60 GB | 200 GB+ |
| GPU | None (API-only mode) | NVIDIA with CUDA, ≥ 8 GB VRAM |
| Docker | CE 24+ | Docker CE 27+ |
+ Enterprise Stack (moe-codex) | + 4 cores, + 8 GB RAM | + 8 cores, + 16 GB RAM |
The orchestrator runs on CPU. GPU VRAM is only needed on inference nodes (Ollama).
The moe-codex Enterprise Data Stack (NiFi 4 GB, lakeFS 512 MB, Marquez 1.5 GB + 2× Postgres)
adds significant overhead — plan a dedicated host or at least 8 GB additional RAM.
Documentation
Full documentation: docs.moe-sovereign.org
| Section | Content |
|---|
| Quick Start | First steps after installation |
| Architecture | System design, data flow, pipeline |
| Expert Templates | Template design and LLM routing |
| Agent Profiles | Claude Code, OpenCode, Aider, Continue.dev |
| GPU Monitoring | Node-exporter + Grafana for inference nodes |
| Import / Export | Templates, profiles, and knowledge bundles |
| Deployment | LXC, Docker, Podman, Kubernetes, OpenShift |
| API Reference | Full endpoint documentation |
| Maintenance & Disk Management | Cleanup Manager, TTL configuration, checkpoint archiving |
| Palantir Comparison | Honest architectural assessment — where the approaches converge and where the gap remains |
| Whitepaper (EN) | Full technical whitepaper v2.8 (PDF) |
|
Local preview: pip install mkdocs-material && mkdocs serve
Publications
Funded Research: EuroHPC LUMI-G
In June 2026, proposal EHPC-DEV-2026D06-XXX was awarded under the EuroHPC
Development Access programme (award notice received 2026-06-05): 4,500
node-hours (18,000 GPU-hours) on the LUMI-G supercomputer (AMD MI250X,
128GB HBM2e/node, ROCm stack, 2TB storage), 6-month duration.
The grant funds a distillation programme covering the five highest-impact
LLM-dependent decision points in the orchestration graph, replacing
cloud-routed inference with locally executable Small Language Models (SLMs)
where decision quality can be preserved:
| Component | Target model | Goal |
|---|
planner_node (primary lever) | Qwen2.5-1.5B / SmolLM2-1.7B, GGUF Q4_K_M | ≥90% of 35B-teacher GAIA plan quality at ~1/20 cost, 200–500ms CPU |
complexity_estimator | DeBERTa-v3-small, ONNX INT8 | 3–6ms inference |
| Semantic router | multilingual MiniLM-L12-v2 + triplet loss + FAISS | 8–12ms inference |
| RL routing policy | 3-layer MLP, offline RL | <1ms inference |
| Node ranker | XGBoost, ONNX | 0.3ms inference |
The 18,000 GPU-hours are budgeted across synthetic data generation, encoder/
reward-model training, planner SFT+DPO with ablations, offline RL, and a
final RLHF pass over six months. Rollout is gated behind a PLANNER_MODE
flag (llm / slm_local / hybrid) with confidence-based fallback to the
cloud teacher — the same fail-open principle already used for expert routing.
Details: CHANGELOG.md (v2.7.1) and the
arXiv paper, Section
"Funded Research: EuroHPC LUMI-G SLM Distillation Programme".
Training Results (August 2026): The complete empirical campaign — including
Judge training (deployed 2026-07-19), Planner v4 six-job SLURM chain, and the
teacher-student distillation pipeline — is documented in the
LUMI-G Training Paper
(PDF, 23 pages).
Key finding: reducing max_seq_len 8192→4096 yields only 1.2× speedup with
--no-packing (not the expected 4×); packing must be enabled to realise the
quadratic attention savings.
Research Basis
The formal logic state layer (capabilities #25–28) is grounded in peer-reviewed
mathematical logic research. We gratefully acknowledge the foundational contributions
of Prof. A. de Vries, whose unified algebraic hierarchy of logics provides the
theoretical framework for paraconsistent, intuitionistic, and fuzzy logic within
this system:
A. de Vries, "Algebraic hierarchy of logics unifying fuzzy logic and quantum logic",
arXiv:0707.2161 [math.LO], 2007. https://arxiv.org/abs/0707.2161
Additional classical results used: Gödel t-norm (1932), Łukasiewicz t-norm (1920),
Kolmogorov algorithmic information content (1965), Chaitin complexity bound (1966),
Ratcliff/Obershelp string similarity (1988). Full attribution in
docs/ARCHITECTURE.md.
Contributing
See CONTRIBUTING.md for the extension model (MCP tools, expert templates, Admin UI).
Please read CODE_OF_CONDUCT.md before opening issues or pull requests.
Disclaimer
MoE Sovereign is a research and productivity tool. AI-generated output may be inaccurate or misleading.
Medical and legal expert outputs do not constitute professional advice.
All AI output should be verified independently.
See PRIVACY.md for data handling details.
License
Apache License 2.0
See THIRD_PARTY_NOTICES.md for bundled component licenses.
Digital sovereignty lived, not preached.
Built on personally purchased consumer hardware. No cloud credits, no institutional funding.
If it works on five second-hand RTX 3060 cards, it works on anything.
moe-sovereign.org •
docs.moe-sovereign.org •
GitHub