This repository is the executable non-AMS implementation of Persistent Adaptive Expert Systems (PAES). It implements the control plane, neural reference models, memory architecture, continual-learning isolation, expert graph, multimodal/world-model paths, data preparation, evaluation, release governance, deployment assets, and experiment candidates required before full-scale training.
AMS is deliberately external. This repository contains only its versioned public contracts, plugin loader, dense correctness oracle, and conformance suite. It contains no AMS tiler, planner, streaming engine, storage engine, placement algorithm, memory arena, or kernel.
The repository is complete when a clean checkout can:
- validate every configuration and schema;
- run the full test suite;
- prepare deterministic text and tensor-bundle datasets;
- train and resume language, multimodal, and world-model profiles;
- execute the persistent cognitive runtime and API;
- create isolated adaptation candidates and evaluate promotion gates;
- instantiate all N01–N20 research candidates;
- verify an external AMS implementation through its public plugin contract;
- build a content-addressed, signed implementation-readiness release.
Full-scale model training, licensed frontier-scale corpus acquisition, empirical candidate selection, and production AMS delivery are external executions, not silently represented as completed work.
python -m venv .venv
source .venv/bin/activate
pip install -e '.[dev]'
python scripts/run_tests.py
python scripts/run_smoke_train.py --work-dir artifacts/smoke
python scripts/run_task_smokes.py
python scripts/run_ddp_smoke.py --work-dir artifacts/ddp-smoke
python scripts/preflight.py --root . --non-ams
paes model-info --config configs/models/reference.yamlPrepare text data and start a language-model run:
paes data prepare \
--input-jsonl examples/text-records.jsonl \
--output-dir artifacts/data/train \
--sequence-length 128 \
--split train
paes train \
--model-config configs/models/tiny.yaml \
--training-config configs/training/smoke.yaml \
--train-manifest artifacts/data/train/dataset-train.manifest.jsonRun the persistent API:
paes serve --state-dir .paes --host 127.0.0.1 --port 8080Validate an independently built AMS plugin:
paes ams conformance \
--plugin your_ams_package:backend_factory \
--output artifacts/verification/ams-conformance.jsonBind every training input into an immutable launch manifest:
paes launch build \
--source-manifest artifacts/release/SOURCE_MANIFEST.json \
--model-profile configs/models/frontier-template.yaml \
--training-profile configs/training/pretrain-template.yaml \
--train-dataset /data/train/dataset-manifest.json \
--validation-dataset /data/validation/dataset-manifest.json \
--evaluator-bundle configs/evaluation/reference.yaml \
--policy-bundle configs/policies/default.yaml \
--infrastructure-profile configs/infrastructure/cluster-template.yaml \
--ams-release /releases/ams-release.json \
--ams-conformance artifacts/verification/ams-conformance.json \
--output training-launch.json
paes launch verify --manifest training-launch.json --require-ams- VCAS: bounded active context over an unbounded logical event/memory address space.
- DMC: active, episodic, semantic, structured-world, procedural, and parametric-candidate memory.
- PNR: turnless persistent runtime with leased events, atomic transitions, transactional effects, replay, jobs, snapshots, and dead-letter handling.
- LSC: immutable serving snapshots, isolated adapter/router/expert/full candidates, fail-closed evaluation, canarying, atomic promotion, and rollback.
- DEG: versioned expert graph with governed add, route, split, merge, freeze, archive, restore, and activation transitions.
- GCD: reversible UTF-8 byte representation plus append-only learned concept anchors.
- CME: vision, audio, language, and spacetime encoders fused through a typed latent bus.
- SCWM: object-centric state, relation prediction, existence, dynamics, actions, and rollout.
- NAE: executable math, software, physics, music, and culture-native expert interfaces.
- Reference core: exact GQA, RoPE, RMSNorm, SwiGLU, sparse top-k MoE, adapters, LoRA, and optional tri-path sequence mixing.
- N01–N20: executable, feature-gated research candidates with explicit promotion/kill criteria in
docs/RESEARCH_PROGRAM.md.
src/paes/
ams/ External protocol, plugin loader, oracle, conformance
data/ Normalization, governance, dedupe, shards, tensor bundles
evaluation/ Reproducible evaluators and comparison outputs
experts/ Expert graph, router, native-algebra experts
learning/ Error ledger, isolated candidates, promotion policy
memory/ VCAS/DMC records, retrieval, context, consolidation
model/ Language, MoE, multimodal, world, adapters, sequence paths
research/ N01-N20 candidate implementations
tools/ Typed capability policy and sandboxed built-ins
training/ DDP/FSDP-aware trainer, checkpointing, deterministic resume
api.py FastAPI control surface
orchestrator.py Persistent cognitive event-to-memory/inference wiring
release.py Signed immutable releases and atomic activation
runtime.py Atomic event and effect processing
store.py Durable SQLite WAL control-plane reference
The release process is fail-closed. At minimum it verifies:
- Python compilation and package installation;
- all unit/integration/numerical tests;
- schema and configuration validation;
- placeholder and AMS-boundary scans;
- checkpoint integrity and resume;
- smoke data preparation, training, evaluation, and N01–N20 construction;
- API/runtime/memory snapshot integration;
- source manifest and SBOM generation;
- clean archive extraction and hash verification.
See docs/COMPLETION_BOUNDARY.md for the exact line between implemented software and training-time external inputs.
Neural outputs never authorize tools, releases, graph changes, credentials, or filesystem/network access. Those decisions remain in typed non-neural policy enforcement points. Serving weights and graphs are immutable within a release. Artifact integrity uses SHA-256 and release envelopes use Ed25519. See SECURITY.md and docs/SECURITY_MODEL.md.
Apache License 2.0. See LICENSE.