SAGI - Swarm AGI Language Model
SAGI is a novel causal language model that integrates swarm intelligence dynamics with transformer architecture. The model treats cognition as a dynamic, adaptive system where multiple internal "agents" collaborate through differentiable routing, trust mechanisms, and shared memory.
Model Description
| Property | Value |
|---|---|
| Parameters | 52.72M |
| Architecture | Transformer Decoder + Swarm Dynamics |
| Hidden Size | 512 |
| Layers | 6 |
| Attention Heads | 8 |
| Context Length | 2048 |
| Vocabulary | GPT-2 tokenizer (50,257 tokens) |
Key Innovations
- Differentiable Routing: Continuous mixture-of-experts via attention (
DiffRouter) instead of hard module selection - Adaptive Gating & Trust:
MetaControlleractivates capacity under resource constraints; trust dynamics bias reliable components - Episodic + Semantic Memory: Dual memory system with trainable retrieval utility
- Curiosity Engine: Injects novel goals when surprise is low, promoting exploration
- Self-Model & Rollback: Predicts state transitions and detects anomalies for self-correction
- Resource Dynamics: Soft conservation with learned converter; cognition consumes/recovers compute, memory, energy
- Value Monitoring: Tracks alignment to core values and freezes plasticity under drift
How It Works
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ SAGI Model โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Swarm-7 V2.2 โโโโโโโถโ Swarm State S, T โ โ
โ โ (Cognitive โ โ (Working Memory) โ โ
โ โ Dynamics) โ โโโโโโโโโโโโโฌโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโฒโโโโโโโโโ โ โ
โ โ โผ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ Transformer Decoder โ โ
โ โ โ - Swarm-conditioned โ โ
โ โ โ attention & FFN โ โ
โ โ โ - RoPE embeddings โ โ
โ โ โโโโโโโโโโโโโฌโโโโโโโโโโโโโโ โ
โ โ โ โ
โ โโโโโโโโโโดโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Observation โโโโโโโโ LM Head โ โ
โ โ (from tokens) โ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
The swarm processes observations derived from token embeddings, updating its internal state S. This state conditions the transformer's attention patterns and feed-forward activations via learned projections, creating bidirectional information flow between symbolic (tokens) and subsymbolic (swarm dynamics) processing.
Usage
Installation
pip install torch transformers datasets
Quick Start
from transformers import AutoTokenizer
from transformers import AutoModelForCausalLM, AutoConfig
# Load model and tokenizer
model = AutoModelForCausalLM.from_pretrained("reaperdoesntknow/SAGI")
tokenizer = AutoTokenizer.from_pretrained("reaperdoesntknow/SAGI")
# Generate text
model.eval()
prompt = "Once upon a time"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(
**inputs,
max_new_tokens=100,
temperature=0.8,
top_k=50,
top_p=0.9,
do_sample=True,
pad_token_id=tokenizer.eos_token_id,
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Model Architecture Details
Swarm Configuration
| Parameter | Value | Description |
|---|---|---|
max_agents |
20 | Number of internal cognitive agents |
dim_s |
64 | State dimension |
dim_t |
32 | Task/goal dimension |
dim_obs |
48 | Observation dimension |
topk_route |
5 | Sparse routing top-k |
K_thought_max |
5 | Maximum thinking iterations per step |
Resource Budgets
| Resource | Budget | Description |
|---|---|---|
| Compute | 60.0 | Compute budget per step |
| Memory | 20.0 | Memory capacity |
| Energy | 25.0 | Energy budget |
Trust & Plasticity
- Trust Learning Rate: 0.07
- Fast EMA (Plasticity): 0.10
- Slow EMA (Consolidation): 0.002
- Core Values:
["truth", "safety", "efficiency"]
Limitations
- Early Research Model: This is an experimental architecture exploring swarm-transformer integration
- Training Data: Currently trained on TinyStories subset; may produce simple, story-like outputs
- Compute Requirements: Swarm dynamics add overhead compared to standard transformers
- Generation Quality: Model is undertrained; outputs may be repetitive or incoherent
Intended Use
This model is intended for:
- Research into multi-agent cognitive architectures
- Exploration of dynamic, adaptive language models
- Educational purposes in understanding swarm intelligence + LLMs
Not intended for:
- Production applications
- Safety-critical systems
- Generation of factual content
Training Details
- Dataset: TinyStories (subset)
- Optimizer: AdamW (lr=3e-4, betas=(0.9, 0.999), weight_decay=0.01)
- Scheduler: Cosine annealing
- Precision: FP32
- Hardware: CPU training (compatible with CUDA)
Citation
@software{sagi2026,
title={SAGI: Swarm AGI Language Model},
author={Reaperdoesntknow},
year={2026},
url={https://huggingface.co/your-reaperdoesntknow/SAGI}
}
Convergent Intelligence Portfolio
Part of the Standalone Models by Convergent Intelligence LLC: Research Division
Mathematical Foundations: Discrepancy Calculus (DISC)
SAGI's swarm intelligence dynamics connect to Discrepancy Calculus through Discrepancy Mechanics (Ch. 16 of the DISC monograph) โ a reformulation of dynamics that replaces Newton/Lagrange with four discrepancy laws:
- DL0 (Co-Motion): Agent kinematics via metric derivative and environment flow
- DL1 (Discrepancy Energy): $E_{\text{disc}}[f] = \frac{1}{2}\int w(x)(Df(x))^2 d\mu(x)$ โ stability through bounded discrepancy energy
- DL2 (Force as Discrepancy Gradient): Trust routing gradients as Euler-Lagrange from discrepancy action
- DL3 (Reciprocity): Symplectic invariance preserved across agent interactions
The discrepancy operator $Df(x) = \lim_{\varepsilon \downarrow 0} \frac{1}{\varepsilon} \int_x^{x+\varepsilon} \frac{|f(t) - f(x)|}{|t - x|} dt$ quantifies the local mismatch in each agent's contribution. The trust mechanism between agents is operationally a discrepancy energy minimization: agents whose outputs have high mutual discrepancy are weighted down; agents converging on shared structure are amplified.
Classical mechanics is recovered as a degenerate smooth limit of Discrepancy Mechanics โ just as standard single-head attention is a degenerate limit of swarm routing.
Full theory: "On the Formal Analysis of Discrepancy Calculus" (Colca, 2026; Convergent Intelligence LLC: Research Division).
Related Models
| Model | Downloads | Format |
|---|---|---|
| SMOLM2Prover | 56 | HF |
| SMOLM2Prover-GGUF | 150 | GGUF |
| DeepReasoning_1R | 16 | HF |
| S-AGI | 0 | HF |
Top Models from Our Lab
Total Portfolio: 49 models, 22,598 total downloads
Last updated: 2026-03-28 12:58 UTC
From the Convergent Intelligence Portfolio
DistilQwen Collection โ Our only BF16 series. Proof-weighted distillation from Qwen3-30B-A3B โ 1.7B and 0.6B on H100. Three teacher variants (Instruct, Thinking, Coder), nine models, 2,788 combined downloads. The rest of the portfolio proves structure beats scale on CPU. This collection shows what happens when you give the methodology real hardware.
Top model: Qwen3-1.7B-Coder-Distilled-SFT โ 508 downloads
Full methodology: Structure Over Scale (DOI: 10.57967/hf/8165)
Convergent Intelligence LLC: Research Division
- Downloads last month
- 813