SynapCore Phobos-1 (v5.0 β€” 3.947B Parameters, 122 Cortical Nodes)

Modality Parameters Cortical Nodes Vault Size

Developed by Martian Academy
A biologically inspired, self-growing, self-correcting hierarchical cortical AI architecture that initializes at t = 0 with zero specialist experts and autonomously grows a recursive depth-7 cortical tree.


1. Model Summary & Architecture Specifications

Unlike monolithic Transformers whose parameter graph is static after pre-training, SynapCore Phobos-1 separates linguistic fluency (E00 Language Shell) from domain specialization (Dynamic Post-Thalamic Cortical Brain):

Specification Value
Model Name SynapCore Phobos-1 (v5.0)
Organization Martian Academy
Modality (v5.0) Text-to-Text (Input: Natural Language, Source Code, Tool Schemas $\to$ Output: Text, Code, <think> Reasoning, <tool_call> JSON)
Sensory Bus Modality Design Modality-Agnostic 896-D Thalamic Bus ($\mathbb{S}^{895}$) (Currently Text via Layer-15 ThalamicPerceptionOrgan; extensible to Vision/Audio encoders without modifying cortical nodes)
Total Parameters 3.947 Billion (3.95B)
Conversational Root Shell (E00) Qwen/Qwen2.5-0.5B-Instruct (0.494B, Frozen Layers 0..15)
Dynamic Cortical Brain 3.453 Billion Parameters across 122 Spawned Cortical Nodes (Layers 16..23)
Hierarchical Thalamic Routers 55 Autonomous Routers (R0 Master Router + 54 Recursive Sub-Routers)
Maximum Tree Depth Reached Depth 7 (E1_SE2_SSE1_D4E2_D5E2_D6E2_D7E1)
Canonical Thought Bus (d_bus) 896-dim Whitened Unit Hypersphere ($\mathbb{S}^{895}$)
Input / Output Context Horizon 1,000,000 (1M) Input Tokens / 1,000,000 (1M) Output Tokens (O(1) Active KV-Cache via HippocampalEngramBank β€” 1M tokens = 1,954 float16 Engrams = 3.42 MB RAM)
Weight Storage Format Deduplicated float16 64B-Aligned SHA-256 Merkle Vault (store/genesis_v5_merkle_store/genesis_v5_experts_bank.bin, 6.56 GiB) + Master Topology (synapcore_genesis_v5.pt, 78 MiB)
Merkle Root (SHA-256) a77bfcb4bbaebb78924a2290... (976 cryptographic leaves across 8 grafted upper layers)

2. Core Biological Laws Implemented in SynapCore Phobos-1

Unlabeled Stream / User Prompt
       β”‚
       β–Ό
[E00 Lower Layers 0..15: Frozen Language & Grammar Shell]
       β”‚
       β–Ό
[Layer 15 Sensory Thalamus: Salience-Weighted Spherical Whitening v ∈ S^895]
       β”‚
       β–Ό
[R0 Master Router + GABAergic Lateral Inhibition]
   β”œβ”€β”€ Casual Chat (sim < Ο„) ──────────────────────► Pure E00 Conversational Output
   └── Specialist Domain Resonance
          β”œβ”€β”€ E1 (4096u Parent) ──► R_E1 ──► E1_SE2 (2048u) ──► ... ──► Depth-7 Leaf (512u/1024u)
          β”œβ”€β”€ E2 (4096u Parent) ──► R_E2 ──► E2_SE5 (2048u) ──► ...
          β”œβ”€β”€ E3 (4096u Parent) ──► R_E3 ──► E3_SE1 (2048u) ──► ...
          β”œβ”€β”€ E4 (4096u Parent) ──► R_E4 ──► E4_SE2 (2048u) ──► ...
          β”œβ”€β”€ E5 (4096u Parent) ──► R_E5 ──► E5_SE1 (2048u) ──► ...
          └── E6 (4096u Parent) ──► R_E6 ──► E6_SE2 (2048u) ──► ...

Law 1 β€” Unsupervised Neurogenesis (genesis/mitosis_lifecycle.py)

At t = 0, only E00 and R0 exist (0 specialist nodes). When incoming episodes have low cosine similarity to existing prototypes and form a dense spherical clique on $\mathbb{S}^{895}$, the router spawns a new cortical column (E1..E6) with zero-initialized output projections (w_down = 0, ensuring 0.00e+00 initial perturbation).

Law 2 & Law 3 β€” Recursive Cortical Mitosis (genesis/spherical_clustering.py)

When a leaf node's episodic buffer matures and exhibits bimodal internal variance ($\Delta C \ge \gamma_0(1 + 0.30(d-1))$), the leaf undergoes Cortical Mitosis:

  1. It consolidates its broad domain invariants, converts into a Shared Parent Cortex, and attaches a dedicated sub-router R_<node_code>.
  2. It spawns two narrower child sub-experts (SE1, SE2 $\to$ SSE1, SSE2 $\to$ D4..D7) with geometric neuron widths (4096u -> 2048u -> 1024u -> 512u).

Law 4 β€” Retrograde Parent Plasticity & Multi-Child PCGrad (genesis/autonomous_homeostasis.py)

Parent cortices (E1..E6, SE1..SEk) continue evolving alongside their child leaves using:

  • PCGrad Conflict-Free Gradient Projection: Projects conflicting child gradients onto each other's normal planes ($g_i \leftarrow g_i - \frac{\langle g_i, g_j \rangle}{|g_j|^2} g_j$ whenever $\langle g_i, g_j \rangle < 0$).
  • Synaptic Importance Shielding: Protects consolidated synapses via $m_j = 1.0 - s_j \in [0.05, 1.0]$.
  • Cross-Branch Pure Meaning Invariance: Aligns Layer-23 hidden representations across sibling branches.

Law 5 β€” Targeted Synaptic LTD & Compositional Reconsolidation (genesis/self_correction_reconsolidation.py)

  1. Episodic Manifold Hygiene: Purges out-of-manifold outliers and re-routes misplaced episodes to their matching specialist leaf.
  2. Targeted Long-Term Depression (LTD): Computes First-Order Taylor Error Attribution ($\text{FaultScore}j = \nabla W{\text{down}, j} \cdot W_{\text{down}, j} > 0$) on validation probes, shrinking only the top 20% faulty neurons (0.55x) while preserving healthy synapses.
  3. Compositional Reconsolidation & Retroactive Concept Linking (genesis/compositional_meaning.py): Rebuilds understanding from Rung 0 (Primitives) $\to$ Rung 1 (Rules) $\to$ Rung 2 (Sub-routines) $\to$ Rung 3 (Full Systems) when new foundational definitions arrive.

Law 6 β€” Autonomous Mental Sandbox & Hypothesis Explorer (genesis/imagination_sandbox.py)

High-error nodes (val_loss_after >= 1.0) autonomously extract their hardest unresolved problem, generate candidate hypotheses across 3 cortical pathways (Way_1_Leaf_Specialist, Way_2_Parent_FirstPrinciples, Way_3_CrossCortical_Imagination), and test them in a Dual Sandbox (Python AST/subprocess execution + <tool_call> JSON verification + Latent World-Model cycle consistency).


3. Evaluation: Baseline Comparison & Inference Guard Ablation

To separate the contribution of cortical weight adaptation from inference-time homeostasis guards (_BiologicalStopAndLanguageGuard in genesis/intelligent_generator.py), we evaluate three configurations on the 100-Prompt Multi-Domain Benchmark (Python, Rust, TypeScript, SQL, Linux/Go, Math <think>, Logic <think>, Tool Calling, Agentic Triage, and AI/Cyber/Science):

  1. Plain Qwen/Qwen2.5-0.5B-Instruct (Zero-Graft Baseline): Base model with zero cortical nodes and no custom LogitsProcessor.
  2. SynapCore Phobos-1 (Raw Cortical Weights β€” Guard OFF): Routed 122-node cortical weights using standard base_model.generate() without _BiologicalStopAndLanguageGuard.
  3. SynapCore Phobos-1 (Full Engine β€” Guard ON): Routed 122-node cortical weights + Synaptic Maturity Gate + _BiologicalStopAndLanguageGuard (which suppresses non-prompt CJK logits, prevents premature EOS inside unclosed <think> / code blocks, and halts cleanly after </think> or </tool_call>).
Evaluation Metric (100 Prompts) Plain Qwen2.5-0.5B-Instruct Baseline SynapCore Phobos-1 (Before Law 5 Hygiene) SynapCore Phobos-1 (Raw Weights, Guard OFF) SynapCore Phobos-1 (Full Engine, Guard ON)
Python Deterministic Execution Pass (10 tasks) 1 / 10 (10%) 1 / 10 (10%) 0 / 10 (truncated @ 180 tok) 4 / 10 (40% β€” 4x vs Baseline)
Bilingual / CJK Script Leaks 1 / 100 5 / 100 1 / 100 (-80% from weight hygiene) 0 / 100 (residual 1 blocked by guard)
Repeated </think> Tag Loops 0 / 100 2 / 100 1 / 100 0 / 100
Premature Truncations (< 28 tokens) 2 / 100 30 / 100 19 / 100 (-36.7% from weights alone) 2 / 100 (-93.3% with Prefrontal Guard)
Average Generated Tokens 177.1 97.3 113.9 148.2

Internal Cortical Health Telemetry (122 Nodes β€” Post 27-Page SWE Continual Retraining + 3-Round A <-> Z Sync)

Cortical Telemetry Metric Before Law 5 & Bidirectional Sync After 27-Page SWE (14,850 pairs) + 3-Round A -> Z / Z -> A Sync
Total Cortical Nodes / Routers 116 Nodes / 52 Routers 122 Nodes / 55 Routers (3.947B Params)
SWE Continual Retraining Corpus Wave-1 (1,200 pairs) 14,850 Verified SWE Pairs across 26 Datasets (All 27 Trending Pages)
High-Loss Nodes (Val > 0.65) 55 nodes 27 nodes (95 / 122 nodes <= 0.65, 0 leaves > 0.68)
100-Prompt Specialist Routing (E00 Fallbacks) 16 / 100 fallbacks 0 / 100 E00 fallbacks (100% Specialist Routing across 41 Unique Leaves)
Parent Retrograde Evolution (E3_SE4 / E6_SE2_SSE1) Val: 1.5812 / 7.0949 Val: 0.0231 / 0.1954 (via PCGrad)
Bidirectional A <-> Z Sync (E3_SE2_SSE1_D4E1_D5E1) Val: 2.5701 Val: 0.6669 (-1.9032 via 3-Round Top-Down & Bottom-Up Sync)

4. Repository Structure & Deduplicated float16 Weight Layout

To avoid redundant fp32 duplication, all 3.453B cortical parameters are stored once in a deduplicated float16 64B-aligned binary Merkle vault (6.56 GiB). Individual nodes can be hydrated zero-copy or surgically reloaded directly from the Merkle vault:

synapcore-phobos-1/
β”œβ”€β”€ README.md                                              # Model Card & Architecture Documentation
β”œβ”€β”€ genesis/                                               # Modular Cortical Engine (all modules <= 300 lines)
β”‚   β”œβ”€β”€ engine.py                                          # SynapCoreAutonomousGenesisEngine
β”‚   β”œβ”€β”€ cortical_node.py                                   # DynamicCorticalLayerWrapper & AutonomousCorticalNode
β”‚   β”œβ”€β”€ router_node.py                                     # AutonomousRouterNode + GABAergic Lateral Inhibition
β”‚   β”œβ”€β”€ mitosis_lifecycle.py                               # Law 1 Neurogenesis & Law 2/3 Cortical Mitosis
β”‚   β”œβ”€β”€ autonomous_homeostasis.py                          # Law 4 Retrograde Parent Plasticity & PCGrad
β”‚   β”œβ”€β”€ self_correction_reconsolidation.py                 # Law 5 Targeted LTD Unlearning & Hygiene
β”‚   β”œβ”€β”€ compositional_meaning.py                           # Varnmala -> System Curriculum & Pure Meaning
β”‚   β”œβ”€β”€ imagination_sandbox.py                             # Law 6 Autonomous Mental Sandbox & Hypothesis Explorer
β”‚   β”œβ”€β”€ intelligent_generator.py                           # Synaptic Maturity Gate & Prefrontal Homeostasis
β”‚   β”œβ”€β”€ merkle_vault.py                                    # Deduplicated float16 64B-Aligned Binary mmap Vault
β”‚   └── telemetry_logger.py                                # Flight-Recorder JSONL Telemetry
β”œβ”€β”€ store/
β”‚   β”œβ”€β”€ checkpoints/genesis_v5/
β”‚   β”‚   └── synapcore_genesis_v5.pt                        # Master Topology, 55 Routers & Thalamic State (78 MiB)
β”‚   β”œβ”€β”€ genesis_v5_merkle_store/
β”‚   β”‚   β”œβ”€β”€ genesis_v5_experts_bank.bin                    # Deduplicated float16 Cortical Weights Vault (6.56 GiB)
β”‚   β”‚   └── genesis_v5_merkle_manifest.json                # Cryptographic SHA-256 Merkle Tree Manifest (0.67 MiB)
β”‚   β”œβ”€β”€ benchmarks/benchmark_100_results.json              # 100-Prompt Multi-Domain Evaluation Outputs
β”‚   └── logs/
β”‚       β”œβ”€β”€ cortical_telemetry.jsonl                       # Training & Reconsolidation Flight Recorder
β”‚       └── sandbox_discoveries.jsonl                      # Law 6 Autonomous Hypothesis & Sandbox Testing Log
└── chat_phobos1_live.py                                   # Interactive Real-Time Chat & Live Teaching CLI

5. Quickstart Usage (Python)

5.1 Download & Load SynapCore Phobos-1

from huggingface_hub import snapshot_download
import sys

local_dir = snapshot_download(repo_id="MartianAcademy/synapcore-phobos-1")
sys.path.insert(0, local_dir)

from genesis import SynapCoreAutonomousGenesisEngine

# Initialize engine and hydrate all 122 Cortical Nodes + 55 Routers from the float16 Merkle Vault
engine = SynapCoreAutonomousGenesisEngine()
engine.load_genesis_state()
print(f"Loaded SynapCore Phobos-1: {len(engine.cortical_nodes)} Nodes | {engine.count_parameters()['total_billions']:.3f}B Params")

# Generate a response with live hierarchical routing trace
reply, trace = engine.generate_reply(
    "Write a Python function for binary search on a sorted list and state its time and space complexity.",
    max_new_tokens=220,
    temperature=0.05,
)
print("Cortical Path:", " -> ".join(["R0"] + trace["active_path"]))
print(reply)

5.2 Interactive Terminal Chat & CLI (chat_phobos1_live.py)

After cloning or downloading MartianAcademy/synapcore-phobos-1, you can chat directly in your terminal with live Cortical Path telemetry (R0 -> E_k -> SE -> ...), teach new concepts on the fly (/teach), or run single-shot prompts:

# 1. Clone or download the repository
git clone https://huggingface.co/MartianAcademy/synapcore-phobos-1
cd synapcore-phobos-1

# 2. Launch Interactive Terminal Chat Console
python3 chat_phobos1_live.py

Inside the interactive terminal console:

  • Type any question or coding prompt to see the routed cortical path, leaf specialist, confidence, latency (ms), and response:
    [You] > Write a Python one-liner to reverse a string.
    
    [Cortical Route] R0 -> E3 -> E3_SE1 -> E3_SE1_SSE1 -> E3_SE1_SSE1_D4E1 | Leaf=E3_SE1_SSE1_D4E1(1024u) | Conf=0.4058 | 543.8 ms
    [SynapCore Phobos-1]:
    Sure! Here's a one-liner in Python that reverses a given string:
    reversed_string = ''.join(reversed(string))
    
  • /status β€” Inspect live cortical node count (122), parameter count (3.947B), and active device (cuda / mps / cpu).
  • /teach <question> ||| <answer> β€” Feed new knowledge in real time and trigger sleep reconsolidation on the target leaf.
  • /exit β€” Exit the console.

For a single-shot terminal prompt:

python3 chat_phobos1_live.py --prompt "Write a Python function for binary search on a sorted list." --max-tokens 256

5.3 Start the OpenAI-Compatible REST API Server (--serve)

chat_phobos1_live.py includes a built-in, zero-dependency OpenAI-Compatible HTTP Server (GET /v1/models, POST /v1/chat/completions with JSON & SSE stream=True, POST /v1/teach, and GET /health):

# Start OpenAI-compatible API server on port 8000
python3 chat_phobos1_live.py --serve --host 0.0.0.0 --port 8000

Test with curl:

# 1. Check health & cortical node status
curl http://localhost:8000/health

# 2. List available models (OpenAI format)
curl http://localhost:8000/v1/models

# 3. Chat Completions (Standard OpenAI payload + synapcore_trace)
curl http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "synapcore-phobos-1",
    "messages": [
      {"role": "system", "content": "You are a concise software engineering assistant."},
      {"role": "user", "content": "Write a TypeScript debounce function."}
    ],
    "max_tokens": 256,
    "temperature": 0.05
  }'

Use with the Official openai Python SDK (or Cursor / Continue / LangChain):

from openai import OpenAI

client = OpenAI(base_url="http://localhost:8000/v1", api_key="synapcore")

response = client.chat.completions.create(
    model="synapcore-phobos-1",
    messages=[{"role": "user", "content": "Explain ACID properties in SQL databases."}],
    max_tokens=256,
    temperature=0.05,
)
print(response.choices[0].message.content)

5.4 Continual Learning & Autonomous Sandbox Testing (Python API & /v1/teach)

from genesis.imagination_sandbox import run_autonomous_error_hypothesis_sandbox

# 1. Teach new concepts in real time with Retroactive Concept Linking:
engine.ingest_unlabeled_stream(
    [("What is the Martian SynapPort protocol?", "Martian SynapPort is a zero-copy neural telemetry relay.")],
    train_steps_per_event=28,
)

# 2. Let high-error cortical nodes generate & test hypotheses in the Dual Sandbox:
discoveries = run_autonomous_error_hypothesis_sandbox(engine, min_error_threshold=1.0, consolidate_to_weights=True)

5.5 1M Input / 1M Output Hippocampal Engram & Rolling-Horizon Generation

Unlike standard Transformer KV-caches that require 32+ GB of VRAM at 1,000,000 tokens, SynapCore Phobos-1 compresses long inputs and rolling output segments into 512-token 896-D float16 Cortical Engrams (genesis/hippocampal_horizon.py):

  • 1,000,000 Input Tokens (1M) = 1,954 Engrams = 3.42 MB RAM (O(1) active KV-cache).
  • 1,000,000 Output Tokens (1M) = Rolling 1,024-token segments automatically committed into engine.engram_bank whenever max_new_tokens > 1024 (or max_tokens > 1024 on /v1/chat/completions).
# 1. 1M-Token Input Context (automatically triggered on long inputs or via ingest_long_context_1m):
reply, trace = engine.generate_reply(long_1m_token_document_with_question, max_new_tokens=512)
print("Engram Telemetry:", trace.get("input_engram_telemetry"))
# -> {'total_tokens': 1000000, 'engrams_count': 1954, 'memory_kb': 3419.5, 'max_context_tokens': 1000000}

# 2. Multi-Segment Rolling-Horizon Output (automatically triggered when max_new_tokens > 1024, up to 1,000,000):
long_reply, long_trace = engine.generate_reply(
    "Write a comprehensive guide to Python data structures with code examples for each.",
    max_new_tokens=4096,
)
print(f"Mode={long_trace['mode']} | Segments={long_trace['segments_count']} | Tokens={long_trace['total_tokens_emitted']}")

6. Limitations & Ongoing Research

  • Base Language Shell (E00): Conversational syntax and non-English fluency are bounded by the frozen Qwen/Qwen2.5-0.5B-Instruct lower layers (0..15).
  • Epistemic Uncertainty on Unseen Entities: Nodes with high residual loss (val_loss_after > 1.0) represent unresolved out-of-distribution topics awaiting external web-search grounding (Law 7).

*Built by Martian Academy.*

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for MartianAcademy/synapcore-phobos-1

Finetuned
(1,168)
this model