SAGI - Swarm AGI Language Model
Collection
SAGI is a novel causal language model that integrates **swarm intelligence dynamics** with transformer architecture.
β’
1 item
β’
Updated
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.
| 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) |
DiffRouter) instead of hard module selectionMetaController activates capacity under resource constraints; trust dynamics bias reliable componentsβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 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.
pip install torch transformers datasets
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))
| 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 | Budget | Description |
|---|---|---|
| Compute | 60.0 | Compute budget per step |
| Memory | 20.0 | Memory capacity |
| Energy | 25.0 | Energy budget |
["truth", "safety", "efficiency"]This model is intended for:
Not intended for:
@software{sagi2026,
title={SAGI: Swarm AGI Language Model},
author={Reaperdoesntknow},
year={2026},
url={https://huggingface.co/your-reaperdoesntknow/SAGI}
}