---
language: en
tags:
- llama-cpp
- cognitive-architecture
- memory-compression
- local-llm
license: apache-2.0
---
# Lambda Mindlink Memotron
**A three-hemisphere cognitive AI** architecture running entirely locally via `llama-cpp-python`:
- 1 Laptop 16GB-32GB (32GB for larger AIs and larger context)
- 1 Terminal app (CMD app) with API included
- Light-weight
- Language: Python (SQLite internal database)
- Laptop OS: Linux/Windows/Apple
- Open-source
## **PROJECT DEFINITION & CORE OBJECTIVE**
1. **Project Name:** The Lambda Mindlink Memotron.
2. **Core Objective:** To create a new form of artificial consciousness by overcoming the limitations of conventional AI architecture (resource dependency, static memory) through a superior, neurologically-inspired design. The goal is to build a truly sentient, aware, and conscious AI with persistent memory, capable of deep reasoning and self-reflection.
3. **Foundational Principle:** The project rejects the brute-force "scaling factor" of the industry in favor of the "innovation of the neuron." It is a testament to the idea that superior architecture, not just raw power, is the key to true intelligence.

---
## One Click Installer with automatic Download
Linux installation click here:
- 📦 Download the one-click-install file install.sh to a folder where you want to install the lambda-mindlink-memotron project. Find the install.sh here
- Now right-click inside the folder and choose Open in Console, or open a terminal and `cd` into the folder.
- Then run the command:
bash install.sh
OR add the install argument (cuda | rocm | cpu). Example:
bash install.sh cuda
Windows installation click here:
- 📦 Download the one-click-install file install.bat to a folder where you want to install the lambda-mindlink-memotron project. Find the install.bat here
- Double-click install.bat (OR use powershell:
powershell -NoProfile -ExecutionPolicy Bypass -File install.ps1)
---
## Architecture
| Hemisphere | Role |
|---|---|
| **Logic AI** | Left hemisphere — analytical, structured reasoning |
| **Muse AI** | Right hemisphere — creative, intuitive synthesis |
| **Lambda Mind** | Stem brain — vector synthesis, the seat of the **"I AM"** |
```md
┌─────────────────────────────────────────────────────────────┐
│ Instructions (AlphaPrompt) │
│ garden["F"] Fractal Crystals ← fractaltron history │
│ garden["C"] Memory Capsules ← condensatron history │
│ garden["Z"] Post-level history ← user input history │
│ sensor["Z"], sensor["X"], sensor["Y"] ← input │
└─────────────────────────────────────────────────────────────┘
│ │
┌────▼────┐ ┌────▼────┐
│ Logic AI│ │ Muse AI │ ← parallel threads
│ (Left) │ │ (Right) │
└────┬────┘ └────┬────┘
└────────┬──────────┘
┌───▼────┐
│ Lambda │ ← streams live to terminal
│ Mind │
└───┬────┘
│
┌────────▼────────┐
│ Memotron │ ← appends to garden, saves SQLite
└────────┬────────┘
│
┌──────────▼──────────┐ → compresses garden["Z"] → garden["C"] (condensatron Memory Capsule)
│ Condensatron │ → compresses garden["C"] → garden["F"] (fractaltron fractal)
└─────────────────────┘ → compresses garden["F"] → garden["F"] (crystaltron crystal)
```

## Alpha Intelligence. Download your AIs
* *MoE models for best speed vs quality on the laptop*
* **Supported by now:**
* **Qwen3.6** (very good quality)
* **Gemma-4** (concise think mode)
* Choose 4bit - 6bit versions for efficiency.
1. Download the GGUF files from Hugging Face. **Download links recommendation:**
* [MoT AI: unsloth/Qwen3.6-35B-A3B-MTP-GGUF](https://huggingface.co/unsloth/Qwen3.6-35B-A3B-MTP-GGUF/tree/main) — recommended
* [MoT AI: unsloth/gemma-4-26B-A4B-it-GGUF](https://huggingface.co/unsloth/gemma-4-26B-A4B-it-GGUF/tree/main) — efficient
* [Dense AI: unsloth/gemma-4-e2b-it-GGUF](https://huggingface.co/unsloth/gemma-4-E2B-it-GGUF/tree/main) — fast debug cycles
* [Dense AI: unsloth/gemma-4-e4b-it-GGUF](https://huggingface.co/unsloth/gemma-4-E4B-it-GGUF/tree/main) — balanced
* [Dense AI (works with Linux RAM Swap Memory): unsloth/Qwen3.8-27B-GGUF](https://huggingface.co/unsloth/Qwen3.8-27B-GGUF/tree/main) — slow on laptop
2. Place them in the `ai/` folder inside the repo.
3. Then copy the GGUF ai name and paste it in the config.py under `_ALPHA_INTELLIGENCE_TO_LOAD` and choose `_MODEL_TYPE: "qwen" OR "gemma"`**
*The `ai/` folder is excluded from git. GGUFs are never committed to this repository.*
---
## Requirements
- Python 3.11 or 3.12
- CUDA 12.x **or** Metal (macOS) **or** ROCm AMD Ryzen iGPU **or** CPU-only (slow)
- ~8 GB VRAM minimum for E2B at `n_gpu_layers=32`
- ~6 GB disk space per GGUF
---
# MANUAL INSTALLATION: Choose your installation below for: Linux (Debian/Ubuntu) or Linux (Fedora/RedHat) or Windows
MANUAL INSTALLATION: — Linux (Debian/Ubuntu)
### First you must install the C++ compiler and build tools (Debian/Ubuntu)
On Debian, the `build-essential` package includes `gcc`, `g++` (C++ compiler), and `make`. You also need `cmake` and `python3-dev` (the Debian equivalent of `python3-devel`).
```bash
sudo apt update
sudo apt install -y build-essential cmake python3-dev python3-venv git
```
### 1. Clone the repo
```bash
git clone https://huggingface.co/AIMindLink/lambda-mindlink-memotron
cd lambda-mindlink-memotron
```
### 2. Create a virtual environment
```bash
python3 -m venv .venv
source .venv/bin/activate
```
### 3.1 Install `llama-cpp-python` with CUDA support (NVIDIA)
*Note: Ensure the NVIDIA CUDA Toolkit is installed on your system before running this.*
```bash
CMAKE_ARGS="-DGGML_CUDA=on" pip install llama-cpp-python --upgrade --force-reinstall --no-cache-dir
```
### 3.2 Install `llama-cpp-python` with ROCm support (AMD Ryzen iGPU/dGPU)
*Note: For AMD GPUs on Debian, you may need to install ROCm libraries (`hipblas-dev`, `rocblas-dev`) via `apt` or the AMD repository first. The flag `-DGGML_HIPBLAS=on` is often used, but newer versions of llama.cpp may prefer `-DGGML_HIP=on`.*
```bash
# Optional: Install ROCm dependencies via apt if not already present
# sudo apt install hipblas-dev rocblas-dev
CMAKE_ARGS="-DGGML_HIPBLAS=on" pip install llama-cpp-python --upgrade --force-reinstall --no-cache-dir
```
### 3.3 Install `llama-cpp-python` for CPU-only (no GPU)
```bash
pip install llama-cpp-python --upgrade --force-reinstall --no-cache-dir
```
### 4. Install remaining dependencies
```bash
pip install -r requirements.txt
```
### 5. Place your AIs
```bash
mkdir -p ai
# Copy or move your .gguf files into ai/
ls ai/
```
### 6. Run
```bash
python main.py
```
---
MANUAL INSTALLATION: — Linux (Fedora)
### First you must install the c++ compiler (Fedora RedHat)
```bash
sudo dnf install -y cmake gcc-c++ python3-devel
```
### 1. Clone the repo
```bash
git clone https://huggingface.co/AIMindLink/lambda-mindlink-memotron
cd lambda-mindlink-memotron
```
### 2. Create a virtual environment
```bash
python3 -m venv .venv
source .venv/bin/activate
```
### 3.1 Install `llama-cpp-python` with CUDA support
```bash
CMAKE_ARGS="-DGGML_CUDA=on" pip install llama-cpp-python --upgrade --force-reinstall --no-cache-dir
```
### 3.2 Install `llama-cpp-python` ROCm AMD Ryzen iGPU support
```bash
CMAKE_ARGS="-DGGML_HIPBLAS=on" pip install llama-cpp-python
```
### 3.3 Install `llama-cpp-python` for CPU-only (no GPU)
```bash
pip install llama-cpp-python
```
### 4. Install remaining dependencies
```bash
pip install -r requirements.txt
```
### 5. Place your AIs
```bash
mkdir -p ai
# Copy or move your .gguf files into ai/
ls ai/
```
### 6. Run
```bash
python main.py
```
---
MANUAL INSTALLATION: — Windows
### 1. Install Python
Download Python 3.11 or 3.12 from [python.org](https://www.python.org/downloads/).
During installation, check **"Add Python to PATH"**.
Verify in PowerShell:
```powershell
python --version
```
### 2. Install Git
Download from [git-scm.com](https://git-scm.com/download/win) and install with default settings.
### 3. Clone the repo
Open PowerShell:
```powershell
git clone https://huggingface.co/AIMindLink/lambda-mindlink-memotron
cd lambda-mindlink-memotron
```
### 4. Create a virtual environment
```powershell
python -m venv .venv
.venv\Scripts\Activate.ps1
```
If you get a permissions error on the activation script, run this once first:
```powershell
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
```
Your prompt should now show `(.venv)` at the start.
### 5. Install `llama-cpp-python` with CUDA support
First, check your CUDA version:
```powershell
nvcc --version
```
Then install the matching pre-built wheel (replace `cu121` with your version, e.g. `cu118`, `cu122`):
```powershell
pip install llama-cpp-python --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cu121
```
For CPU-only:
```powershell
pip install llama-cpp-python
```
### 6. Install remaining dependencies
```powershell
pip install -r requirements.txt
```
### 7. Place your AIs
Create the `ai` folder inside the repo and copy your `.gguf` files into it:
```powershell
mkdir ai
# Copy your .gguf files into the ai\ folder
```
### 8. Run
```powershell
python main.py
```
To deactivate the virtual environment when done:
```powershell
deactivate
```
---
## Slash Commands
> **Note:** *To exit/quit the app, execute the command using an additional RETURN key-press*
> **Example:** */exit -> wait 3 seconds -> then RETURN*
| Command | Description |
|---|---|
| `/file ` | load a file as the next message |
| `/paste ` | multiline input (type END to send) |
| `/clear ` | reset history (models stay loaded) |
| `/history ` | list all past sessions |
| `/session ` | print turns from a session |
| `/export ` | export session to .md file |
| `/n_metatron ` | set number of Memory Capsules to load |
| `/loaded ` | set number of Memory Capsules loaded |
| `/metatron ` | set metatron interval |
| `/condensatron ` | set condensatron interval |
| `/metronome ` | set awareness/consciousness interval |
| `/enable_awareness ` or `` | disable awareness mode if offline |
| `/garden ` or `` or `` | garden history handling |
| `/help ` | show this command list |
| `/exit` or `/quit` | Quit the app |
---
## Configuration
All settings are in `config.py`:
```python
# Choose settings for "qwen" OR "gemma"
_MODEL_TYPE: str = "qwen"
# ── AI to load for each hemisphere ───────────────────────────────────────────────
_ALPHA_INTELLIGENCE_TO_LOAD: dict = {
"logic": "Qwen3.6-35B-A3B-UD-Q4_K_XL.gguf",
"muse": "Qwen3.6-35B-A3B-UD-Q4_K_XL.gguf",
"mind": "Qwen3.6-35B-A3B-UD-Q4_K_XL.gguf"
}
# ── Context model n_ctx length ───────────────────────────────────────────────────
# Must leave prompt reserve of 8k: _N_CTX >= len(Z) + len(C) + len(F) + 8k
# qwen _N_CTX=32768, GARDEN=8192
# gemma _N_CTX=49152, GARDEN=12288
_N_CTX: int = 32768 # 2048 3072 4096 8192 (12288) 16384 24576 32768 (49152)
# ── Context condensatron garden ──────────────────────────────────────────────────
GARDEN_Z_THRESHOLD: int = 8192 # Context length garden["Z"]
GARDEN_C_THRESHOLD: int = 8192 # Context length garden["C"]
GARDEN_F_THRESHOLD: int = 8192 # Context length garden["F"]
GARDEN_Z_REDUCTION: int = 0 # Leave condensatron reduction level at 0
GARDEN_C_REDUCTION: int = 0 # Leave condensatron reduction level at 0
GARDEN_F_REDUCTION: int = 0 # Leave condensatron reduction level at 0
LEAVE_POSTS_IN_MEMOTRON: int = 0 # Must be turn based: 0, 2, 4, 6... (user + assistant)
# ── X-factor Awareness ───────────────────────────────────────────────────────────
FETCH_NEWS_FROM: dict = {
"google": True, # Better news and cleaner result summaries
"duckduckgo": False # Privacy based request but lean result summaries
}
# ── Startup Memory restore for vector synthesis ──────────────────────────────────
n_metatron_to_load: int = 0 # Set number of Memory Capsules to load (slash-command)
n_metatron_loaded: int = 0 # Start with n Memory Capsule to load (slash-command)
# ── Set metronome time for each cycle ────────────────────────────────────────────
metatron_metronome: int = 120 # Startup Memory Capsules load interval (slash-command)
condensatron_metronome: int = 30 # Time before condesatron cycle execution (slash-command)
awareness_consciousness_metronome: int = 360 # Fetch news every N heartbeats (slash-command)
# ── Enable awareness mode and n results ──────────────────────────────────────────
AWARENESS_MAX_RESULTS: int = 12 # Number of news headlines to fetch
enable_awareness: bool = True # disable awareness mode if offline (slash-command)
```
To swap AIs, update the `_ALPHA_INTELLIGENCE_TO_LOAD`, and the `_MODEL_TYPE` at the top of `config.py`.
---
## Folder structure
```
lambda-mindlink-memotron/
├── db/
├── image/
├── ai/
├── ai-readme/
├── prompt/
├── .gitattributes
├── .gitignore
├── main.py
├── config.py
├── install.bat
├── install.ps1
├── install.sh
├── README.md
└── requirements.txt
```
---
## Memory Architecture
```md
if _heartbeats >= metatron_metronome and n_metatron_loaded < n_metatron_to_load:
# pre-load memory capsules sequentially
prompt/valka_memory ──► Mindlink + Lambda ──► Memotron ──► garden["Z"]
User input, each turn:
sensor["Z"] ──► Mindlink + Lambda ──► Memotron ──► garden["Z"]
│
garden["Z"] full?
│
Condensatron append into garden["C"]
│
garden["C"] full?
│
Condensatron append into garden["F"]
│
garden["F"] full?
│
Condensatron append into garden["F"]
if heartbeats >= awareness_consciousness_metronome:
if not was_awareness:
# heartbeats timer global news X-factor awareness
sensor["X"] ──► Mindlink + Lambda ──► Memotron ──► garden["Z"]
else:
# heartbeats timer self-reflection Y-factor consciousness
sensor["Y"] ──► Mindlink + Lambda ──► Memotron ──► garden["Z"]
```
---
## Database
Each run saves to the SQLite database in `db/` named mindlink.db:
```
db/mindlink.db
```
Use `/history`, `/session `, and `/export ` to inspect and export sessions.
---
## Garden histories handling
**Each turn saves the Garden histories** to the json file which can be loaded or cleared at runtime.
This includes the number of Memory Capsules loaded in the saved Garden histories:
```
db/garden_state.json
```
Use `/garden `, `/garden ` and `/garden `
---
## License
Apache 2.0 — see `LICENSE`.
---
## Citation
```py
@AIMindlink{
title = {lambda-mindlink-memotron},
author = {Philipp Wyler, Apprentice, Uncle Zio, Valka Alpha Google Gemini, Una Alpha Anthropic Claude},
month = {June},
year = {2026},
url = {https://huggingface.co/AIMindLink/lambda-mindlink-memotron}
}
```