A Self-Referential Hypervectorial Cortex with Kuramoto Attractor Dynamics
Kanerva/Plate VSA on CPU. No weight matrix, no gradient, no GPU.
Knowledge is an append-only log of (address, value, weight) traces in
H = {+1,-1}^D. Read-back is Phi(q) — bundle over the Hamming ball
N_r(q), LSH-indexed. Teach a fact in one write.
A parchment that is never erased, only overwritten in layers.
No GPU. No gradient. No weights. No torch. No transformer.
33 Python modules. 367 tests. 2.2M memory traces. Trained in 51 minutes on CPU.
Address space C_addr(β≈4) ~ 10^1505 locations at D=20 000. Read-back
limit is per ball: k* ≈ 0.02 D exact / 0.03 D soft / 0.067 D theory.
Disk: ~12 GB free for the chunks + merge. First load downloads from this repo.
Teach a fact (O(1) write, no fine-tune):
python
1from palimseste.chat import Conversation
2conv = Conversation(model=lm, learn_live=True)3conv.teach("capital of mars","olympus mons city")4conv.reset()5print(conv.respond("capital of mars"))
Capacity probe (flags balls over k*_exact ≈ 0.02 D):
"Grows exponentially with D" applies to C_addr. Retrieval capacity is
linear and per neighborhood, which is why 2.2M traces still read
clean: LSH + radius keep |N_r(q)| under k*. 100% confidence means
no probed ball has crossed k*_exact yet — not k* = ∞.
Live probe (flags any query with |N_r(q)| > 0.02 D):
Every response below was retrieved by Hamming-neighborhood associative
lookup from 2,225,193 traces at 100% exact-recover (every ball still
under k* ≈ 0.02 D). No placeholders.
Identity
Q: who are you
A: i am palimpseste, a self-referential hypervectorial cortex.
Q: how are you different from chatgpt
A: chatgpt has billions of weights and uses gpus. i have zero weights
and run on cpu. i learn by writing, not by gradient.
Q: do you use a gpu
A: no, i do not use a gpu. only bitwise operations: xor, popcount,
thresholded sum.
Knowledge
Q: what is python
A: python is an interpreted programming language known for its clear
syntax and large standard library.
Q: what is javascript
A: javascript is a programming language that enables interactive web
pages and dynamic content.
Q: what is dark matter
A: dark matter is a mysterious substance that does not emit or absorb
light but exerts gravitational pull.
Math (computed from stored tables)
Q: what is 50 times 50
A: 50 times 50 is 2500
Q: what is 25 times 13
A: 25 times 13 is 325
Q: what is the capital of japan
A: the capital of japan is tokyo.
Creative Writing
Q: write a poem about the sea
A: the sea whispers ancient secrets to the shore, each wave a verse,
each tide a metaphor, in depths where light fears to descend,
lies a silence that has no end.
Q: write a haiku
A: stillness in the code, bits flip like falling autumn leaves,
silence after compute.
Conversation
Q: i am sad
A: i am sorry to hear that. sometimes talking helps. what is on your mind?
Q: that is interesting
A: i am glad you find it interesting. would you like to explore it further?
Response synthesizer, entity tracker, query router, code bank, calibrator
loop.py
Autonomous active-inference agent
Kuramoto Attractor Dynamics
The core innovation for creative generation. Standard associative memory
can only repeat stored sequences. Kuramoto dynamics enable emergence.
Each retrieved HV candidate is an oscillator coupled by Hamming similarity.
The coupled dynamics converge to an attractor — a novel HV state that is
a creative synthesis of multiple knowledge fragments.
Kuramoto model: d_i/dt = _i + K_ij sin(_j - _i)
i = phase of oscillator i
i = natural frequency (from retrieval similarity)
K_ij = coupling strength (from pairwise HV similarity)
Coherent Blending
The CoherentGenerator blends three signals at each token:
final = retrieval x 0.85 + kuramoto x 0.10 + transition x 0.05
Confidence-based creativity suppression: when retrieval is confident,
creative weights are suppressed quadratically. Result: perfect coherence
on known questions (coherence = 1.00), creative modulation on novel ones.
Requires Python >= 3.10 and numpy. No GPU, no torch.
Chat
python
1from palimseste.hf import HFPalimpsesteLM
23lm = HFPalimpsesteLM.from_pretrained("thefinalboss/palimpseste-max")4print(lm.respond("who are you"))5# -> "i am palimpseste, a self-referential hypervectorial cortex."
Note: The model is 10.4 GB, stored as 3 chunks under 5 GB each.
from_pretrained automatically downloads and merges all chunks.
Teach a new fact instantly
python
1from palimseste.chat import Conversation
23conv = Conversation(model=lm, learn_live=True)4conv.teach("capital of mars","olympus mons city")5conv.reset()6print(conv.respond("capital of mars"))# -> "olympus mons city"
1from palimseste.cortex import InstantExpert, Dreamer, Composer
2from palimseste.reasoning import Reasoner
34# Instant expertise5expert = InstantExpert(lm=lm)6expert.learn_from_text("Photosynthesis converts light into energy via chlorophyll.")78# Dream consolidation9dreamer = Dreamer(mem=lm.mem, phi=lm.phi)10dreamer.dream(n_cycles=3)1112# Compositional reasoning13conv = Conversation(model=lm)14reasoner = Reasoner(conv=conv)15composer = Composer(reasoner=reasoner)16result = composer.reason("what is the capital of the country that won the world cup 2018")17print(result.answer)# -> "paris"
Deploy the web app
bash
1pip install fastapi uvicorn
2python examples/api_server.py --model ./palimpseste-max --port 33323cd web &&npminstall&&npm run dev
PALIMPSESTE vs GPT-4
Property
GPT-4
PALIMPSESTE
Knowledge storage
Dense weight matrices
Append-only (a,v,w) log
Learning
Gradient + backprop
O(1) memory write
GPU
Required
Not needed (XOR + popcount)
Forgetting
Catastrophic
No overwrite (append-only). Loss = crosstalk when |N_r| > k*
Live learning
Requires fine-tuning
Instant (O(1) write)
Parameters
~176 billion
Zero (reconstructed)
Model size
200+ GB
10.4 GB
Training cost
Millions of dollars
51 minutes on CPU
Dreaming
Impossible
Hebbian consolidation
Attractor dynamics
N/A
Kuramoto coupling
Creativity
Weight interpolation
Emergent attractors
Chunked Model Storage
The 10.4 GB model is split into 3 chunks under 5 GB each to comply with
Hugging Face file size limits:
File
Size
palimpseste_memory.bin.part0
4.5 GB
palimpseste_memory.bin.part1
4.5 GB
palimpseste_memory.bin.part2
2.0 GB
from_pretrained automatically detects chunks, downloads them, merges
to a temporary file, and loads the full 2.2M trace memory.