Spaces:
Running
Running
Update
Browse filesFiles changed (2)
- index.html+9-1
- leviathan-readme.md+81-17
190 unmodified lines191192193194195196197198199200201202203204197205206207208190 unmodified lines }); }
// The screenshots live in the GitHub repo: a Space won't take binary files. The manual is a byte // copy of the repo's README, so its relative "screenshots/..." paths are pointed there as it loads. var SHOTS = "https://raw.githubusercontent.com/CuppaTea1983/Leviathan/main/screenshots/"; function githubShots(md){ return md.replace(/(\b(?:src|href)\s*=\s*["'])screenshots\//g, "$1" + SHOTS) .replace(/(\]\()screenshots\//g, "$1" + SHOTS); }
fetch("leviathan-readme.md", {cache:"no-cache"}) .then(function(r){ if(!r.ok) throw new Error(r.status); return r.text(); }) .then(function(md){ md = linkifyContents(md); md = githubShots(linkifyContents(md)); if (window.marked && marked.setOptions) marked.setOptions({gfm:true, breaks:false, headerIds:false, mangle:false}); var html = window.marked ? (marked.parse ? marked.parse(md) : marked(md)) : md; var el = document.getElementById("content");1123456785 unmodified lines14151617181920212223242526272829304 unmodified lines35363723383940414220 unmodified lines636465666768697039 unmodified lines1101111129511311411511625 unmodified lines14214314414514614714814952 unmodified lines20220320420520620720820921021121221321421521690 unmodified lines30730830931031131231331431515 unmodified lines3313323333343353363373383393403413423433443453463473483493503513523533 unmodified lines3573583593603613623633643653663673683273693703713723733743753343763773783793363803813823832 unmodified lines3863873883893903913453923933943954 unmodified lines40040140235640340440540640740840941041141241341441541641741841942042142242342442542642742824 unmodified lines45345445539545645745845939746046139946246346446523 unmodified lines48949049149249349449553 unmodified lines54955055148855255355455555655755849555956056156256350056456556656710 unmodified lines57857958051758158258358410 unmodified lines59559659753459859960060113 unmodified lines615616617554618619620621# Leviathan# Soon to come.
<img src="https://archive.org/download/leviathan-logo-github/leviathan%20logo%20github.jpg" width="1200" />
<p align="center"><a href="#requirements"><img src="screenshots/badge-windows.svg" height="28" alt="Runs on Windows" /></a> <a href="#requirements"><img src="screenshots/badge-nvidia.svg" height="28" alt="Needs an NVIDIA graphics card: GTX 16 / RTX 20 or newer" /></a></p>
**Local AI models, running directly on your graphics card. No server, no cloud, no account, no subscription, no telemetry.**
5 unmodified lines
> **Leviathan is the host. The model is the guest.**
<a name="see-it-running"></a>### πΉ 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.
<p align="center"><img src="screenshots/chat.gif" width="900" alt="Chatting with Qwen 2.5 Coder 7B in Leviathan, in real time" /></p><p align="center"><sub>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.</sub></p>
<p align="center"><img src="screenshots/pipeline.gif" width="900" alt="One 3D part through Inline Studio, the Graph, the Planner and the Fabricator" /></p><p align="center"><sub>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.</sub></p>
---
## Contents4 unmodified lines- π· [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)- πΆ [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)20 unmodified lines<a name="first-run"></a>## π· First run
<p align="center"><img src="screenshots/first-run.png" width="900" alt="Leviathan's welcome card on first run, with the graphics-card check" /></p>
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.
The three steps are:39 unmodified lines
**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.
**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 down through a *fractal cascade* of progressively compacted levels, so the file **plateaus** in size while its effective reach runs into the hundreds of millions of tokens even at a modest window β recent memory stays sharp, distant memory ages gracefully instead of being thrown away. 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.**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.
**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.)
25 unmodified lines
Where you actually talk to the model.
<p align="center"><img src="screenshots/chat.png" width="900" alt="A two-turn chat with Qwen 2.5 Coder 7B, with the Route panel on the right" /></p>
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].52 unmodified lines<a name="studio"></a>### π· Studio
<p align="center"><img src="screenshots/studio-convert.png" width="900" alt="Studio's Convert to .lev tool listing a GGUF ready to convert" /></p>
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**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.90 unmodified lines
*Autonomous coding Β· one model, or a team taking turns on a shared project.*
<p align="center"><img src="screenshots/inline-studio.png" width="900" alt="Inline Studio after Qwen 2.5 Coder 7B wrote roman.py from a one-line task" /></p><p align="center"><sub>One line of task at the top; the model wrote <code>roman.py</code>, the execute-gate ran it, and the project converged.</sub></p>
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.15 unmodified lines
*Build with nodes β and let a model build with you.*
<p align="center"><img src="screenshots/graph.png" width="900" alt="The model's phone-stand script as shape nodes in the Graph, with the 3D part beside it" /></p><p align="center"><sub>The model's phone-stand script, turned into 9 shape nodes and 9 parameters β checked to make exactly the same part.</sub></p>
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.
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.
<p align="center"><img src="screenshots/graph_build.gif" width="900" alt="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" /></p><p align="center"><sub>Real time: βΆ Build with <a href="https://huggingface.co/campedersen/cad0">cad0</a> (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.</sub></p>
<p align="center"><img src="screenshots/graph_build.png" width="900" alt="The finished mounting plate beside its whole graph, with every line of cad0's answer read out under the canvas" /></p><p align="center"><sub>The result: 50 Γ 30 Γ 4.5 mm with four corner holes, watertight β the whole graph on the left, the part on the right.</sub></p>
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.
---3 unmodified lines
*A real 3D modelling engine, built from scratch β parametric, watertight, and in true-to-life scale.*
<p align="center"><img src="screenshots/planner.gif" width="900" alt="Asking the model in the Planner for a screw hole through the base; the edit lands as a history step" /></p><p align="center"><sub>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.</sub></p>
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.
**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 a base mesh; 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.- **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 increasingly, by instruction.** Because a model already builds in the [Graph], it already reaches *here*: describe the thing you want, a model lays out the graph that defines it, and β’ **Send to Planner** turns that into a solid part you can push, pull and fabricate. That already closes the loop Leviathan is built around β **you type, a model designs it in the Graph, it becomes a watertight part in the Planner, and the [Fabricator] proves it printable and writes the 3MF/STL a printer takes.** The next step is direct model control of the Planner itself, with its own **Token budget** in [Settings] alongside Chat, Inline Studio and the Graph, so the whole arc runs from a single request: you say what you want, a model builds it β and then makes it real.**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. The plan is to keep widening what it imports and exports 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.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.
---
2 unmodified lines
*Prove it printable β then hand it to your slicer.*
<p align="center"><img src="screenshots/fabricator.png" width="900" alt="The Fabricator's checks passing for the phone stand on a Prusa MK4" /></p><p align="center"><sub>Watertight, fits the bed, no overhangs, walls thick enough, real contact with the plate β and a rough cost in filament.</sub></p>
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β¦** β so it checks the STL you just downloaded, too, without copying it anywhere.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:
4 unmodified lines- **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 3MF / STL** writes it the way it's turned.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.
<a name="blueprint"></a>#### πΉ 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.
---
<a name="settings"></a>### π· Settings
<p align="center"><img src="screenshots/settings.png" width="900" alt="Settings: the security membrane, episodic memory and fact-check switches" /></p>
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:24 unmodified lines
**πΉ 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].
**πΉ Token budget** β how much a model may write in **one reply**, set per surface: **Chat**, **Inline Studio** and the **Graph** β 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. (The Planner joins this list as its direct model-build path lands.)**πΉ 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.
**πΉ 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.
**πΉ 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 fractal `.fqm` cascade gives enormous effective recall at any window β 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.**πΉ 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.
**πΉ 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 fractal cascade folds the older ones down into its compact deep levels, so a long chat's `.fqm` plateaus instead of climbing forever.**πΉ 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.
**πΉ This machine** β what Leviathan found: your graphics card, and the exact folder your data is being written to.
23 unmodified lines- 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. 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.53 unmodified lines
**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+** | **7B** and up | a gentle nudge; a 7B handles this well and writes genuinely better || **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 always use a *lower* mode safely β it just under-uses the room. A *smaller* model on a mode above its marker is where it goes wrong, fast. 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** sidesteps the choice by reading the question, but on a very small model keep it modest β a hard question could pull the depth higher than a 1B can carry.)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.
10 unmodified lines
**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.
10 unmodified lines
**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.
13 unmodified lines<a name="episodic-memory"></a>### πΆ Episodic memory
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.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.
**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.
index.html+9-1
leviathan-readme.md+81-17