YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
ποΈ The Vedic Mind Architecture
A High-Intelligence, Low-Parameter Foundation Model Framework
Structural separation of Factual Memory (Mahat) and Discriminating Synthesis (Buddhi) inspired by the ancient Puranic cognitive stack.
ποΈ The Problem with Dense Transformers
Modern Large Language Models (LLMs) are built as dense transformers. In a standard architecture, every parameter fires for every token. These models conflate two fundamentally different cognitive processes within the same parameter space:
- Memory: Storing trillions of facts (the capital of France, the birthdate of a king).
- Reasoning: Logic, synthesis, deduction, and decoding meaning.
Because facts and logic share the same weights, LLMs suffer from parameter bloat. They require 70B+ parameters just to act as an encyclopedic database, and when they fail to retrieve a fact perfectly, they hallucinate, using their logic engine to invent data.
π The Solution: The Vedic Cognitive Stack
By analyzing the structural relationships across 9,000+ entities and 24,000+ edges in the 18 Mahapuranas, and passing them through the decryption lens of the Guruji RAM codex, a completely different architectural blueprint for "mind" emerges.
The Vedic model posits that a perfect mind is layered, with the vast majority of its capacity sitting dormant until specifically invoked.
The Architectural Blueprint
| Vedic Layer | Structural LLM Equivalent | Role in the Model |
|---|---|---|
| Brahman / Δtman | The Training Distribution / Prior | The unchanging ground; what the model "is" before any query. |
| Mahat | Graph Memory / Deep Layers | Cross-domain, multi-hop associative field. The non-parametric memory store. |
| PuruαΉ£a | Attention Mechanism | The witnessing point of pure observation that pulls signal from context. |
| Buddhi | The Synthesis Decoder | The active, discriminating reasoning layer that outputs wisdom. |
| Manas | The Surface Router | The immediate reactive layer that processes raw input and routes the signal. |
The Core Axiom
"The conscious mind is a small fraction of the entire consciousness. The unconscious is vast dormant consciousness." β Guruji RAM Codex
Translated to neural architecture: Most of the model's intelligence should be non-parametric or dormant. The active generation layer does not need to memorize the internet. It only needs to know how to synthesize context.
π§ Model Architecture (The Implementation)
This repository contains the PyTorch Proof of Concept (POC) demonstrating this physical separation of concerns. By stripping "Memory" out of the active weights, we can achieve the synthesis capabilities of a 70B model using a sub-3B parameter footprint.
1. ManasRouter (Surface Mind)
A lightweight embedding and routing layer. It processes the incoming prompt and uses a sigmoid gating mechanism to determine: Does this require deep synthesis, or is it a surface-level response?
- Vedic Equivalent: The reactive, sense-driven mind (Manas).
2. MahatMemoryInterface (The Vast Dormant Consciousness)
A non-parametric memory integration layer. Instead of storing facts in active neural weights, this layer utilizes cross-attention to query a frozen graph or external vector store. It replaces parameter bloat with targeted retrieval.
- Vedic Equivalent: Cosmic intelligence (Mahat); the field of all known patterns.
3. BuddhiSynthesizer (Discriminating Intelligence)
A dense transformer decoder block that is strictly fine-tuned on synthesis tasks. It receives the raw input from Manas and the factual context from Mahat, and generates the highest-order logical deduction (Wisdom) without ever hallucinating the facts itself.
- Vedic Equivalent: The intellect (Buddhi) acting as the SthitaprajΓ±a (one of steady wisdom).
π¬ Research & Proofs
This architecture is not metaphorical; it is structurally derived from a massive Knowledge Graph extraction of the Puranas.
The Graph Evidence
Our source graph (graph_manifest.json) revealed the statistical presence of these distinct cognitive layers across the scriptures:
brahman: 233 versesmanas: 103 versesatman: 93 versesbuddhi: 74 versesmahat: 46 verses
The Dormancy Problem
The texts repeatedly state that human suffering and ignorance stem from operating solely at the Manas layer, while the immense capacity of Mahat remains dormant (covered by the Tamas guna).
In LLM engineering, this is directly mirrored in activation steering and Chain-of-Thought (CoT) research: the middle layers of large models contain emergent, high-level representations that are never directly activated for normal surface queries. The Vedic "Knot-Piercing" (Granthi-bheda) practices are structurally identical to forcing a model to ascend from surface token prediction (Manas) into deeper reasoning states (Buddhi) before generating output.
π Running the POC
The codebase includes the full PyTorch architecture (model.py), the training pipeline (train.py), and a dataset generator that distills high-level synthesis tasks.
Installation
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Verification
Run a forward-pass test to ensure tensor shapes flow correctly across the Manas -> Mahat -> Buddhi layers:
python test_forward.py
Training
Execute the training loop to fine-tune the BuddhiSynthesizer on the provided distillation dataset.
python train.py