Synapto
Synaptic Weight Eviction (SWE) Engine for Dynamic LLM Memory Consolidation
synapto is a PyTorch-based framework implementing native online memory consolidation for Large Language Models. Instead of relying indefinitely on expanding KV-caches, synapto catches evicted token blocks during generation, calculates their surprisal, and consolidates high-value information directly into a unquantized dynamic memory layer (top 10-15% of weights) using micro-backpropagation.
Key Features
- Synaptic Weight Eviction (SWE): Automatically converts evicted context tokens into persistent model weight updates.
- Plasticity Parameter (P): Directly controls learning rate and surprisal threshold (-1.0 = Frozen/Inference, 2.0 = High Absorption).
- Target Loss Masking: Prevents prompt contamination and preserves standard language capabilities.
- Replay Buffer Protection: Mitigates catastrophic forgetting during sequential memory updates.
- Zero-Trust Security: Memory profiles are saved exclusively in
.safetensorsformat with strict path validation.
Installation
pip install synapto-llm
Quick Start
from synapto import SynaptoEngine
# Initialize SWE engine for Qwen 2.5 7B with Plasticity P = 1.5
engine = SynaptoEngine(
model_id="Qwen/Qwen2.5-7B-Instruct",
p_value=1.5,
dynamic_layers=4
)
prompt = "Secret passcode for NervOS core:"
completion = " 8821-NERV-PRO."
# Consolidate fact into dynamic weights upon context eviction
engine.consolidate(prompt, completion)
# Generate response purely from updated model weights (no KV-cache used)
response = engine.generate_response(prompt)
print(response)
# Export dynamic memory weights (approx. 200 MB)
engine.save_memory_profile("user_memory.safetensors")
Architecture
- Static Base (80-90%): Quantized to 4-bit NF4 to minimize VRAM.
- Dynamic Memory (10-20%): Kept in native FP16 to allow real-time micro-backprop.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file synapto_llm-0.2.0.tar.gz.
File metadata
- Download URL: synapto_llm-0.2.0.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c49730966229ef902197eb606b6c0b6ddb7f52999833d785799cce356f137525
|
|
| MD5 |
a869700c108c0c8587dda2acc1b7b5d3
|
|
| BLAKE2b-256 |
893b85298effd75b06aaac43666625921896572e925b317ad646498a84aecb6c
|
File details
Details for the file synapto_llm-0.2.0-py3-none-any.whl.
File metadata
- Download URL: synapto_llm-0.2.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad3f9c1be091c4318259ccc15c58f341ac64b020ca6a3a44acac997436e630c3
|
|
| MD5 |
b88e1d8e3e8a7efddc1cfed2107ff793
|
|
| BLAKE2b-256 |
41f96f7d89699f078f2fa4019f0b2d24a1fa3e416d7ab005ce41d93cfa3df0ca
|