Browse / LLM wiki / LLM_Wiki_SecondBrain

LLM_Wiki_SecondBrain

DimitrisLianos

Fully local LLM Wiki : Karpathy's knowledge base pattern with Gemma 4, Unsloth Dynamic, and TurboQuant KV cache.

Open DimitrisLianos/LLM_Wiki_SecondBrain → On the boundary of the four rules.

braingemma4karpathy-inspiredsecondturboquant

Built for one agent

ships CLAUDE.md and nothing for other agents.

In its own words

AboutDimitrisLianos/LLM_Wiki_SecondBrain

Zero dependencies. Runs on a MacBook.

README.md

A fully local implementation of Karpathy's LLM Knowledge Base pattern. No cloud APIs, no data exfiltration. The ingest + query core runs on the Python standard library alone; the optional web UI and optional web-search augmentation add two narrowly-scoped runtime dependencies (fastapi, ddgs) that are not reached by any offline-only code path.

Drop source documents into a folder. A local LLM reads them, extracts entities and concepts, writes interlinked wiki pages and maintains a persistent, compounding knowledge graph, all on-device, all offline.

This project is a proof-of-concept that integrates four recent developments into one working system:

  • Karpathy's LLM Wiki pattern (April 2026), the idea that an LLM should build and maintain a wiki from raw sources, rather than doing one-shot RAG retrieval. Raw data is "compiled" into interlinked Markdown, then operated on by CLI tools for Q&A, linting and incremental enrichment.
  • Gemma 4 27B-A4B (April 2026), Google DeepMind's open-weights Mixture-of-Experts model. 25,2B total parameters, but only 3,8B active per token via learned routing across 128 experts. This gives 27B-class output quality at roughly 4B-class inference cost (model card: MMLU Pro 82,6%, GPQA Diamond 82,3%, within 2-3% of the 31B Dense variant on all benchmarks). Apache 2.0 licensed.

The repository's own description, then 9% of its README. Read the rest on GitHub ↗

Read from the repository's git tree on 2026-08-17.