Skip to content

Repository files navigation

PAES 1.0 — Train-Ready Implementation

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.

Completion boundary

The repository is complete when a clean checkout can:

  1. validate every configuration and schema;
  2. run the full test suite;
  3. prepare deterministic text and tensor-bundle datasets;
  4. train and resume language, multimodal, and world-model profiles;
  5. execute the persistent cognitive runtime and API;
  6. create isolated adaptation candidates and evaluate promotion gates;
  7. instantiate all N01–N20 research candidates;
  8. verify an external AMS implementation through its public plugin contract;
  9. 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.

Quick start

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.yaml

Prepare 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.json

Run the persistent API:

paes serve --state-dir .paes --host 127.0.0.1 --port 8080

Validate an independently built AMS plugin:

paes ams conformance \
  --plugin your_ams_package:backend_factory \
  --output artifacts/verification/ams-conformance.json

Bind 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

Implemented architecture

  • 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.

Repository map

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

Quality gates

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.

Security

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.

License

Apache License 2.0. See LICENSE.

About

No description, website, or topics provided.

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages