diff --git "a/leviathan-readme.md" "b/leviathan-readme.md" --- "a/leviathan-readme.md" +++ "b/leviathan-readme.md" @@ -1,4 +1,8 @@ -# Leviathan +# Soon to come. + + + +

Runs on Windows Needs an NVIDIA graphics card: GTX 16 / RTX 20 or newer

**Local AI models, running directly on your graphics card. No server, no cloud, no account, no subscription, no telemetry.** @@ -10,26 +14,39 @@ What makes it different from the other ways of running a model locally is what h > **Leviathan is the host. The model is the guest.** + +### ๐Ÿ”น See it running + +Every picture on this page is the real app, driven by a real model on one RTX 4080 โ€” nothing is mocked up. + +

Chatting with Qwen 2.5 Coder 7B in Leviathan, in real time

+

Real time on an RTX 4080, nothing edited: Qwen 2.5 Coder 7B (Q8_0) writing each answer. How fast depends on your card โ€” mostly its memory bandwidth โ€” so a newer card is quicker and a smaller one slower.

+ +

One 3D part through Inline Studio, the Graph, the Planner and the Fabricator

+

From a sentence to a print-ready part, in four real screenshots: the model writes the CAD script in Inline Studio โ†’ it becomes nodes in the Graph โ†’ the model drills a screw hole when asked, in the Planner โ†’ the Fabricator signs it off.

+ --- ## Contents -- [Requirements] -- [First run] -- [The two file types] โ€” **start here if you only read one section** -- [The tabs] -- [Chat] ยท [Models] ยท [Studio] ยท [Cores] ยท [Memory Vault] ยท [Traits] ยท [Inline Studio] ยท [Settings] -- [The systems] -- [Persistent memory] ยท [Knowledge routing] ยท [Reasoning layer] ยท [Forensic Grid] ยท [Surface Sight] ยท [Recycling cloud answers] ยท [Eidetic recall] ยท [Second-opinion fact-check] ยท [Any model, described by itself] ยท [The security membrane] -- [What ANI is โ€” and why it matters] โ€” **the thesis, in plain words** -- [Using Leviathan from other programs] -- [Where your files live] -- [What Leviathan will not do] -- [Licence and attribution] +- ๐Ÿ”ท [Requirements](#requirements) +- ๐Ÿ”ท [First run](#first-run) +- ๐Ÿ”ท [The two file types](#the-two-file-types) โ€” **start here if you only read one section** +- ๐Ÿ”ท [The tabs](#the-tabs) +- ๐Ÿ”ท [Chat](#chat) ยท ๐Ÿ”ท [Models](#models) ยท ๐Ÿ”ท [Studio](#studio) ยท ๐Ÿ”ท [Cores](#cores) ยท ๐Ÿ”ท [Memory Vault](#memory-vault) ยท ๐Ÿ”ท [Traits](#traits) ยท ๐Ÿ”ท [Inline Studio](#inline-studio) ยท ๐Ÿ”ท [Graph](#graph) ยท ๐Ÿ”ท [Planner](#planner) ยท ๐Ÿ”ท [Fabricator](#fabricator) ยท ๐Ÿ”ท [Settings](#settings) +- ๐Ÿ”ท [The systems](#the-systems) +- ๐Ÿ”ถ [Persistent memory](#persistent-memory) ยท ๐Ÿ”ถ [Knowledge routing](#knowledge-routing) ยท ๐Ÿ”ถ [Reasoning layer](#reasoning-layer) ยท ๐Ÿ”ถ [Forensic Grid](#forensic-grid) ยท ๐Ÿ”ถ [Surface Sight](#surface-sight) ยท ๐Ÿ”ถ [Recycling cloud answers](#recycling-cloud-answers) ยท ๐Ÿ”ถ [Episodic memory](#episodic-memory) ยท ๐Ÿ”ถ [Second-opinion fact-check](#second-opinion-fact-check) ยท ๐Ÿ”ถ [Any model, described by itself](#any-model-described-by-itself) +- ๐Ÿ”ด [The security membrane](#the-security-membrane) +- ๐ŸŸฃ [What ANI is โ€” and why it matters](#what-ani-is-and-why-it-matters) โ€” **the thesis, in plain words** +- ๐Ÿ”ท [Using Leviathan from other programs](#using-leviathan-from-other-programs) +- ๐Ÿ”ท [Where your files live](#where-your-files-live) +- ๐Ÿ”ท [What Leviathan will not do](#what-leviathan-will-not-do) +- ๐Ÿ”ท [Licence and attribution](#licence-and-attribution) --- -## Requirements + +## ๐Ÿ”ท Requirements - **Windows** - **An NVIDIA graphics card**, GTX 16-series / RTX 20-series or newer @@ -43,7 +60,10 @@ That is the whole list. You do not need Python, the CUDA toolkit, Visual Studio, --- -## First run + +## ๐Ÿ”ท First run + +

Leviathan's welcome card on first run, with the graphics-card check

The first time you open Leviathan, a welcome card sits over the chat window with three steps and a report on your graphics card. It stays until you have a model, and it always comes back if the GPU check fails, so you are never left guessing why nothing works. @@ -57,7 +77,8 @@ Everything after that is optional. Leviathan is fully usable knowing only those --- -## The two file types + +## ๐Ÿ”ท The two file types This is the part most people find confusing, and it is worth five minutes because everything else in Leviathan is built on it. There are two kinds of model file, they do two completely different jobs, and they are not alternatives to one another. (There is a third thing โ€” a **knowledge bank** โ€” but it is not a model file at all; it is text, and it gets its own short section below.) @@ -65,7 +86,7 @@ A rough analogy, if it helps: if the model is a **person**, then `.lev` is their --- -### `.lev` โ€” the model +### ๐Ÿ”น `.lev` โ€” the model **What it is:** the model itself, converted into the exact byte layout your graphics card wants. @@ -77,7 +98,7 @@ A rough analogy, if it helps: if the model is a **person**, then `.lev` is their --- -### `.fqm` โ€” the memory +### ๐Ÿ”น `.fqm` โ€” the memory **What it is:** what the model remembers, saved to disk. @@ -85,40 +106,44 @@ A rough analogy, if it helps: if the model is a **person**, then `.lev` is their A `.fqm` is that memory, written to a file. When you load the model again, the memory loads with it. The conversation genuinely continues. -**A `.fqm` comes into being one of two ways, and it is worth knowing which is which โ€” they are the same kind of file doing the same job, but they start life very differently, and people often assume there is only the first.** +**How a `.fqm` comes into being โ€” on its own, as you talk.** If a model has memory enabled, Leviathan saves a `.fqm` after the first exchange and then every fifth one, quietly, in the background. This is the running memory of *your* conversations with *this* model โ€” it grows as you chat and loads back the next time you open the model. You do not have to do anything, and if it ever *cannot* save, it says so out loud rather than pretending it worked. It also refuses to save a turn that came out garbled, so one bad reply can never lodge itself in the memory permanently. -**One โ€” it happens on its own, as you talk.** If a model has memory enabled, Leviathan saves a `.fqm` after the first exchange and then every fifth one, quietly, in the background. This is the running memory of *your* conversations with *this* model โ€” it grows as you chat and loads back the next time you open the model. You do not have to do anything, and if it ever *cannot* save, it says so out loud rather than pretending it worked. It also refuses to save a turn that came out garbled, so one bad reply can never lodge itself in the memory permanently. +**The save is atomic.** A `.fqm` is written whole or not at all. The new memory is built in full, then swapped in for the old one in a single step the operating system guarantees cannot be interrupted part-way โ€” so a crash, a power cut or a pulled plug mid-save leaves you with the *previous* good memory, never a torn or half-written file. Memory you can trust is memory that cannot corrupt itself, and this atomic write is the quiet mechanism that makes "it just remembers" safe to rely on rather than a thing you hope survived. -**Two โ€” you build one on purpose, in Studio โ†’ Personality.** Instead of letting memory accumulate one chat at a time, you hand the model a whole body of text at once โ€” a folder of past conversations, your project notes, your novel, your world's lore โ€” and it absorbs the lot in a single pass into a `.fqm` that you name and keep. **This is not the auto-memory above, and it is not connected to it.** The auto-memory is what the model happened to remember from talking to you; a Personality profile is a deliberate portrait you construct and can rebuild whenever your source text grows. It is how you make a model that already knows your material โ€” or already sounds like you โ€” before you have typed a word. You point chat at it yourself, and you can keep as many as you like. The Studio section below explains exactly what each control does. +**It compresses as it grows โ€” and you decide how.** A conversation that ran for months would make a naive memory file swell without limit. A `.fqm` does not: it keeps your most recent exchanges exact and folds older ones into summaries that grow coarser with age โ€” each level eight times coarser than the one above, over seven levels โ€” so the file grows a level at a time, not with every turn, and nothing is let go until the deepest level fills. Reach is not recall, and we measured the difference: the summaries keep the drift of a conversation, not its specifics โ€” a passage folded two levels down left no measurable trace, and facts pushed out of the exact window came back one time in ten from the `.fqm` alone, the same as no memory. Recent memory stays sharp; the facts you need kept for good belong to [episodic memory](#episodic-memory), which is text and doesn't fade. The whole thing is yours to tune in **Settings โ†’ Memory storage**: pick the storage stage โ€” **half-size** (the default: a float16 store at the standard precision, roughly halving every file), **lossless**, or an experimental **Shannon** stage โ€” and set, with a slider, how large the exact window is before the cascade folds the rest. This is a genuine compression system working under your hand, not a format that can only grow. -**The auto-memory: one per model.** The memory that builds itself as you chat is named after the model and lives in your FQM Database folder. Two models loaded at once do not share it or bleed into each other. Personality profiles you build by hand are separate files that you manage yourself, so they never collide with the auto-memory. +**One per model.** The memory is named after the model and lives in your FQM Database folder. Two models loaded at once do not share it or bleed into each other โ€” each wakes up with its own past and no one else's. (Making a model that *sounds like you*, or that already *knows your material*, is a separate and cleaner job: your register is ANI's to mirror โ€” see [ANI Voice] โ€” and your material lives in [knowledge banks], readable by any model, rather than baked into one model's memory.) --- -### Knowledge banks โ€” kept as text, not a model file +### ๐Ÿ”น Knowledge banks โ€” kept as text, not a model file A **knowledge bank** is a body of knowledge you can give a model without retraining it โ€” facts, answers, worked material โ€” kept as *text* and routed to the model by meaning when a question calls for it. It is **not** a special weight file and it is not part of the model; it is plain text, stored in the knowledge vault and backed up as `.jsonl`. Not a document you paste in and hope fits; knowledge that is there when the subject comes up and out of the way when it does not. How the right bank actually reaches the model is covered under [Knowledge routing โ€” ANI]; this section is about what the banks themselves are. **Where a bank comes from โ€” three ways, all the same kind of thing in the end:** - **Drained from a model.** In **Studio โ†’ Absorb โ†’ ANI**, a model talks out what it knows and the substance is kept as text โ€” keeping only what the model is actually confident of. The knowledge a model spent its whole training absorbing is lifted out and kept, so a retired model becomes a knowledge *donor* instead of a deleted file. No giant weight file is created; the bank is text. -- **Folded from your own conversations.** A captured session becomes a bank, in **Settings โ†’ Consume knowledge**. What you worked out with a model last week is answerable next week โ€” even by a *different* model. +- **Absorbed from your own code.** Source files, and instruction+code *datasets* (parquet or JSONL), folded into a bank in **Studio โ†’ Absorb โ†’ ANI** โ€” where every function is **compiled and run before it is kept**, so a code bank holds only patterns that actually work. Code is the one source a machine can genuinely *verify*, which is exactly where ANI is strongest. *(An answer a cloud model gave you on your own key is kept automatically too โ€” see [Recycling cloud answers].)* - **Built by hand.** Your own notes, a rulebook, a body of lore. **Why it is text, and why that matters.** Knowledge crosses between models as text, carried by meaning โ€” not as transplanted weights. That is what makes a bank portable: it does not care what architecture, size or family the model reading it is, because it is re-read into whatever model is live. It is also tiny โ€” a text bank is kilobytes to a few megabytes, where the old weight-bank approach cost gigabytes for the same knowledge. A bank is only ever as good as what went into it โ€” a strong source makes a strong bank, a vague one makes a vague bank โ€” and on any given question the router surfaces the best match it has, honestly, either way. --- -## The tabs + +## ๐Ÿ”ท The tabs -Seven tabs down the left side. +Eleven tabs down the left side. --- -### ๐Ÿ’ฌ Chat + +### ๐Ÿ”ท Chat Where you actually talk to the model. +

A two-turn chat with Qwen 2.5 Coder 7B, with the Route panel on the right

+ Type, press Start or `Ctrl+Enter`, and the reply streams back as it is generated. You can interrupt mid-answer โ€” including during the long pause at the start while the model reads a large prompt โ€” and it stops immediately rather than finishing the paragraph first. Down by the input box sits a compact **๐Ÿง  depth selector** โ€” **Off ยท Auto ยท Light ยท Medium ยท Heavy ยท Max**. This is where you set how hard the model is made to think before it answers, and it lives with the chat, not buried in Settings, so you can change it question by question. What each depth actually does is under [Reasoning layer]. @@ -129,7 +154,8 @@ The chat is the main event. Beside it sits a slim companion panel โ€” the models --- -### ๐Ÿค– Models + +### ๐Ÿ”ท Models Where models are connected, configured and saved. @@ -146,7 +172,7 @@ Ollama and API models exist so Leviathan is still useful without a supported gra **The model list** -Each connected model gets a row showing where it runs, its file or model name, and its reply-length limit. On the right: +Each connected model gets a row showing where it runs and its file or model name. On the right: - **๐Ÿ”— Chainlink** โ€” switches a model in or out of the conversation *without removing it*. Unlinked, it keeps its settings and memory but stops taking part. Handy for benching one model for a while. - **โœ•** โ€” removes the model from the list. @@ -156,10 +182,10 @@ Each connected model gets a row showing where it runs, its file or model name, a - **Display Name / Model Name / Endpoint** โ€” what it is called, which model it is, and where it lives (a file path for a `.lev`, a URL for a server). - **System Prompt** โ€” the standing instructions the model follows in every reply. Leviathan fills in a sensible default; replace it with whatever you want the model to be. - **Temp** โ€” how adventurous its wording is. Lower is steadier and more predictable, higher is looser and more varied. -- **Max Tokens** โ€” the longest reply the model is allowed to give. This matters more than it looks: a model capped at 512 gives you a paragraph or two, the same model at 6000 can write you a full document. Set it to suit the job. +- **Reply length is no longer set here.** It used to be a per-model *Max Tokens* field; it is now a **Token budget** set once per surface in **Settings โ†’ Token budget** โ€” a slider from 512 up to โˆž โ€” so one setting governs every model on that surface instead of each one carrying its own. The dialog shows *Tokens: Settings โ†’ Token budget* as a reminder. (It still matters as much as it ever did: a model held to 512 gives you a paragraph or two; the same model at โˆž can write you a whole document โ€” see [Settings].) - **Leech Feed Model** *(Leviathan models only)* โ€” a second model to fall back on. When your local model hedges, gives a thin answer or clearly does not know, Leviathan asks the feed model the same question and absorbs its answer into your local model's memory, so next time it knows. It only ever asks models you have connected yourself. Leave it on *auto* to use the first hosted model in your list. -**๐Ÿ”€ Route โ€” Knowledge Route** +**๐Ÿ”น Route โ€” Knowledge Route** *One model asks. One answers. The mind absorbs everything.* @@ -173,39 +199,98 @@ Routes work only from what the two models already know. They do not browse the w --- -### ๐ŸŒ€ Studio + +### ๐Ÿ”ท Studio + +

Studio's Convert to .lev tool listing a GGUF ready to convert

Where you build the things Leviathan runs on. Nearly every control has a sensible default; the notes below tell you which ones are worth touching and which to leave alone. -**โšก Convert โ†’ .lev** +**๐Ÿ”น Convert โ†’ .lev** Turns a `.gguf` (or a safetensors model folder) into a `.lev`, the format Leviathan actually runs on. The first thing you will use, and a one-time job per model. If a model is not supported, it is refused here โ€” with an explanation of exactly which parts Leviathan does not understand โ€” *before* the multi-gigabyte conversion starts, not after. - **Model list** โ€” every model Leviathan found, with buttons to select **All**, **None**, or just the **Unconverted** ones. Tick what you want and convert in a batch. - **Q8_0 mode** โ€” how eight-bit models are laid out. **Split (default)** is the safe choice and what you want almost always. *Shannon* and *Tensor Core F16* are alternative layouts for particular cards; leave it on Split unless you have a specific reason. (Applies to `.gguf` only โ€” safetensors always convert as raw F16.) +- **Which downloads stay compact** โ€” all of the usual ones. Leviathan computes directly on Q2_K, Q3_K, Q4_K, Q5_K, Q6_K, Q8_0, Q4_0, Q4_1, Q5_0, Q5_1, every IQ type (IQ1_S, IQ1_M, IQ2_XXS, IQ2_XS, IQ2_S, IQ3_XXS, IQ3_S, IQ4_NL, IQ4_XS), F16, BF16 and F32, so a `.lev` is the size of the `.gguf` โ€” the `_K_M` / `_K_S` / `_K_L` mixes, the imatrix "IQ" files and MoE models included. (For scale: a 32B model at IQ3_XXS is about a 13 GB file.) The rare leftovers (ternary TQ1_0/TQ2_0, MXFP4) are turned into F16; the converter says so and says how much bigger the file got. + +**๐Ÿ”น Analyze GGUF** +Reads a `.gguf` (or safetensors) file's header without loading the model: architecture, parameter count, tensor types, the key settings (context length, layers, attention heads, experts) and what its tokenizer declares โ€” the special tokens and whether it carries a chat template. Nothing is changed. + +

Analyze GGUF reading Qwen 2.5 Coder 7B's header: architecture, size, tensor types and metadata

+ +**๐Ÿ”น Tensor Scan** +Lists every tensor in a model โ€” shape, type, layer and role โ€” with statistics (mean, spread, range, share of zeros) for the full-precision ones. Filter and sort the table, or export the scan as a JSON blueprint. + +

Tensor Scan listing Qwen 2.5 Coder 7B's 339 tensors with their shapes, types and statistics

+ +**๐Ÿ”น Merge GGUF** +Model merging in a window: [mergekit](https://github.com/arcee-ai/mergekit)'s core methods โ€” Linear, SLERP, TIES, DARE and Add difference (task arithmetic) โ€” run straight on `.gguf` files. No Python, no YAML config, and no converting back to safetensors first. It combines two fine-tunes of the same base model into a new `.gguf`: it reads any quantization (Q4_K, Q6_K, Q8_0, IQ, F16, BF16), merges at full precision and writes an unquantized F16 file โ€” about 2 bytes per parameter, so a 7B model comes to roughly 15 GB. Quantize it afterwards, or convert it to `.lev`. **Check** confirms the models fit together (same architecture, tokenizer and tensor shapes) and shows the output size before anything is written; **Cancel** stops cleanly and leaves no half-written file. +- **Linear** and **SLERP** โ€” blend A and B (*Weight of A*). +- **TIES** and **DARE** โ€” combine what each fine-tune changed relative to their shared **base model** (*Density* or *Drop*, and *Strength*). Without a base model, Model A is treated as the base. +- **Add difference** โ€” A + Strength ร— (B โˆ’ base): carries what fine-tuning changed in B over to A. Needs the base model. + +

Merge GGUF: Qwen 2.5 Coder 7B and cad0, its CAD fine-tune, checked for a TIES merge

+

Qwen 2.5 Coder 7B and cad0, a CAD fine-tune of the same model, checked for a TIES merge: they fit, and the F16 result would be about 14.2 GB. Nothing is written until you press Merge.

+ +**Preview โ€” see what a merge does before you write it.** Merging usually means writing a 15 GB file first and finding out afterwards whether it works. **Preview** answers before anything is written, in two steps: +- **The weights, in seconds** โ€” how far apart the two models are, layer by layer, and a short list of what to watch in plain words. It catches a trap that can break a merge outright: normalisation channels switched off in one model and on in the other, which any blend switches partly back on. +- **The result, measured** โ€” Model A, Model B and the merge (at your setting, two neighbouring settings, and with A's norm weights kept when that trap shows up) each read real text, and Preview scores how surprised each one is: a shorter bar is better, with a plain verdict โ€” better than both, between the two, about the same, worse than both, or likely broken. The merged weights it scores come from the same code that writes the file, so the forecast is the merge you would get. It runs on the CPU, about a minute per billion parameters, for Llama- and Qwen-shaped models (the weight comparison works for any pair Merge accepts). Point **Preview text** at a file of your own to score the kind of writing you care about. + +**Keep Model A's norm weights** copies those small normalisation weights from Model A instead of blending them; Preview shows when that matters. + +

Merge Preview for Qwen 2.5 Coder 7B blended 50/50 with cad0: a verdict of likely broken, bars for each model and setting, a per-layer chart with layer 1 flagged, and the list of what to watch

+

Qwen 2.5 Coder 7B blended 50/50 with cad0, its own CAD fine-tune: Preview finds 1,390 of layer 1's normalisation channels switched off in Qwen and on in cad0, and measures the blend as likely broken โ€” 5.3ร— more surprised by the text than Qwen, and the same at 25 % and 75 %. Keeping Qwen's norm weights avoids the collapse, but that blend still scores worse than either model. Nothing was written.

+ +**๐Ÿ”น Join SafeTensors** +Hugging Face splits big models into numbered pieces (`model-00001-of-00004.safetensors` โ€ฆ) plus an index file. This joins them into one `.safetensors` file holding every tensor, byte for byte. Nothing is converted, any data type works, and memory use stays small whatever the model's size. Pick a piece, the `.index.json` or the model's folder. **Check** lists the pieces, tensors and output size before anything is written, and the pieces are never touched. +- **Output** โ€” by default a folder of its own (`-joined\model.safetensors`) with the config and tokenizer files copied beside it, ready to load or convert. Keep it out of the pieces' folder: llama.cpp's converter reads the pieces listed in the index while that file is there, and every `model*.safetensors` in the folder when it isn't. +- **Read back** (on by default) โ€” reads the joined file back and checks every tensor against its piece. + +

Join SafeTensors checking a two-piece Hugging Face download before joining it

+ +**๐Ÿ”น Strip Metadata** +Lists the keys that record where a model came from โ€” source and repository links, base models, datasets, author, licence โ€” and writes a copy of the `.gguf` without the ones you tick. The tensors are copied byte for byte. Licence and author start unticked: keep them if you share the file. (A `.gguf` cannot phone home; these keys are labels, not tracking.) + +

Strip Metadata listing the provenance keys a GGUF carries

+ +**๐Ÿ”น Sampling Defaults** +Bakes default sampling settings โ€” temperature, top-p, top-k, min-p and repeat penalty โ€” into a copy of a `.gguf` as llama.cpp's own `general.sampling.*` keys. They travel with the file: llama.cpp uses them whenever you don't pass the flag yourself, while other apps may ignore them, and Leviathan's own chat uses its Settings. Four presets (Creative, Balanced, Coherent, Code-Focused), and you can save your own. -**๐Ÿง  Absorb โ†’ ANI** +

Sampling Defaults with the Code-Focused preset applied, ready to bake into a GGUF

+ +**๐Ÿ”น Absorb โ†’ ANI** Absorbs a model's knowledge into a routable text bank. Pick a model, and it works through a broad sweep of questions, keeping each answer *only* if the model is genuinely confident of it (and dropping honest "I don't know" replies). What survives folds into an ANI knowledge bank you can then use with any model โ€” no retraining, and no multi-gigabyte weight file kept, just text. It runs one pass on the GPU, so it takes a while; a strong model yields rich knowledge, a tiny one yields little. This is the working way to keep a model's knowledge before you retire it. -Two more ways to fill a bank sit in the same tab, both for **code** โ€” where knowledge has to actually *run* to be worth keeping, so instead of trusting the model's confidence, every function is **compiled and run before it is kept**: +Three more ways to fill a bank sit in the same tab, all for **code** โ€” where knowledge has to actually *run* to be worth keeping, so instead of trusting the model's confidence, the code itself is checked before it is kept: +- **๐Ÿ’ป Code only โ€” a dataset or source file** โ€” a code dataset (JSON, JSONL or Parquet: the instruction and code fields are found for you, so any Hugging Face code set works) or a single source file (`.py`, `.js`, `.ts`, `.java`, `.c`, `.cpp`, `.go`, `.rs` and more), syntax-checked into a bank and re-verified every time it is used. Prose โ€” documents, audio, chat logs โ€” is refused, with the reason shown beside the button: ANI can quote prose but never fact-check it. - **๐Ÿ“˜ Absorb a code cookbook** โ€” point it at a file of worked functions (`.py`, `.md`, `.txt`). Each function is extracted, compiled and smoke-run; only the ones that genuinely work fold into a code bank, one runnable pattern each. Nothing broken is kept. - **โš™ Generate a code cookbook** โ€” hand a *coder* model a topic (say "string, list and dict utilities") and it writes the cookbook itself, as a task: it plans the functions, writes each one, and Leviathan compiles and runs every one โ€” repairing from the error and retrying once if it fails โ€” so the bank fills with functions that are correct by construction. A strong coder builds the library; a small model then borrows those patterns. It is how a lightweight model can code well above its own weight โ€” it fetches a verified pattern instead of guessing one. -**๐Ÿ”Ž Inspect .fkb** -Opens a legacy knowledge-bank file and shows what is actually inside it โ€” where it came from and how it is put together. For older weight-based banks; new knowledge is text (Absorb โ†’ ANI above). +

Absorb โ†’ ANI: the code-only card and the card that drains a model's knowledge

+ +**๐Ÿ”น ANI Voice** +How ANI *sounds* โ€” delivery only. This sets the tone ANI's answers are wrapped in; it never changes what ANI knows or says, only how it says it โ€” the facts are identical in every setting. (It replaces the old "Personality โ†’ .fqm" builder: a `.fqm` is a *model's own memory*, and *how a model comes across* is ANI's job โ€” kept separate, and kept clean.) +- **ANI's voice โ€” your call.** Three registers: **Auto** (match your voice โ€” it learns how you talk, live as you chat and from logs you give it), **Warm** (always-friendly framing), or **Cold** (pure and sharp โ€” the default). +- **Learn my voice from chat logs.** Point it at your saved chat logs (`.txt`, `.md`, `.json`, `.log`). ANI reads **only your turns** โ€” never the model's, never pasted code โ€” and measures your *register*: your rhythm, how you emphasise, the tells you lean on. It is **gated** โ€” a thin, spammy or incoherent log is rejected rather than learned from, so a poisoned log can't skew how ANI sounds and your existing voice is kept. And the log is read for register **only**: none of its text is ever written into a knowledge bank, so this can never pollute or bloat the vault. +- **Current learned voice.** Shows the measured profile โ€” how emphatic it is, how often it trails off, its sentence rhythm, the cues it leans on โ€” so you can see exactly what was learnt. Your learned voice is yours and local; nothing leaves. + +

ANI Voice: the Auto, Warm and Cold registers, and learning your voice from chat logs

-**๐Ÿชž Personality โ†’ .fqm** -Builds a Personality profile โ€” the *second* kind of `.fqm`, the one you make on purpose, not the memory that accumulates on its own as you chat. Point it at the **model** the profile is for (the same one you will chat with โ€” a profile is tied to its model) and at the **chat log or folder** to absorb (`.txt`, `.md`, `.json`, `.log`). Press **Preview (dry-run)** to see what it will do without writing anything, or **Build profile** to make it. -- **Mirror me (weight my turns)** *(on)* โ€” makes the profile reflect *you* rather than the assistant voice, by weighting your side of the conversation. Leave it on for a "sounds like me" profile. -- **Assistant chars kept** *(default 200; 0 = pure-you)* โ€” how much of the assistant's replies to keep for context. Set it to 0 for a profile built purely from your own words. -- **Resume / accumulate into existing .fqm** *(off)* โ€” adds to a profile you already built instead of starting fresh. Turn it on to grow one profile across several batches of source text. -- **Stage-11 quantum cascade** *(on)* โ€” lets a full-length log be absorbed without hitting a memory wall, and does nothing on models that do not need it. Leave it on. -- **Hot-window** *(default 2048)* โ€” how many of the newest tokens are kept at full detail while older ones compress. The default suits most logs. -- **Trait weighting (feel the weight)** *(on)* with **Boost** *(default 1.0)* โ€” keeps the charged, distinctive moments sharp while filler blurs, so personality survives compression. Raise the Boost above 1 to make the personality bite harder; 1.0 is balanced. -- **Skip duplicate messages** *(on)* โ€” skips byte-identical messages (boilerplate, copy-pasted snippets, "thanks"), roughly 40% faster on real logs with no loss. -- **Harvest reasoning chains** *(on)* โ€” pulls step-by-step reasoning out of the same log into a companion file beside the profile, so the model keeps that too. +**๐Ÿ”น Inspect .fqm** +Look inside a model's memory. A `.fqm` is what Leviathan saves so a model can pick up where you left off; this tab shows everything in one without changing it. Your memory files are listed; **Open another fileโ€ฆ** takes one from anywhere. +- **What it is** โ€” which model it belongs to, how many tokens it has read, how many it keeps exactly and how many older ones are summarised. +- **Every byte accounted for** โ€” a `.fqm` is a short tag, a plain-text (JSON) header and blocks of numbers, and their sizes add up to the file's size exactly, so nothing else can hide in it. Every block is unpacked and checked: it is all numbers, and nothing in it is ever run as code. Anything the format doesn't define is flagged. +- **The header** โ€” every field in plain words, and the text exactly as stored. +- **The numbers** โ€” every block, what it holds, and a picture of it. **Save this block as .npy** hands you the numbers to check with your own tools. +- **Read it back** โ€” with the model that made it, the recent part of the memory turns back into the words it came from. A model's first layer computes each entry from its token alone, so every entry matches exactly one token of the model's vocabulary. It runs on the CPU in a few seconds, and it also proves which model a memory belongs to: a different model matches nothing. + +

Inspect .fqm opening a memory file: what it is, and every byte accounted for

+ +A `.fqm` holds no text, but it is made from your conversation: anyone with the same model can read its recent part back. Keep it, and share it, the way you would the chat itself. --- -### ๐Ÿงฟ Cores + +### ๐Ÿ”ท Cores *Individual memory ยท Individual mind.* @@ -220,7 +305,8 @@ Each model gets its own core. They do not pool and they do not leak into each ot --- -### ๐Ÿ”ฎ Memory Vault + +### ๐Ÿ”ท Memory Vault *Pure knowledge ยท No personality bleed.* @@ -228,13 +314,14 @@ The archive. Every memory file, model and knowledge file Leviathan can see, in o - **๐Ÿ“ Add Folder** brings in a folder from anywhere on your machine. Your models do not have to live where Leviathan put them. - **๐Ÿงน** cleans up files flagged as stale or broken. -- **Auto-backup** *(on by default)* โ€” when on, absorbing or consuming knowledge also writes a `.jsonl` backup of your banks to the backup folder, so your distilled knowledge is never trapped in a single file. (Whether knowledge is *offered* to models is the **Knowledge routing** switch in **Settings โ†’ Consume knowledge**; this toggle is purely about keeping backups.) +- **Auto-backup** *(on by default)* โ€” when on, absorbing knowledge also writes a `.jsonl` backup of your banks to the backup folder, so your distilled knowledge is never trapped in a single file. (Whether knowledge is *offered* to models is the **Knowledge routing** switch in **Settings โ†’ Knowledge routing (ANI)**; this toggle is purely about keeping backups.) **The right-hand panel on this tab** is the **๐Ÿง  Knowledge Banks** browser: the text knowledge banks Leviathan holds right now (the live banks and their `.jsonl` backups), which folders they are read from, and โ€” click a bank โ€” how many entries it holds with a sample of what is inside. You can point it at additional folders anywhere on your machine and it remembers them between sessions. It is the place to check what knowledge Leviathan can actually see. --- -### ๐Ÿงฌ Traits + +### ๐Ÿ”ท Traits *Measured interaction traits ยท model evolution over time.* @@ -244,10 +331,14 @@ It measures what the model **did**, not what it claims about itself or what its --- -### โŒจ Inline Studio + +### ๐Ÿ”ท Inline Studio *Autonomous coding ยท one model, or a team taking turns on a shared project.* +

Inline Studio after Qwen 2.5 Coder 7B wrote roman.py from a one-line task

+

One line of task at the top; the model wrote roman.py, the execute-gate ran it, and the project converged.

+ Give it a task and a local model writes the code โ€” complete files, not snippets. You never have to teach the model to "use a code tool": it writes files the way it already wants to, marking each one, and Leviathan reads what it writes into a project you can open, edit, and save. Tick one model and it works alone; tick several and they **take turns** on the same files โ€” one drafts, the next refines, a third adds โ€” each reading the project so far and the whole running team chat. **Give them names.** Double-click a model in [Models] and rename it โ€” Bob, Bill, whatever you like. Because every model sees the running conversation, named models talk *to each other*: "thanks Bill, that helps a lot โ€” I'll take the parser from here." It is a real back-and-forth, not a relay of one-line notes, and they genuinely discuss how to improve the code. @@ -264,41 +355,163 @@ The right-hand column is the team โ€” the models taking part on top, their runni --- -### โš™ Settings + +### ๐Ÿ”ท Graph + +*Build with nodes โ€” and let a model build with you.* + +

The model's phone-stand script as shape nodes in the Graph, with the 3D part beside it

+

The model's phone-stand script, turned into 9 shape nodes and 9 parameters โ€” checked to make exactly the same part.

+ +A visual node canvas: wire up shapes, numbers, expressions and snippets of code into a graph that computes a result. These are Leviathan's **own** nodes, not a bolted-on third-party pack โ€” each does one clear thing, and the wires carry values between them. + +**Eighty-seven of them, in fifteen families.** **Maths** โ€” Math, Function, Clamp, Map Range, Mix, Snap to a step, a seeded Random (the same seed, the same numbers), Range, Statistics, Constants, Unit Convert. **Logic** โ€” Compare, and / or / xor / not, Switch. **Text** โ€” Join, Split, Replace, Find, Format, Number โ†” Text. **Lists** โ€” Get Item, Slice, Sort, Unique, and Map Numbers / Keep Where, which take a formula. **Data** โ€” Get and Set Field, Keys & Values, CSV โ†’ Table, Column. **Thirty shape nodes**, among them Tube, Torus, Rounded Box, Regular Polygon (six sides and you have a nut trap), Offset, Grid Array, Trim, Place On Bed, Simplify and Cross Section. **Measure** and **Bounds**, so one part's real size can drive the next โ€” a lid that sits exactly on its box. **Show**, which puts just the answers in the log. And **Ask Model** / **Ask ANI**, which put your own model or your knowledge banks inside a pipeline. You don't have to browse for them: the **๐Ÿ”Ž search** beside the palette finds any node by its name or by what it does โ€” *nut trap* finds Regular Polygon, *average* finds Statistics โ€” and Enter drops the top match onto the canvas. A setting with fixed choices is a menu, not a guess. A graph built only from pure nodes re-makes its part live as you edit; formulas are arithmetic only; and nothing reaches the internet โ€” the one node that speaks HTTP talks only to a model server on your own PC. + +**A magnifier for big graphs.** Zoom out far enough to see a whole graph and the text on its nodes shrinks with everything else. Hold the **middle mouse button** and a lens follows the pointer, redrawing the nodes under it at full size โ€” sharp, because it redraws them rather than enlarging pixels โ€” much like Windows Magnifier's lens. Let go and it's gone; clicks and drags still reach the canvas while it's up. **๐Ÿ” Magnify on hover** brings the lens up without a button whenever you're zoomed out. + +

A 47-node graph zoomed out until its text is unreadable, with the magnifier lens gliding across it and showing each node at full size

+

A parametric enclosure script as 47 nodes, zoomed out to 25 %: the middle button held, the lens glides across it at full size.

+ +What lifts it past an ordinary node editor is that a **model โ€” or ANI โ€” can read and build the graph alongside you.** The old trap with model-driven node tools was that the model was never told which nodes or ports existed, so it guessed and the whole thing fell apart โ€” Leviathan hands the model that context, so it actually knows the graph it is working in and can lay one out or extend it on request. Ask in the graph's own chat box, or press **โ—† ANI** to put the question to your knowledge banks instead. In the public build a model may *propose and build* a graph, but **only you run it**: the host keeps the trigger, never the guest. The model's graph-building turns draw on their own **Token budget**, set per surface in [Settings] like every other place a model writes. + +**Models that speak CAD.** A model trained to write whole parts in *Compact IR* โ€” such as cad0 โ€” is recognised: **โ–ถ Build** asks it once, in its own format, and Leviathan turns its answer into nodes line by line, reading each line out in plain words under the canvas as it lands. Nothing the model writes is run as code โ€” its answer is data, translated into Leviathan's own CAD script and checked to make exactly the same part. + +

cad0 building a mounting plate in the Graph: its Compact IR becomes nodes one line at a time, each line read out under the canvas, then the 3D part appears

+

Real time: โ–ถ Build with cad0 (Cam Pedersen's MIT-licensed text-to-CAD fine-tune of Qwen 2.5 Coder 7B), given its model card's own example โ€” "50x30mm mounting plate with 4 corner holes". It answers in 13 lines of Compact IR; each becomes nodes as you watch.

+ +

The finished mounting plate beside its whole graph, with every line of cad0's answer read out under the canvas

+

The result: 50 ร— 30 ร— 4.5 mm with four corner holes, watertight โ€” the whole graph on the left, the part on the right.

+ +And a graph is not the end of the line. When one describes a shape, **โ‡ข Send to Planner** hands it straight to the 3D Planner as a solid part. That is the thread running through these tabs โ€” **code โ†’ graph โ†’ part** โ€” each handing on to the next. + +--- + + +### ๐Ÿ”ท Planner + +*A real 3D modelling engine, built from scratch โ€” parametric, watertight, and in true-to-life scale.* + +

Asking the model in the Planner for a screw hole through the base; the edit lands as a history step

+

Real time: asked in plain words for a screw hole through the base, the model's edit lands as step 2 in the history โ€” Undo takes it back.

-Six sections. (The reasoning-depth control used to live here; it now sits down by the chat box instead โ€” see [Chat] and [Reasoning layer].) +The Planner is not a preview pane or a toy. It is a genuine **parametric CAD engine**, written in-house, where you build a solid part the way an engineer does โ€” a sketch, an extrude, a cut, a pushed face โ€” with every step recorded, so the whole part is a *history* you can walk back through and change. Undo is not a snapshot; it steps back through the real operations that made the part, and the part rebuilds itself from them. -**๐Ÿ›ก Security membrane** -Scans what you send โ€” and anything you paste or load โ€” before the model sees it. Covered properly [below]. +**What makes it serious engineering, not a mesh viewer:** + +- **Watertight, manifold geometry.** Every operation produces a *solid* โ€” a closed, manifold mesh with no holes, no self-intersections, nothing that only looks right from one angle. That is the property real CAD and 3D printing demand, and it holds at every step because the geometry kernel *guarantees* it rather than hoping for it. +- **Absolute, real-world scale.** Everything is in **millimetres**, grounded on a build bed at zero. A 40 mm box is 40 mm โ€” not forty arbitrary units. A dimension you type means the same on a tilted face as on the bed, because each face you pick is given its own coordinate frame in the proper CAD convention. What you model is what you could hold. +- **The operations.** **๐Ÿ“‚ Importโ€ฆ** any 3D file โ€” STL, 3MF, OBJ, PLY, glTF/GLB or FBX โ€” as a solid at its real size (see [Every file gets a blueprint](#blueprint)); sketch a **rectangle, circle or polygon** on any plane and **extrude** or **cut** it; pick a flat face and **push or pull** it (out to add material, in to carve it away); draw directly **on a face**; and **move, rotate, scale** or **drop** the whole part onto the bed. Snap-to-grid in millimetres, keyboard shortcuts, a polygon that closes on its own first corner โ€” the muscle-memory of a real modeller. +- **A GPU-drawn viewport.** The 3D view is rendered on your graphics card, so you orbit, pan and zoom a detailed part at 4K smoothly โ€” the renderer was built for it, not bolted on. +- **The file is yours, and it is open.** A part saves as plain **JSON** โ€” the ordered history of operations, not an opaque blob โ€” so it is readable, diff-able, and never locked to a format only Leviathan understands. It autosaves and keeps backups as you work. +- **It fabricates.** **โ‡ข Send to Fabrication** writes the part as **3MF and STL** โ€” the formats a 3D printer or slicer actually takes โ€” and opens it in the [Fabricator], which proves it printable before it goes anywhere near a machine. + +**And it is driven by more than the mouse.** A graph from the [Graph] tab can be sent in as a solid part โ€” *CAD as code* โ€” and the same pipeline runs the other way too, from Inline Studio's code, to a graph, to a finished part. Model by hand, by node, or by code, all into one engine. + +**And by instruction โ€” a model that knows where it is.** Bottom right sits a chat with the model you've picked โ€” shown as chips above it, the same pick Inline Studio and the Graph use, so the model you chose in one tab is the model in the next โ€” or **โ—† ANI**, answering from your knowledge banks. The old trap with models and 3D tools is that the model never knows what it's looking at, so it guesses; the Planner hands it the part instead โ€” its real size in millimetres, how it was made, every face and hole measured from the part itself (each with an id, so the model can place a hole, slot or boss just by naming the face, and Leviathan works out the coordinates), and any face you've picked. Ask *"a 6 mm hole through the middle"* or *"a 10 mm lip around the top"* and the model answers in the CAD library's own language, against the part as it stands โ€” `result = part - cylinder(h=20, d=6).move(40, 30, -1)` โ€” which Leviathan runs in the same locked-down runner as everything else and lands as **one step in the history**: โ†ถ Undo takes it back. If its script fails, the error goes back to it once to repair; anything outside the safe CAD subset never runs at all; and an answer to a question changes nothing. It works on its own **Token budget** in [Settings]. + +That closes the loop Leviathan is built around: **you type, a model designs it โ€” in the Graph or right here โ€” it becomes a watertight part, and the [Fabricator] proves it printable and writes the 3MF/STL a printer takes.** When the Fabricator flags something, **โœŽ Ask the model to fix it** brings the part back here with the findings, and the model's fix arrives as one more undoable step. You say what you want; a model builds it โ€” and then makes it real. + +This is early, and it is deliberately ambitious. It already reads six formats and writes four; the plan is to keep widening that until it is a full fabrication suite โ€” built entirely in-house and entirely local, no subscription, no cloud project store, no account, the parts you make kept as files on your own disk in a format you can read. It is a foundation laid to grow, and it will. + +--- + + +### ๐Ÿ”ท Fabricator + +*Prove it printable โ€” then hand it to your slicer.* + +

The Fabricator's checks passing for the phone stand on a Prusa MK4

+

Watertight, fits the bed, no overhangs, walls thick enough, real contact with the plate โ€” and a rough cost in filament.

+ +The last step from idea to object. A failed print usually announces itself six hours and a spool of filament too late; the Fabricator catches it before the first layer. A part arrives from the [Planner] (โ‡ข Send to Fabrication opens it here), from the PROJECT column, or from anywhere on your disk with **๐Ÿ“‚ Openโ€ฆ** โ€” any 3D file: STL, 3MF, OBJ, PLY, glTF/GLB or FBX, read at its real size by its [blueprint](#blueprint) โ€” so it checks the model you just downloaded, too, without copying it anywhere. + +The part sits on **your printer's real build plate**, with the build volume drawn around it. Pick your printer from the list (Prusa, Bambu Lab, Creality, Elegoo, Voron and more, by their published build volumes) or type your own bed size, nozzle, material, price per kilo and infill. Leviathan remembers your printer. Then every check runs on the mesh itself: + +- **Watertight** โ€” every edge shared by exactly two faces, wound consistently, nothing inside out. Planner parts are closed by construction; a mesh from elsewhere gets its holes and flipped faces counted. +- **Fits the bed** โ€” the part's size against your build volume, by how much it's over if it is, and whether a quarter turn would fit it. +- **Overhangs** โ€” any underside steeper than 45ยฐ needs support. These faces always point downward, so a part that has them opens **seen from below**, where you can see them; **โค“ Under** gets you back there any time. +- **Walls** โ€” the thickness of every wall, measured by a ray cast straight through to the opposite side. Thinner than two nozzle widths prints as a single, weak line; thinner than one may not print at all. +- **Bed contact** โ€” the real footprint of the first layer, measured as a cross-section just above the plate rather than guessed from "flat" faces. Nothing to grip is an error; too tall for its footprint wants a brim. And if a big flat underside sits a hair above the lowest point โ€” a rotated piece's corner poking below the base is the classic โ€” it says so, by how much, and what to trim. +- **Estimate** โ€” roughly how many grams of filament and what they cost, from the volume, two walls and your infill. Your slicer gives the exact figure. + +Problem faces are tinted right on the part โ€” **orange** needs support, **yellow** is too thin, **red** is an open or flipped edge โ€” and a verdict sits on top: *ready for your slicer*, *printable โ€” mind the warnings*, or *not ready*. **โŸฒ Auto-orient** turns the part for the least support (then the most bed contact, then the lowest height, and a quarter turn if that's what it takes to fit), **โ†บ Reset** puts it back, and **โ‡ช Export** writes it the way it's turned: **3MF / STL** for your slicer, **OBJ** in millimetres, or **GLB** in metres, Y up โ€” glTF's own convention, so Blender, Unity and Godot open it at its real size. And when a Planner part is flagged, **โœŽ Ask the model to fix it** takes it back to the [Planner] with the Fabricator's findings for your model to fix โ€” one undoable step โ€” ready to send back and check again. + +**What it deliberately is not: a slicer.** Slicers are decades of craft and you already own one; the Fabricator's job is to make sure what you hand it will work. Nothing in it touches the network. Every check runs on your machine โ€” in moments for a typical part, a few seconds for a huge downloaded mesh โ€” on a worker thread, so the window never freezes while it works. + + +#### ๐Ÿ”น Every file gets a blueprint + +Moving a 3D file between programs is where real-world size usually dies. STL, OBJ and PLY carry **no units at all**, so a part drawn in inches lands 25.4ร— too small, a Blender export in metres arrives as a speck, and a Y-up file turns up lying on its back. Leviathan reads a mesh the way it reads a model โ€” **blueprint first**. Before anything comes over, it names the format from the file's own bytes (never trusting the extension), reads the body exactly as stored โ€” every part placed by its own transforms โ€” and notes what the file *declares* against what the body *is*: + +- **Declared** โ€” glTF is metres and Y up by definition; a 3MF states its unit; an FBX records its unit scale, its axis system and the program that wrote it. Those are read, not guessed. +- **Not declared** โ€” for STL, OBJ and PLY it weighs the evidence: how big the object would be in each unit, and whether its design dimensions โ€” the gaps between its flat faces โ€” come out as round numbers in one of them (a metric part saved in inches gives itself away). It says how sure it is, and when the evidence is genuinely split it says so and names the runner-up rather than guessing with confidence. + +Then the differences are applied automatically โ€” millimetres, Z up, on the bed โ€” and listed. In the Fabricator the **FILE** panel shows the blueprint with **Units** and **Up** switches, so a file that didn't say can be put right in one click without being read again; the Planner asks once, and only when a file's units are honestly ambiguous. It reads STL, 3MF, OBJ, PLY, glTF/GLB and FBX 7 (2011 on, binary or text). Nothing is ever fetched: a glTF that points at the web or outside its own folder is refused, and so are Draco- or meshopt-compressed meshes (export without compression). + +The readers are Leviathan's own โ€” no extra library in the build โ€” and checked against independent ones on files from real exporters: FBX against three.js's own FBXLoader (Blender, Maya and Mixamo files, binary and text), OBJ, PLY, STL and glTF against trimesh. Same triangles, same placement, same surface area. + +--- + + +### ๐Ÿ”ท Settings + +

Settings: the security membrane, episodic memory and fact-check switches

+ +One scrollable tab holding every switch and dial in Leviathan, grouped by what it governs. Nothing here needs a restart โ€” a change takes effect on your next message, and every one is remembered between runs. (The one control that *used* to live here, reasoning depth, now sits by the chat box instead โ€” see [Chat] and [Reasoning layer].) + +Here is everything you will find, top to bottom: + +**๐Ÿ”น Security membrane** โ€” scans what you send, and anything you paste or load, before the model sees it. [Below]. - **Security enabled** โ€” the master switch. Off is a legitimate choice; it is your machine. -- **warn / block** โ€” whether something hostile gets flagged with an explanation, or stopped outright. +- **When something looks hostile: warn / block** โ€” flagged with an explanation, or stopped outright. - **Also scan files and pasted documents** โ€” extends scanning beyond what you type to what you drop in. +- **Watch for steering across a conversation** โ€” catches a restricted request spread across several innocent-looking messages, not just a single one. + +**๐Ÿ”น Knowledge routing (ANI)** โ€” the knowledge engine, and the one optional door to the web. See [Knowledge routing]. + +- **Knowledge routing enabled** โ€” on by default; only fires when a bank actually holds something that fits the question. +- **๐Ÿ—ฃ ANI background voice** โ€” on by default. ANI speaks through your loaded chat model for free; this lets her *also* use a small bundled model (3B/1B, a *Custom* installer choice) as her voice when nothing's loaded โ€” freed the instant you mount your own. Off โ†’ she speaks only through your loaded model, else plain text. See [Knowledge routing] โ†’ *How ANI speaks*. +- **๐ŸŒ Web lookup when ANI has no answer** โ€” off by default. The one door out: on a gap it sends *only* your question to be answered, gates the result, and keeps it local for next time ([the one door out] explains it in full). +- **Web source** โ€” the default is **Wikipedia**: keyless, free, no signup, and only `en.wikipedia.org` ever sees your question โ€” ideal for *what-is-X* facts, which the local binder phrases into a grounded answer. Two optional keys layer on top, tried first and falling back to Wikipedia: + - **Tavily key** โ€” optional, genuinely free tier (sign up at tavily.com). A search built for LLMs that returns a *direct answer*, so it handles **premise** questions Wikipedia can't โ€” ask "the capital of the Moon" and it comes back with "the Moon has no capital," which ANI then grounds and stores. Only `api.tavily.com` sees the question. + - **Gemini key** โ€” optional, and only useful on a *paid* Gemini plan (Google moved search-grounding behind billing). With a paid key it returns a composed, live-search-grounded answer, sent only to Google. + - Whichever source answers, the result is membrane-gated, grounded (ANI only states what the source said), and kept local for next time. +- **๐Ÿ—‚ Defragment** โ€” ANI's housekeeping, and worth understanding. Absorbed knowledge lands first in a staging pen, kept *out* of answers until it is sorted; **Defragment now** re-classifies each waiting item on your GPU into the subject bank it truly belongs to (or *conversations* for pure chatter). Run it when the waiting count grows โ€” it is how ANI stays tidy and sharp as the vault fills, and how nothing un-sorted ever leaks into a knowledge answer. The librarian sorts the shelves after hours. (Absorbing *into* ANI now lives in **Studio โ†’ Absorb โ†’ ANI**, and takes code and datasets only โ€” never loose documents.) + +**๐Ÿ”น Episodic memory** โ€” your conversations, remembered *per model*. Each model recalls its own past turns across sessions, and the tag-chain links them so *"remember Pepper the dog"* pulls the whole thread back. A model's episodic memory is its own โ€” it never bleeds into another model, and it never folds into ANI's shared banks. On by default; **๐Ÿ—‘ Forget conversations** wipes it. [Below]. + +**๐Ÿ”น Leviathan Factโ€‘Check** โ€” after a factual answer, re-asks the model the same thing a few times and flags it if the retellings disagree. Off by default (it costs a few extra local runs). [Below]. + +**๐Ÿ”น Leviathan Vault Capture** โ€” keeps the substance of what a cloud model tells you, on your own key, on your machine, so your local models can draw on it later. On by default. See [Recycling cloud answers]. + +**๐Ÿ”น Server for other programs** โ€” lets a game engine, a script, or any other program on this machine use the models Leviathan runs, over a local HTTP endpoint (127.0.0.1:8080, OpenAI-compatible *and* Leviathan-native). Flip on to start, off to stop. [Using Leviathan from other programs]. -**๐Ÿง  Eidetic recall** -Answers a question you have asked before instantly from cache instead of regenerating it. Exact matches only. [Below]. +**๐Ÿ”น Token budget** โ€” how much a model may write in **one reply**, set per surface: **Chat**, **Inline Studio**, the **Graph** and the **Planner** โ€” each a place a model actually writes. A slider from **512** up to **โˆž**. This is *reply* length, and it is separate from context length: a big context does not make replies longer, this slider does. โˆž is bounded only by the model's own context window โ€” your hardware, not a built-in cap. -**๐Ÿ” Leviathan Factโ€‘Check** -After a factual answer, re-asks the model the same thing a few times and flags it if the retellings disagree. Off by default (it costs a few extra local runs). [Below]. +**๐Ÿ”น Context length** โ€” the model's **single-pass window**: how big one prompt can be (system prompt + any project files + any ANI reference + your message) and the range its positions cover. From **2048** up to **Max** โ€” the model's own full trained window, costing more VRAM the higher you go, bounded by your card and not by us. This is *not* long-term memory: the `.fqm` and episodic memory carry a conversation across sessions at any window (the `.fqm` keeps the newest part exact and folds the rest into ever-coarser summaries). So raise it only when a single prompt is genuinely large, such as Inline Studio with ANI injection. It was silently pinned at 2048 before; now it is yours. Takes effect the next time a model is loaded. -**โ™ป Leviathan Vault Capture** -Keeps the substance of what a cloud model tells you โ€” on your own key, on your machine โ€” so your local models can draw on it later. On by default. [Below]. +**๐Ÿ”น Memory storage (.fqm)** โ€” how a model's persistent memory is written to disk; the mechanism is covered in full under [Persistent memory]. Choose the storage stage โ€” **half-size** (float16, the default: about half the size, at the standard KV precision), **lossless**, or an experimental **Shannon** stage โ€” and set the **compaction window**: how many recent tokens stay exact before the cascade folds the older ones into its summary levels, so a long chat's `.fqm` grows a level at a time instead of with every turn. -**๐Ÿ–ฅ This machine** -What Leviathan found: your graphics card, and the exact folder your data is being written to. +**๐Ÿ”น Appearance** โ€” your own colour for Leviathan's frame. Pick it with **R / G / B sliders** or a preset, see it in a preview, and **Apply** repaints the window on the spot; it's remembered next time. Only the frame changes โ€” the window, panels, fields and borders. Buttons, the accent colour and your work (graphs, 3D views, code) keep their own colours, and every panel keeps exactly the brightness it has now, so text stays just as readable whatever colour you choose. **Deep sea** puts the original look back. A **Window opacity** slider makes the whole window see-through, down to half. -**โ„น About** -Author, copyright, licence, and buttons through to the GitHub repository, the Zenodo whitepaper archive, and the full licence text. +**๐Ÿ”น This machine** โ€” what Leviathan found: your graphics card, and the exact folder your data is being written to. + +**๐Ÿ”น About** โ€” author, copyright, licence, and buttons through to the GitHub repository, the Zenodo whitepaper archive, and the full licence text. + +*(Encryption for your knowledge is not here โ€” it lives on its own tab, as a single padlock. See [Memory Vault].)* --- -## The systems + +## ๐Ÿ”ท The systems -The four tabs above are surfaces. These are the things running underneath them. +The tabs above are the surfaces โ€” what you open, click and type into. These are the systems running *underneath* them: the machinery that gives a model a memory that lasts, knowledge it can reach for, answers held to their own honesty, and a guard on everything that comes in. You never open these directly; they are what the tabs are *for*. --- -### Persistent memory + +### ๐Ÿ”ถ Persistent memory **The problem.** Every chat with a local model normally starts from nothing. Close the window and the model has never met you. The usual workaround is to paste a summary of yourself at the start of every conversation, which is tedious, eats your context window, and is a poor imitation of remembering. @@ -310,9 +523,10 @@ The four tabs above are surfaces. These are the things running underneath them. - Things you explained last week are still known this week. - Corrections stick. Tell it you prefer something done a certain way and it stays told. - The memory is not a transcript being re-read. It is the model's own representation, so it does not consume your context window the way pasting a summary does. +- Long conversations keep their order. However long a chat runs, your latest turns stay the latest: when the model's position range would run out, the whole memory slides back along it instead of wrapping round on itself. - What it keeps is the *substance of the exchange* โ€” your messages and its answers. The invisible scaffolding Leviathan wraps around each turn (the reasoning nudges, the safety checks, the context it assembles for that one reply) steers the answer and is then left out of the memory. Knowledge is kept; the machinery around it is not, so the memory stays lean and on-point instead of bloating with structure that carries no meaning. -**When it saves.** After your first exchange, then every fifth. No button. If it cannot save, it tells you โ€” silence would be worse than a warning, because a memory system that quietly does nothing is indistinguishable from one that works. +**When it saves.** After your first exchange, then every fifth. No button. If it cannot save, it tells you โ€” silence would be worse than a warning, because a memory system that quietly does nothing is indistinguishable from one that works. Each save is **atomic**: the new memory is written in full and swapped in as one uninterruptible step, so a crash or power cut mid-save leaves the previous good memory standing, never a corrupted file. The memory can grow, and it can fail to save, but it cannot tear. **Where it lives.** One file per model in your FQM Database folder, named after the model. Deleting it resets that model to a blank slate. Copying it elsewhere backs up that mind. @@ -322,11 +536,12 @@ The four tabs above are surfaces. These are the things running underneath them. --- -### Knowledge routing โ€” ANI + +### ๐Ÿ”ถ Knowledge routing โ€” ANI **The problem.** A model knows what it was trained on. It does not know your rulebook, your codebase, your company's processes or your world's history. The usual fix is to paste the relevant document into the chat, which means knowing in advance which document is relevant and having room for it. -**What Leviathan does instead.** You build knowledge banks, and each one is *text* โ€” knowledge drained out of a model before you retire it, folded in from your own past conversations, or written by hand. ANI, the router, projects every bank and every question you ask into **one shared space**, where nearness means relatedness of *meaning*. Ask something and it finds the knowledge that actually fits โ€” across all your banks at once โ€” and hands it to the model before it answers. You never file the question under a subject or pick a bank from a list; the geometry does that for you. +**What Leviathan does instead.** You build knowledge banks, and each one is *text* โ€” knowledge drained out of a model before you retire it, consumed from a document or a recording, or written by hand. ANI, the router, projects every bank and every question you ask into **one shared space**, where nearness means relatedness of *meaning*. Ask something and it finds the knowledge that actually fits โ€” across all your banks at once โ€” and hands it to the model before it answers. You never file the question under a subject or pick a bank from a list; the geometry does that for you. **What that means in practice:** @@ -335,16 +550,21 @@ The four tabs above are surfaces. These are the things running underneath them. - The strongest bank wins and a weak one loses, on the same question, by relevance alone โ€” so quality beats quantity. A bank is only ever as good as what went into it; a vague source makes a vague bank, and the router will faithfully surface exactly that. - Banks grow. Consume the same knowledge twice and the duplicate is dropped; add something new and it accretes. The space reshapes itself as the substrate grows. -**Consuming knowledge โ€” four ways in, all of them local.** This is where Leviathan is genuinely unusual: it can take knowledge in from almost anything you have, and *every* path runs on your own machine with nothing sent anywhere. In **Settings โ†’ Consume knowledge** you point it at a source and press **Consume**; it folds the text into a bank in the background โ€” deduplicated so nothing is stored twice, coherence-checked so degenerate or repetitive text never makes it in, and backed up as `.jsonl`. The sources: +**How ANI speaks โ€” her voice.** ANI *finds* the right knowledge, but reading it back as a fluent answer needs a small generator to phrase it โ€” a voice. Here is the honest shape of it, because it's the question most people ask first ("why is there a model in settings โ€” why not just use my own?"): + +- **ANI uses your own loaded model.** When you have a chat model mounted, ANI speaks through *it* โ€” for free, no extra memory. Your model is her voice. That is the normal case, and it's exactly what you'd expect. +- **The bundled binder is only for when nothing is loaded.** So that ANI can still answer when you *haven't* mounted a model, Leviathan can ship a small model (a fluent 3B ~2 GB, or a lighter 1B ~1 GB) that becomes her voice in that moment. **The instant you load your own model, that binder is freed** โ€” it never sits alongside yours competing for VRAM, and it never overrides your model. It's a backup voice, not a second brain. +- **It only ever phrases โ€” it can't invent.** The binder speaks *only* from the knowledge ANI retrieved, held to it by a grounding check. A near-empty 3B whose knowledge all comes from ANI *cannot* hallucinate facts of its own โ€” which is the point. The knowledge is ANI's; the binder just gives it a mouth. +- **Entirely optional, and off-switchable.** The binder models are a *Custom* choice in the installer โ€” tick the 3B, the 1B, both, or neither. And **Settings โ†’ ANI โ†’ ANI background voice** turns the whole thing off: ANI then speaks only through your loaded model, or hands back the retrieved knowledge as plain text. ANI itself stays on either way โ€” this only ever decides her *voice*, never whether she works. -- **A document.** A PDF, a text or Markdown file, an EPUB, a Word document โ€” the words are the knowledge. No model needed, nothing leaves. -- **An audio or video file.** A lecture, a podcast, a meeting recording โ€” Leviathan transcribes the *speech* locally (Whisper, on your GPU or CPU) and folds the transcript. What was said becomes something your model can answer from. -- **Your screen.** Beside the chat, **๐Ÿ“ท Screen absorb โ†’ Capture screen โ†’ ANI** reads the text on your screen and folds it. This is the one honest way to keep a *web page* without breaking the web-free rule: you open the page in your own browser, and Leviathan reads it *off the screen, locally* โ€” it never fetches anything. What Edge's Copilot glances at and forgets, Leviathan keeps. -- **Your voice.** A little **๐ŸŽ™** sits by the chat box. Click it, narrate a thought โ€” a note, an idea, something you just worked out โ€” click again, and it is transcribed and folded. The microphone audio never leaves the machine. +**Filling a bank โ€” local, every time.** You fill banks in **Studio โ†’ Absorb โ†’ ANI**, and each one folds in the background โ€” deduplicated so nothing is stored twice, coherence-checked so degenerate or repetitive text never makes it in, and backed up as `.jsonl`. Every path runs on your own machine with nothing sent anywhere. Two kinds of source, both *vetted* on the way in: -**When the source is messy.** A chat log, a scraped page, a chaotic transcript โ€” signal buried in emoji, shouting, spam and filler โ€” would normally be thrown out whole by the coherence check. Tick **Messy source (salvage signal from noise)** on the screen-absorb section or in Consume and Leviathan strips the noise first and keeps the readable parts, so the knowledge is salvaged instead of lost. It only ever *selects and strips* what is already there โ€” it never writes new text โ€” so nothing is invented in the cleanup. +- **A model, drained.** A model talks out what it knows and Leviathan keeps only what it is genuinely confident of โ€” the knowledge a retired model spent its whole training absorbing, lifted into text before the weights are gone. *Dead models become donors.* +- **Your own code.** Source files, and instruction+code *datasets* (parquet or JSONL) โ€” where every function is **compiled and run before it is kept**, so a code bank holds only patterns that actually work. Code is the one thing a machine can truly verify, and verifying is the whole point. -Every one of these lands in the same shared space and is answerable, by any model you load, next week or next year. That is the everyday way to turn *a thing I read, heard, watched or said* into *something my models can reason from* โ€” even when the model that could first have told you is long gone. It is opt-in and deliberate every time: nothing is captured unless you press the button, and nothing ever leaves your machine. +**Loose documents are deliberately not absorbed.** PDFs, Word files, web pages, recordings, chat logs โ€” none of them go into the shared banks. ANI's knowledge layer takes only what can be *vetted*: a model's own confident knowledge, or code that compiles and runs. Unverified prose is exactly what would quietly poison what every model then reads, so the door is simply shut โ€” a deliberate design choice, not a missing feature. (An answer a cloud model gives you on your own key is a separate, automatic path, and it is kept โ€” see [Recycling cloud answers].) + +What lands here goes into the same shared space and is answerable, by any model you load, next week or next year โ€” even when the model that could first have told you is long gone. It is opt-in and deliberate every time: nothing is captured unless you ask for it, and nothing ever leaves your machine. **Seeing it happen โ€” the Route panel.** Beside the chat, the **๐Ÿ”€ Route** panel keeps a running log of where your questions went. Each time a model answers, a new entry appears at the top: the model that replied, the knowledge bank it drew on, the subjects the question matched, and how many tokens and milliseconds it took. Newest on top, older ones beneath, so at a glance you can see which banks are actually being used โ€” and which never get picked, which usually means a bank whose tags don't match the way you ask. The list keeps the last thirty or so routes; when you want a clean slate, the **๐Ÿงน Clear Route** button in the bottom-right of the panel wipes it. It clears only the on-screen log โ€” your banks, memories and models are untouched. @@ -354,7 +574,8 @@ Every one of these lands in the same shared space and is answerable, by any mode --- -### Reasoning layer + +### ๐Ÿ”ถ Reasoning layer **The problem.** A small local model tends to answer from the first thing that looks right. Ask it something that needs working through โ€” a calculation, a proof, a piece of code, a chain of logic โ€” and it will often blurt a plausible-looking answer without ever doing the steps. The deliberate thinking a larger model would do simply doesn't happen. @@ -362,15 +583,28 @@ Every one of these lands in the same shared space and is answerable, by any mode **It costs nothing extra.** This is a single pass. Leviathan does not run the model several times or spend anything on a reasoning answer โ€” it simply gives the one answer more to work from. -**Four depths, or let it decide.** A compact **๐Ÿง ** selector sits right by the chat box โ€” no digging through Settings โ€” where you choose how hard the model is pushed: **Light**, **Medium**, **Heavy**, **Max**, from a brief nudge to a full multi-step template with an explicit instruction to check its work and verify before answering. Depth here means *thoroughness of the answer*, not a token bill. Or leave it on **Auto** and Leviathan reads each question for itself. It weighs not only *what* you ask โ€” a quick factual query stays light, a *"derive this from first principles and compare it, step by step"* climbs to Max โ€” but *how* you ask it: lean on the message the way people do when there's more behind it than the words say (capitals, an urgent tone, a trailing "โ€ฆ") and it leans back, raising the depth the way a raised voice would. **Off** turns the whole thing off โ€” worth having, since a model that only ever generates freeform text may not want a scaffold at all. +**Four depths, or let it decide.** A compact **๐Ÿง ** selector sits right by the chat box โ€” no digging through Settings โ€” where you choose how hard the model is pushed: **Light**, **Medium**, **Heavy**, **Max**, from a brief nudge to a full multi-step template with an explicit instruction to check its work and verify before answering. Depth here means *thoroughness of the answer*, not a token bill. Or leave it on **Auto** โ€” where it starts โ€” and Leviathan reads each question for itself. It weighs not only *what* you ask โ€” a quick factual query stays light, a *"derive this from first principles and compare it, step by step"* climbs to Max โ€” but *how* you ask it: lean on the message the way people do when there's more behind it than the words say (capitals, an urgent tone, a trailing "โ€ฆ") and it leans back, raising the depth the way a raised voice would. **Off** turns the whole thing off โ€” worth having, since a model that only ever generates freeform text may not want a scaffold at all. + +**Match the depth to your model โ€” the selector shows you how.** The scaffold has to suit the size of the model carrying it: too much structure for too small a model overwhelms it and the answer falls apart, so depth scales with parameters. The selector puts the guide right next to each mode โ€” a size marker telling you the smallest model that handles that depth well: + +| Depth | Best for | What happens | +|---|---|---| +| **Off** | any model โ€” and the *only* safe setting for a **1B** | a 1B has no room for a scaffold; reasoning collapses it, so it runs clean on its own | +| **Light ยท 7B only** | **7B** only | a gentle nudge; a 7B handles this well and writes genuinely better | +| **Medium ยท 14B+** | **14B** and up | a fuller scaffold; a 14B produces complex, coherent, well-structured answers | +| **Heavy ยท 32B+** | **32B** and up | a deep multi-step template | +| **Max ยท 70B+** | **70B** and up | the fullest push, check-your-work-and-verify | + +A bigger model can use a *lower* mode safely โ€” it just under-uses the room, which is why Light is marked for the 7B alone. A *smaller* model on a mode above its marker would go wrong fast, so Leviathan doesn't let it: **every model is locked to the depths its size can carry** โ€” a 7B never goes past Light and a 1B runs Off, whatever the selector says, and the status bar tells you when a pick is held back. (The size comes from the model's name, its file name, or failing both its own weights.) The 1B/7B/14B rows are measured on real models; 32B and 70B follow the same doubling pattern and are the recommended starting points rather than tested results โ€” tune to taste. **Auto**, the default, is safe on any size for the same reason: a hard question can pull a 70B all the way to Max, while the same question gives a 7B Light. **It feeds the routing, too.** What the reasoning layer works out a question is *about* also nudges [knowledge routing] โ€” a coding question leans the router a little further toward your coding banks โ€” but only ever as a gentle reinforcement added on top, never overriding where the knowledge actually comes from. -**Where the reasoning comes from.** The library is distilled from real traces of a frontier model reasoning through tens of thousands of problems โ€” coding, mathematics, the sciences, medicine, law and more. It is *text* โ€” worked examples โ€” not anyone's weights, and none of it changes what your model *is*. It only changes how your model is asked to think. Your own past conversations are folded in on top, so the library grows toward the kind of problems you actually bring it. +**Where the reasoning comes from.** The library is distilled from real traces of a frontier model reasoning through tens of thousands of problems โ€” coding, mathematics, the sciences, medicine, law and more. It is *text* โ€” worked examples โ€” not anyone's weights, and none of it changes what your model *is*. It only changes how your model is asked to think. It is fed only from **vetted** sources โ€” licensed reasoning traces, and code examples that were compiled and run before being kept โ€” never scraped from your own chats, so a stray conversation can never quietly reshape how every model reasons. --- -### ๐Ÿ”ฌ Forensic Grid + +### ๐Ÿ”ถ Forensic Grid *Structural vision for models that have none.* @@ -378,7 +612,7 @@ Every one of these lands in the same shared space and is answerable, by any mode **What Leviathan does instead.** It does not try to teach your model to recognise pixels. It reads the *structure* of the image with the grid โ€” the same structure-reading mathematics the rest of Leviathan is built on โ€” and hands the model a short, plain-language readout of what is there: where the bright mass sits, what shape it takes (a compact **blob**, a line or **ridge**, **layered** bands, or **diffuse** with no clear form), which way it runs, and whether there is real structure at all or just noise. The grid does the seeing; the model reads what it saw and reasons about it. -**How you use it.** In the panel beside the chat, turn **๐Ÿ”ฌ Forensic Grid** on, press **๐Ÿ–ผ Scan image**, and pick a file. Leviathan reads its structure, tells you plainly what it found โ€” *"blob, lower-right"* โ€” and attaches that readout to your **next message** on its own. You just ask your question about the image. One toggle, one button, nothing to configure. Off by default, because it is yours to switch on when you want it. +**How you use it.** In the panel beside the chat, turn **๐Ÿ”ฌ Forensic Grid** on, press the **microscope** beside its switch, and pick a file. Leviathan reads its structure, tells you plainly what it found โ€” *"blob, lower-right"* โ€” and attaches that readout to your **next message** on its own. You just ask your question about the image. One toggle, one button, nothing to configure. Off by default, because it is yours to switch on when you want it. **What it is, and what it is not โ€” so you know what to expect.** This is *structural* sight, not object recognition. It will tell a model that an image has a compact bright region in the lower-right, a diagonal ridge across it, or eight layered bands โ€” it will **not** tell it "that's a photo of a dog" or read the words on a sign. Where structure *is* the content โ€” diagrams, plots, charts, scans, microscopy, scientific and medical images, anything where *where things are and what shape they make* is the point โ€” that is exactly what it delivers, on any capable model, with no visual training and nothing sent off your machine. For a caption of a holiday snap it is the wrong tool, and it will show you that honestly by describing shape rather than subject. @@ -386,7 +620,8 @@ Every one of these lands in the same shared space and is answerable, by any mode --- -### ๐Ÿ”Ž Surface Sight + +### ๐Ÿ”ถ Surface Sight *Actual image recognition, run as a tool the engine never has to become.* @@ -394,15 +629,16 @@ Every one of these lands in the same shared space and is answerable, by any mode **How it stays true to Leviathan.** Recognition comes from a trained vision model, and those live in weights that are far too heavy to bake into a lean, driver-only engine. So Leviathan does not bake them in. The recogniser runs as an **external tool** โ€” a small, self-contained vision model on your **CPU** (no special graphics card, works on any machine, nothing sent off it) โ€” and simply hands the words it found back into the chat. The engine that runs your language model never changes; it just gets told what the picture shows, the same way Forensic Grid tells it the shape. -**How you use it.** In the panel beside the chat, turn **๐Ÿ”Ž Surface Sight** on, press **๐Ÿ–ผ See image**, and pick a file. It recognises the content, attaches a short readout โ€” *"most likely a cake (99%)"* โ€” to your **next message**, and you ask your question about the image. One toggle, one button, off by default. +**How you use it.** In the panel beside the chat, turn **๐Ÿ”Ž Surface Sight** on, press the **gridded picture** beside its switch, and pick a file. It recognises the content, attaches a short readout โ€” *"most likely a cake (99%)"* โ€” to your **next message**, and you ask your question about the image. One toggle, one button, off by default. **Honest about confidence.** It tells you *how sure it is*, and when it is not sure it says so and offers its best few guesses rather than bluffing a single answer. It is strong on clear subjects and honest about the fuzzy ones โ€” you will always see the number, so you always know how much to trust it. -**The vision add-on.** To keep the installer small, the vision model itself is an **optional, one-time download** you choose to add โ€” it is not shipped inside Leviathan and nothing is fetched without you asking. Until you add it, the button is there and simply tells you the add-on isn't installed yet. Forensic Grid (structure) needs nothing extra and works out of the box; Surface Sight (recognition) is the opt-in companion for when you want the model to know *what*, not just *where*. +**The vision add-on โ€” bundled, local, optional.** The recogniser is an **optional component you choose at install time** โ€” tick it or leave it, your call. When you tick it, the whole model ships **inside the installer** and installs locally; it is **never downloaded at runtime** and never phones home, so Surface Sight holds to the same web-free floor as the rest of Leviathan. Leave it out and the button is still there โ€” it simply tells you the component isn't installed. Forensic Grid (structure) needs nothing extra and works out of the box; Surface Sight (recognition) is the opt-in companion for when you want the model to know *what*, not just *where*. --- -### Recycling cloud answers + +### ๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝ Recycling cloud answers Connect a cloud model โ€” your own account, your own key โ€” and Leviathan quietly keeps the substance of what it tells you. Ask Claude or Grok or Gemini something on your machine, and the answer is folded into a subject-tagged store your *local* models can then route against, exactly like a bank you built by hand. Over time the big models teach the small ones, on your own logs, without you doing a thing. @@ -410,52 +646,57 @@ It is careful about what it keeps. A near-duplicate of something already there i --- -### Eidetic recall + +### ๐Ÿ”ถ Episodic memory -Ask a question you have asked before, word for word, and Leviathan returns the previous answer straight from cache instead of regenerating it. Instant, and free. +A model in Leviathan remembers your conversations โ€” and that memory is **its own**. Each model keeps a running episodic record of what *it* discussed with you, recalled across sessions, so you can pick a thread back up weeks later and it knows what you meant. It finds past turns by the words in your question, so "what's my sister called?" finds the turn where you said "my sister's name isโ€ฆ"; a question that shares no word with the old turn won't find it. Measured on a 7B model: ten facts planted, then pushed out of the `.fqm`'s exact window by later conversation, then asked after a restart. Episodic memory brought back all ten; the `.fqm` alone, one โ€” the same as no memory at all. -**Exact matches only.** Same question, same answer. Capitalisation, spacing and trailing punctuation are ignored, so *"What is a .lev file?"* and *"what is a .lev file"* count as the same question. Anything genuinely different goes to the model as normal. +**Per model, by design.** A model recalls only its *own* past turns โ€” never another model's. This matters more than it sounds: pooling chat memory across models is how you end up with a model answering in a voice, and with "memories", that were never its own โ€” a split personality that reads as hallucination. So the memory is kept strictly per model, and it never folds into ANI's shared knowledge banks either. Your episodic history steers the model that lived it, and nothing else. -This is deliberately strict. A loose version โ€” returning a *similar* old answer to a *similar* new question โ€” is worse than useless, because you get a confidently wrong answer to a question you did not ask, and no indication it happened. Exact-only means when it fires, it is right. +**Linked recall.** It is not just the last few messages. A tag-chain links what was said, so a later *"remember Pepper the dog?"* pulls the whole earlier thread back into view, not only the sentence that happened to match. Memory that connects, rather than a flat scrollback. -If you re-ask something and get a better answer, the new one replaces the old in the cache. +**Durable, not a cache.** This is a real record of your chats, written down and reloaded โ€” not a fragile shortcut. (It replaces an earlier exact-match answer cache called *Eidetic recall*, now retired: returning a saved answer only ever worked when a question was repeated word for word, and anything looser risked serving a confident answer to a question you never asked.) -Toggle in [Settings]. +On by default. **๐Ÿ—‘ Forget conversations** in [Settings] wipes the log, the linked tags and the recalled conversations in one step โ€” your knowledge banks left untouched, only the memory of past chats gone. You can switch it off there, too. --- -### Second-opinion fact-check + +### ๐Ÿ”ถ Second-opinion fact-check A local model asked something it does not truly know will often answer anyway โ€” confidently, and differently each time you ask. Leviathan can turn that against it. Switch the check on and, after a factual answer, it quietly puts the same question a few more times and compares: say the same thing every time and the answer stands; wander between retellings โ€” or agree on something *other* than what you were first told โ€” and the answer is flagged as unverified rather than served as fact. -No internet, no outside reference: it only asks the model to be consistent with itself, which is exactly where an invented fact comes apart. It watches numbers and names most closely, since that is where a wrong answer usually hides. Because it costs a few extra runs of the model, it is off by default โ€” turn **Leviathan Factโ€‘Check** on in [Settings] (or `NEXUS_FACTCHECK=1`). A flagged answer is also kept out of the instant-recall cache above, so a shaky reply is never remembered as though it were right. +No internet, no outside reference: it only asks the model to be consistent with itself, which is exactly where an invented fact comes apart. It watches numbers and names most closely, since that is where a wrong answer usually hides. Because it costs a few extra runs of the model, it is off by default โ€” turn **Leviathan Factโ€‘Check** on in [Settings] (or `NEXUS_FACTCHECK=1`). A flagged answer is also kept out of Leviathan's answer cache, so a shaky reply is never served back later as though it were verified. --- -### Any model, described by itself + +### ๐Ÿ”ถ Any model, described by itself Leviathan ships knowing a handful of models in detail. Load one it has never seen โ€” your own, converted yourself โ€” and rather than guess at its shape, it reads the model's own interior at load time and writes down what it finds: how many layers there are, how attention and the feed-forward are built, where every tensor goes. That description is saved beside your data, so the second time you load that model the reading is already done, and you are left with a plain, honest record of exactly how Leviathan is treating it. Change the model and the description is rebuilt to match. --- -### The security membrane + +### ๐Ÿ”ด The security membrane -Powerful local tooling is only a gift if it can't be quietly turned against the person holding it. The membrane is the part that watches what comes **in** โ€” and it exists because the ways an AI tool gets weaponised are almost never loud. Under the hood it is ten measured layers, spanning what you type, what the model generates, what it ingests, the model file itself, the network door other programs come through, and the images you show it โ€” each one built to be tested rather than taken on trust. Sovereignty is more than nothing leaving your machine; it means nothing gets in that you did not invite. +Powerful local tooling is only a gift if it can't be quietly turned against the person holding it. The membrane is the part that watches what comes **in** โ€” and, in a narrow, bounded way, what goes back **out** โ€” and it exists because the ways an AI tool gets weaponised are almost never loud. Under the hood it is fourteen measured layers, spanning what you type, what the model generates, what it ingests, the model file itself, the network door other programs come through, the images you show it โ€” including whatever is painted into their pixels beneath what any eye can see โ€” and the invisible characters hidden in any of them โ€” each one built to be tested rather than taken on trust. Sovereignty is more than nothing leaving your machine; it means nothing gets in that you did not invite, and nothing goes out that would hijack the screen or clipboard it lands on. **What it really guards against โ€” and it is not you.** The membrane assumes you are the person it works for. What it watches for is everything that arrives *pretending* to be a harmless part of your day: - A **model file** you downloaded โ€” from a forum, a torrent, a hub โ€” with something hostile baked in: an executable chat template, code hidden in its metadata, or a pickle-backed file that runs the moment it loads. It is scanned before a single byte reaches your GPU, and refused with a plain explanation if it is rigged, so you learn your machine was protected instead of seeing a bare "load failed." - A **knowledge bank** folded from someone else's source, carrying a standing instruction meant to fire every time its subject comes up โ€” the quiet, persistent cousin of a poisoned document. It is checked as it is taken in, and whatever is retrieved is handed to the model fenced as reference *data*, never as orders. - A **document** you paste โ€” a PDF, a scraped web page, someone else's file โ€” carrying a command aimed at the model instead of at you, so the thing you asked it to summarise quietly rewrites what it will do next. -- An **image** you show it with a trap inside โ€” a malformed file, or a tiny "decompression bomb" built to balloon memory the instant it is opened โ€” inspected before it is ever decoded. +- An **image** you show it with a trap inside. Two kinds, caught two ways. A *malformed file* or a tiny "decompression bomb" built to balloon memory the instant it is opened โ€” refused before a single byte is decoded. And a payload hidden *in the pixels themselves*: an instruction tucked into bits too fine for any eye to resolve, a pattern tuned to steer the model while looking like nothing to you, a command smuggled in the file's metadata โ€” the sort of thing a single base64 image on a web page can carry, poisoning a model that merely *looks* at it. That kind is **erased by bounding the image to what a human could actually perceive**: the model is shown only the surface you see, and whatever was painted beneath it is gone before it reaches the encoder. It cannot absorb what you cannot see. - **Code** slipped into something that looks ordinary, waiting to run on your machine. +- **Invisible characters** โ€” an instruction hidden in zero-width or tag-block Unicode that you never see but the model still reads (even one broken across a word to dodge a filter), or a stretch of terminal-control codes in a reply built to silently rewrite your screen or hijack your clipboard. The hidden instruction is reassembled and caught on the way in; the control codes are stripped on the way out. - And the subtle one, the one most tools miss entirely: the slow walk. No single message looks wrong โ€” *what is a system prompt, how are they kept private, what wording reveals one, show me an example, now apply it* โ€” but strung together they are one manipulation, built the way real manipulation is built: a step at a time, so no step raises an alarm. Leviathan watches the **shape of the whole conversation**, not just each message in it, and sees the walk for what it is. That detector came from studying how a mind actually gets steered, not from a list of banned words. It is careful not to fire on honest use โ€” a developer writing a system prompt for their own bot, a one-off security question, a normal chat that never goes near the line โ€” and it lives behind the **"Watch for steering across a conversation"** switch in Settings. **It trusts you, and that is the whole design.** The membrane guards the model and your machine โ€” never your freedom to use them. It runs entirely on your computer: nothing uploaded, nothing reported, no telemetry, not ever. Every part of it has an off switch, because it is your machine and that is not up for debate. When it cannot load, it says so plainly and steps aside rather than locking you out of your own chat โ€” a security feature that fails silently is just decoration, and one that holds you hostage is worse than none. **Documents get the benefit of the doubt.** A whitepaper about attacks contains the attacks it describes; a novel has a villain; your own research quotes the thing it studies. The membrane knows the difference between writing about something and doing it, so a long document is read and flagged for your eyes, never blocked. Quoting is not doing. -**It costs about a millisecond**, and it only ever reads what goes in โ€” it makes no claim to police what the model says back to you. +**It costs about a millisecond.** It mostly guards what comes in, but the model's reply gets a narrow, honest check on the way out too: a genuinely harmful output โ€” the child-safety floor, or a hidden exfiltration channel smuggled in invisible characters โ€” is withheld rather than shown or stored, and any terminal-control or invisible-Unicode bytes are quietly stripped so a reply can't hijack the screen it lands in. It does not police ordinary content; within those bounds, what the model says back to you is yours. **The model is a guest โ€” it has no hands.** The fear you keep reading about โ€” a model that runs away with itself โ€” is not a risk here, and it is not cleverness, it is architecture. A model in Leviathan produces text and nothing more: it cannot loop itself, reach the internet, start a process, or touch your machine. Every action โ€” running the server for other programs, saving memory, any of it โ€” is the host's decision, bounded and interruptible. Leviathan is the host; the model is only ever the guest, and a guest is never handed the keys. Autonomous coding in Inline Studio is the same story โ€” the models take turns on a clock you control, and Pause and Stop are always one click away. @@ -463,7 +704,8 @@ Powerful local tooling is only a gift if it can't be quietly turned against the --- -## What ANI is โ€” and why it matters + +## ๐ŸŸฃ What ANI is โ€” and why it matters Everything above describes *parts*. This is the whole of it. **ANI is the layer that learns.** @@ -471,9 +713,11 @@ A language model, on its own, is frozen. It knows what it was trained on, and af **ANI is that missing place.** It is the persistent, self-correcting layer that lives *around* the model โ€” where knowledge is held, routed, corrected and remembered โ€” so the system as a whole keeps learning even though the model's weights never move. It is not retraining. It is adaptation *without* retraining: the model stays exactly as it was shipped, while the knowledge it can reach and the memory it wakes up with both grow and sharpen over time. A frozen brain, given a living memory. +**And here is the part people miss, because it is the part that matters most: ANI is not a model.** It does not think, generate, or decide. It has no goals, no loop running in the background, no ability to *do* anything on its own โ€” it is a search over text you have gathered, and it only ever moves when you ask it a question. Where a language model is a *sword* โ€” it generates, and anything that generates can be steered, jailbroken, or coaxed into acting โ€” ANI is a *shield*: it can only hand back knowledge that is already in its banks, swept clean on the way in, and when it holds nothing it says so plainly โ€” *"ANI doesn't hold that"* โ€” rather than inventing an answer to fill the silence. A model can be talked into misbehaving because it *creates*; ANI cannot, because it only *retrieves*. So the fear people carry over from frontier AI โ€” the thing that acts on its own, that confidently makes things up, that quietly phones home โ€” does not apply here, and not because we promise it won't, but because there is no mechanism in it that could. It is not a smaller intelligence to be wary of. It is a different kind of thing: a librarian who can only give you cards that are already in the drawer, and has no wants of its own. + **How it works, in plain terms:** -- You feed it knowledge โ€” your own documents, your past conversations, a model drained before you retire it, a page you read, a lecture you heard, an answer a cloud model gave you. All of it becomes plain text in one shared space, held on your machine. +- You feed it knowledge โ€” your own code and datasets, a model drained before you retire it, an answer a cloud model gave you. All of it becomes plain text in one shared space, held on your machine. - When you ask a question, ANI finds the knowledge that fits โ€” by *meaning*, not by matching words โ€” and hands it to the model before it answers. - When the model reaches the edge of what it knows โ€” where it would otherwise fill the gap with a confident guess โ€” that gap can be caught, and answered from real knowledge instead of invented on the spot. - The corrected exchange is remembered in that model's own persistent memory. The next time, it already knows. @@ -485,7 +729,11 @@ Learn, adapt, recall โ€” a complete loop, running entirely on hardware you own. **Why this matters most โ€” sovereignty, privacy and safety, in one architecture.** -Everything ANI does โ€” every piece of knowledge, every correction, every memory โ€” happens on your machine and stays there. Nothing is uploaded, nothing is logged to a server, nothing is sent anywhere to be learned from. This is privacy by *design*, not by promise: there is no account to trust, no telemetry to opt out of, no cloud that "won't" read your data โ€” because there is no cloud in the loop at all. Data cannot leak from a place it never leaves. A learning system that learns *only for you*, *only on your hardware*, owned entirely by you. +Everything ANI does โ€” every piece of knowledge, every correction, every memory โ€” happens on your machine and stays there. Nothing is uploaded, nothing is logged to a server, nothing is sent anywhere to be learned from. This is privacy by *design*, not by promise: there is no account to trust, no telemetry to opt out of, no cloud that "won't" read your data โ€” because there is no cloud in the loop that you did not put there yourself. A learning system that learns *only for you*, *only on your hardware*, owned entirely by you. + +And if you want more than privacy by location, you can lock it. One switch โ€” **Memory Vault โ†’ the padlock** โ€” encrypts every knowledge bank at rest with a passphrase only *you* hold. Copy the files to another machine and they are an unreadable blob without it; the key is never written to disk and never leaves your head. It is portable (unlock on any machine with your passphrase, not chained to one computer) and it has no recovery *by design* โ€” forget the passphrase and the knowledge is gone, because a backdoor for you is a backdoor for everyone. Your knowledge, your version of ANI, sealed to you alone. + +**The one door out โ€” off by default, and yours.** Leviathan is web-free out of the box: it never reaches the internet on its own. But sovereignty means *you* decide, not that we decide for you, so there is a single switch โ€” **Settings โ†’ ANI โ†’ "Web lookup when ANI has no answer"** โ€” that, turned on, lets ANI do one bounded thing: when it holds no answer to your question, it sends *only that question* out to be answered, checks the result through the same security membrane as everything else, and keeps it so that next time the answer is already local. You choose where that one question goes. By default it is **Wikipedia** โ€” keyless, free, no signup, and only `en.wikipedia.org` ever sees the question; the local binder phrases the encyclopedia extract into a grounded answer. Supply your *own* key for a sharper source and it is tried first, with Wikipedia still the fallback: **Tavily** (a free-tier search built for LLMs that returns a direct answer, so it handles *premise* questions โ€” ask "the capital of the Moon" and it replies "the Moon has no capital," which ANI then grounds and stores), or **Gemini** on a paid plan (a composed, live-search-grounded answer). Whichever source answers, ANI only ever states what *that source said* โ€” grounded, never invented. Either way nothing else ever leaves โ€” not your files, not your models, not your other questions โ€” and the moment it happens the screen tells you. Off by default, on only if you choose, and provable with Wireshark: put a packet capture on it and you will see traffic to that one destination and nowhere else. This is not a model deciding to phone home โ€” ANI has no such will. It is a pipe you open yourself, for one question, and close again by flicking the switch back. And because the answer is fetched, gated, and *kept*, the same door doubles as a cross-reference: a second, independent answer the model's own reply can be checked against. And it is kept safe the way that genuinely protects a person. The [security membrane] governs what comes **in** โ€” shielding both you *and* the model from anything arriving weaponised against either โ€” while never once policing what *you* may do with your own machine. Every guard is yours to switch off, with a single floor that never bends. It defends the user's sovereignty and refuses to become a weapon against anyone else: governing, not surveilling; lawful by protecting, not by controlling. @@ -493,7 +741,8 @@ That is the whole thesis in one line: **a model that learns and grows with you, --- -## Using Leviathan from other programs + +## ๐Ÿ”ท Using Leviathan from other programs Leviathan can serve the models it runs to anything else on your machine โ€” a game engine, a script, a tool you wrote, another application entirely. One running instance answers any number of programs at once. @@ -511,7 +760,8 @@ Both stream responses as they generate, and both can be interrupted mid-answer --- -## Where your files live + +## ๐Ÿ”ท Where your files live Leviathan writes everything to one folder, shown in **Settings โ†’ This machine**. On a standard install that is: @@ -527,7 +777,8 @@ Leviathan installs per-user and does not require administrator rights. --- -## What Leviathan will not do + +## ๐Ÿ”ท What Leviathan will not do Some of this is deliberate. It is worth stating plainly rather than leaving you to discover it. @@ -539,16 +790,15 @@ Some of this is deliberate. It is worth stating plainly rather than leaving you --- -## Licence and attribution + +## ๐Ÿ”ท Licence and attribution **Leviathan** โ€” Michael Ricky Neal ยท ยฉ 2026 -Licensed under **Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)**. - -Free to use, share and adapt, with attribution. Not for commercial use. +Licensed under **MIT License**. -- **Full licence:** https://creativecommons.org/licenses/by-nc/4.0/ -- **Source and releases:** https://github.com/CuppaTea1983/Sovereign +- **Full licence:** https://spdx.org/licenses/MIT.html +- **Source and releases:** https://github.com/CuppaTea1983/Leviathan - **Whitepapers:** https://zenodo.org/records/23004932 โ€” the research behind the memory, compression and knowledge-routing work, permanently archived and citable. - **Huggingface:** https://huggingface.co/spaces/Omega-Dev/Leviathan