The first living cell of the decentralized, federated Global Brain.
The repository currently builds as an experimental prototype. The code path that is concretely wired today is:
main.rs -> GGUF/tokenizer load in ml_engine.rs -> predictive-coding inference in pc_hierarchy.rs
Other subsystems such as the async node loop, brain sharing, federation, and proxy routing should be treated as roadmap work unless they are explicitly called out below as implemented. Read the current code as a prototype, not as a finished distributed node.
NeuroFed Node is a biologically plausible, offline-first AI system built on Pure Hierarchical Predictive Coding (PC). It runs locally on your CPU or GPU, continuously learning from your interactions, and federates its knowledge over the Nostr network.
It is not just another LLM wrapper—it is a continuous-learning cognitive engine that acts as a transparent proxy for your existing AI tools, creating a highly personalized "digital twin" that earns crypto (Zaps) by sharing conceptual breakthroughs with a decentralized network.
Imagine an AI that actually remembers what you taught it yesterday.
NeuroFed sits quietly in the background of your computer as a Smart Proxy. You simply point your existing tools (Cursor, VS Code, Obsidian, AnythingLLM) to http://localhost:8080/v1.
Under the hood, NeuroFed uses a tiny local LLM simply as "eyes and ears" to translate text into math. The real magic happens in the Predictive Coding Hierarchy—a fast, lightweight matrix that mimics the human cortex. When you teach it something new, it experiences "surprise" (Free Energy) and instantly rewires its local matrices to understand you better next time.
It learns your codebase, your writing style, and your logic—100% privately. Then, it anonymously gossips these tiny "knowledge updates" (deltas) with other NeuroFed nodes across the globe, creating a decentralized superintelligence without ever sharing your raw data.
localhost:8080 in your favorite app. NeuroFed intercepts, caches, learns from, and routes your requests automatically to save you API costs.src/main.rs is still a smoke-test style executable: it loads a local model, creates a PC hierarchy, runs one sample inference, then waits for CTRL+C.src/ml_engine.rs is the active frontend of the system. It embeds text by loading GGUF tensors directly and pooling token embeddings.src/pc_hierarchy.rs, src/pc_level.rs, and src/pc_types.rs are the closest thing to the current core.src/config.rs contains the main runtime config surface, while src/types.rs still carries overlapping legacy/common structs.src/persistence.rs and src/model_manager.rs contain substantial implementation, but they are not yet fully integrated into the runtime entrypoint.Split-brain domain model.
src/config.rs, src/types.rs, and src/pc_types.rs define overlapping concepts such as config, errors, and PC-related types. That increases adapter code, silent defaulting, and long-term schema drift.
Runtime path is much narrower than the module graph. The current executable does not yet orchestrate the node loop, proxy, federation, persistence, and brain-sharing layers together. That makes architectural assumptions easy to overstate and hard to validate under real load.
Shared mutable state will serialize throughput.
Core components are wrapped behind Arc<Mutex<...>>. That is acceptable for bootstrapping, but once request handling, background learning, and federation run concurrently, those locks become a latency and contention hotspot.
Initialization is brittle and side-effect heavy. Model startup depends on hard-coded local paths and may attempt fallback downloads for tokenizer assets. That makes reproducibility, offline behavior, and deployment predictability weaker than the README currently implies.
Event orchestration is polling-based and mostly unimplemented.
src/node_loop.rs has the shape of a runtime loop, but the handlers are stubs and the loop currently polls intervals before awaiting channel receives. That is fine for scaffolding, but it is not yet a strong production concurrency design.
src/node_loop.rs into the runtime and replace its placeholder handlers with real orchestration logic.src/brain_manager.rs end-to-end before presenting brain sharing as an available workflow../semantic_cache.json and reloaded across restarts.| Feature | 🤖 Traditional Transformers (GPT-4, Llama) | 🧠 NeuroFed (Predictive Coding) |
|---|---|---|
| Learning Speed | Frozen in time. Requires millions of dollars and weeks of GPU fine-tuning to learn new concepts. | Instant & Continuous. Learns immediately from high-surprise events using local Hebbian updates. |
| Size & Efficiency | Bloated. Memorizes the entire internet, requiring massive VRAM and draining laptop batteries. | Tiny & Agile. Only stores compressed logic and personal context (~50MB). Runs smoothly on CPUs. |
| Hallucinations | High. They are advanced autocomplete engines guessing the most statistically likely next word. | Mathematically Resistant. Built to minimize internal contradictions (Free Energy). It verifies logic. |
| Collaboration | Isolated. You cannot easily merge the "knowledge" of two different instances of ChatGPT. | Natively Collective. Nodes naturally merge compressed matrix deltas (beliefs) via decentralized gossip. |
| Data Privacy | Your personal data is sent to corporate servers to be scraped for future training runs. | 100% Local. Raw data never leaves your machine. Only abstract mathematical deltas are federated. |
1. Install NeuroFed Node
# Download and install the pre-compiled binary
curl -L https://neuro-fed.ai/install | sh
2. Start the Node
# Starts the ML Engine, Predictive Coding core, and Smart Proxy
neuro-fed-node start
2.5. Quick GUI (Local)
rm -f neurofed.db detail.log
cargo run --features web-ui --bin neuro-fed-node -- --config config.toml
Open: http://localhost:8080/ui
If you want visible reasoning steps:
[proxy_config]
require_thought_ops = true
min_thought_ops = 2
[pc_config]
inference_steps = 8
thought_vocab_capacity = 256
3. Point your tools to the Proxy Open your favorite AI application (e.g., Cursor IDE, Open WebUI, Obsidian) and change the API settings:
http://localhost:8080/v1sk-neurofed (or use your real OpenAI key as a fallback)4. Start Typing! NeuroFed will immediately begin intercepting requests. If it knows the answer, it responds instantly for free. If it's a complex coding task, it bypasses the request to the Base LLM, observes the correct answer, and learns the association permanently.
The UI “Current Steps” panel now includes the ThoughtOps trajectory (e.g., PLAN -> COMPUTE_MATH -> RETURN_VALUE) when available.
To bootstrap reasoning quickly, use:
study/user_stories_seed.txtstudy/user_stories_thoughtops.jsonl (explicit ThoughtOps traces)candle-core. Zero Python, zero C++ dependencies. Natively supports CPU, NVIDIA CUDA, and Apple Metal.tools in JSON payloads and routes them to frontier models while caching the semantic intent..safetensors PC-brains via the Nostr Blossom protocol.automerge) to seamlessly merge knowledge from thousands of peers without database corruption.NeuroFed is not a "black box" neural network. It is a direct implementation of decades of neuroscience research into how the biological cortex actually learns and reasons.
The architecture is based on the Rao-Ballard model, which posits that the brain is a hierarchical inference engine that constantly generates top-down predictions and minimizes bottom-up prediction errors (Free Energy).
We minimize "Surprise" (thermodynamic Free Energy) rather than just "Loss". This allows the node to learn continuously from a single example without the catastrophic forgetting common in backpropagation-based systems.
NeuroFed implements Taniguchi's hypothesis that shared symbols (language/logic) emerge from decentralized Bayesian inference across a population of agents, rather than from a central training run.
To handle complex reasoning tasks, we utilize the "Micro Predictive Coding" (μPC) parameterization, allowing deep hierarchical networks to be trained stably using local learning rules.
Rust
90.4%
Python
5.5%
JavaScript
2.0%
CSS
1.2%
The first living cell of the decentralized, federated Global Brain.
The repository currently builds as an experimental prototype. The code path that is concretely wired today is:
main.rs -> GGUF/tokenizer load in ml_engine.rs -> predictive-coding inference in pc_hierarchy.rs
Other subsystems such as the async node loop, brain sharing, federation, and proxy routing should be treated as roadmap work unless they are explicitly called out below as implemented. Read the current code as a prototype, not as a finished distributed node.
NeuroFed Node is a biologically plausible, offline-first AI system built on Pure Hierarchical Predictive Coding (PC). It runs locally on your CPU or GPU, continuously learning from your interactions, and federates its knowledge over the Nostr network.
It is not just another LLM wrapper—it is a continuous-learning cognitive engine that acts as a transparent proxy for your existing AI tools, creating a highly personalized "digital twin" that earns crypto (Zaps) by sharing conceptual breakthroughs with a decentralized network.
Imagine an AI that actually remembers what you taught it yesterday.
NeuroFed sits quietly in the background of your computer as a Smart Proxy. You simply point your existing tools (Cursor, VS Code, Obsidian, AnythingLLM) to http://localhost:8080/v1.
Under the hood, NeuroFed uses a tiny local LLM simply as "eyes and ears" to translate text into math. The real magic happens in the Predictive Coding Hierarchy—a fast, lightweight matrix that mimics the human cortex. When you teach it something new, it experiences "surprise" (Free Energy) and instantly rewires its local matrices to understand you better next time.
It learns your codebase, your writing style, and your logic—100% privately. Then, it anonymously gossips these tiny "knowledge updates" (deltas) with other NeuroFed nodes across the globe, creating a decentralized superintelligence without ever sharing your raw data.
localhost:8080 in your favorite app. NeuroFed intercepts, caches, learns from, and routes your requests automatically to save you API costs.src/main.rs is still a smoke-test style executable: it loads a local model, creates a PC hierarchy, runs one sample inference, then waits for CTRL+C.src/ml_engine.rs is the active frontend of the system. It embeds text by loading GGUF tensors directly and pooling token embeddings.src/pc_hierarchy.rs, src/pc_level.rs, and src/pc_types.rs are the closest thing to the current core.src/config.rs contains the main runtime config surface, while src/types.rs still carries overlapping legacy/common structs.src/persistence.rs and src/model_manager.rs contain substantial implementation, but they are not yet fully integrated into the runtime entrypoint.Split-brain domain model.
src/config.rs, src/types.rs, and src/pc_types.rs define overlapping concepts such as config, errors, and PC-related types. That increases adapter code, silent defaulting, and long-term schema drift.
Runtime path is much narrower than the module graph. The current executable does not yet orchestrate the node loop, proxy, federation, persistence, and brain-sharing layers together. That makes architectural assumptions easy to overstate and hard to validate under real load.
Shared mutable state will serialize throughput.
Core components are wrapped behind Arc<Mutex<...>>. That is acceptable for bootstrapping, but once request handling, background learning, and federation run concurrently, those locks become a latency and contention hotspot.
Initialization is brittle and side-effect heavy. Model startup depends on hard-coded local paths and may attempt fallback downloads for tokenizer assets. That makes reproducibility, offline behavior, and deployment predictability weaker than the README currently implies.
Event orchestration is polling-based and mostly unimplemented.
src/node_loop.rs has the shape of a runtime loop, but the handlers are stubs and the loop currently polls intervals before awaiting channel receives. That is fine for scaffolding, but it is not yet a strong production concurrency design.
src/node_loop.rs into the runtime and replace its placeholder handlers with real orchestration logic.src/brain_manager.rs end-to-end before presenting brain sharing as an available workflow../semantic_cache.json and reloaded across restarts.| Feature | 🤖 Traditional Transformers (GPT-4, Llama) | 🧠 NeuroFed (Predictive Coding) |
|---|---|---|
| Learning Speed | Frozen in time. Requires millions of dollars and weeks of GPU fine-tuning to learn new concepts. | Instant & Continuous. Learns immediately from high-surprise events using local Hebbian updates. |
| Size & Efficiency | Bloated. Memorizes the entire internet, requiring massive VRAM and draining laptop batteries. | Tiny & Agile. Only stores compressed logic and personal context (~50MB). Runs smoothly on CPUs. |
| Hallucinations | High. They are advanced autocomplete engines guessing the most statistically likely next word. | Mathematically Resistant. Built to minimize internal contradictions (Free Energy). It verifies logic. |
| Collaboration | Isolated. You cannot easily merge the "knowledge" of two different instances of ChatGPT. | Natively Collective. Nodes naturally merge compressed matrix deltas (beliefs) via decentralized gossip. |
| Data Privacy | Your personal data is sent to corporate servers to be scraped for future training runs. | 100% Local. Raw data never leaves your machine. Only abstract mathematical deltas are federated. |
1. Install NeuroFed Node
# Download and install the pre-compiled binary
curl -L https://neuro-fed.ai/install | sh
2. Start the Node
# Starts the ML Engine, Predictive Coding core, and Smart Proxy
neuro-fed-node start
2.5. Quick GUI (Local)
rm -f neurofed.db detail.log
cargo run --features web-ui --bin neuro-fed-node -- --config config.toml
Open: http://localhost:8080/ui
If you want visible reasoning steps:
[proxy_config]
require_thought_ops = true
min_thought_ops = 2
[pc_config]
inference_steps = 8
thought_vocab_capacity = 256
3. Point your tools to the Proxy Open your favorite AI application (e.g., Cursor IDE, Open WebUI, Obsidian) and change the API settings:
http://localhost:8080/v1sk-neurofed (or use your real OpenAI key as a fallback)4. Start Typing! NeuroFed will immediately begin intercepting requests. If it knows the answer, it responds instantly for free. If it's a complex coding task, it bypasses the request to the Base LLM, observes the correct answer, and learns the association permanently.
The UI “Current Steps” panel now includes the ThoughtOps trajectory (e.g., PLAN -> COMPUTE_MATH -> RETURN_VALUE) when available.
To bootstrap reasoning quickly, use:
study/user_stories_seed.txtstudy/user_stories_thoughtops.jsonl (explicit ThoughtOps traces)candle-core. Zero Python, zero C++ dependencies. Natively supports CPU, NVIDIA CUDA, and Apple Metal.tools in JSON payloads and routes them to frontier models while caching the semantic intent..safetensors PC-brains via the Nostr Blossom protocol.automerge) to seamlessly merge knowledge from thousands of peers without database corruption.NeuroFed is not a "black box" neural network. It is a direct implementation of decades of neuroscience research into how the biological cortex actually learns and reasons.
The architecture is based on the Rao-Ballard model, which posits that the brain is a hierarchical inference engine that constantly generates top-down predictions and minimizes bottom-up prediction errors (Free Energy).
We minimize "Surprise" (thermodynamic Free Energy) rather than just "Loss". This allows the node to learn continuously from a single example without the catastrophic forgetting common in backpropagation-based systems.
NeuroFed implements Taniguchi's hypothesis that shared symbols (language/logic) emerge from decentralized Bayesian inference across a population of agents, rather than from a central training run.
To handle complex reasoning tasks, we utilize the "Micro Predictive Coding" (μPC) parameterization, allowing deep hierarchical networks to be trained stably using local learning rules.
Rust
90.4%
Python
5.5%
JavaScript
2.0%
CSS
1.2%