Spaces:
Running
Running
Update
Browse filessoon to come
12125345649 unmodified lines5657585960616263103 unmodified lines1671681691701701711721731741751761771781791801816 unmodified lines18818919018919019119219319219419519664 unmodified lines261262263263264265266267106 unmodified lines374375376376377378379380381382383384385386387388389390391392393394395396397398399371 unmodified lines771772773774775776777107 unmodified lines885886887888889# 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><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> <a href="#requirements"><img src="screenshots/vulkan-logo.png" height="28" alt="Vulkan: AMD and Intel graphics cards, coming in the next release" /></a><br /><sub>Vulkan, for AMD and Intel graphics cards: coming in the next release</sub></p>
**Local AI models, running directly on your graphics card. No server, no cloud, no account, no subscription, no telemetry.**
49 unmodified lines
**No NVIDIA card?** Leviathan can still act as a front-end for a model server you run elsewhere β see [Models]. You lose the GPU-native features, but the chat, memory and knowledge systems still work.
**AMD and Intel graphics cards: coming in the next release.** Leviathan is gaining a second engine, built on Vulkan, so the same `.lev` models run on AMD and Intel cards. In testing it matches the NVIDIA engine token for token on all fifteen models compared, it runs on an AMD Radeon, and it can split one model across two graphics cards, so two cards together hold a model too big for either. Intel Arc cards are next to be tested. It is not in the 1.0.0 download yet.
---
<a name="first-run"></a>103 unmodified lines
**Connecting a model**
- **β‘ Leviathan** β a `.lev` file on your GPU. This is the main path and the one everything else is built around.- **β‘ Leviathan** β a `.lev` file on your GPU. This is the main path and the one everything else is built around. Pick the file, give the model a name and a **Temperature** (it starts at the model file's own default when the file carries one, otherwise 0.7).- **+ Ollama** β a model served by a local Ollama install. The **llama3 / mistral / phi3 / gemma2** quick buttons are one-click shortcuts for these.- **+ API Model** β any OpenAI-compatible endpoint, local or remote.- **π Grok** β xAI's hosted model. Paste your xAI API key and pick the model; the current price per million tokens is shown next to it so you are not choosing blind.
Ollama and API models exist so Leviathan is still useful without a supported graphics card, and so you can compare a local model against a hosted one in the same conversation. They do not get the GPU-native features.
**Every model wears its family's icon** β Llama, Qwen, DeepSeek, Mistral, Gemma, Grok, Claude, OpenAI β beside its name wherever it shows: the chat, Models, Inline Studio, the Graph and the Planner. A local model is known by its file and its architecture, so a fine-tune under a name of your own still shows the family it came from; a family with no icon shows none rather than a wrong one. The icons are plain image files in the **Leviathan icons** folder: drop in another with the family's name in its file name and it is used.
> **Hosted models are not local.** Anything you send to Grok or a remote API model goes to that provider, under their terms and their pricing. Leviathan's "nothing leaves your machine" applies to models running on your own GPU.
**The model list**6 unmodified lines**Double-click a model** to open its settings:
- **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.- **System Prompt** β the standing instructions the model follows in every reply. Leviathan fills in a warm default that tells the model who it is and whether it's talking with you alone or with other models too. Replace it with whatever you want the model to be, and your words are sent whole, exactly as you wrote them; clear the box to go back to the default.- **Temp** β how adventurous its wording is. Lower is steadier and more predictable, higher is looser and more varied. 0 always picks the likeliest word; 0.7 is the usual default; up to 2 for the wildest. A model file can carry its own default (set with Studio β **Sampling Defaults**), and Leviathan starts there.- **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. Where the local answer can't be trusted β a calculation, an instruction it skipped, a one-line reply, a question back instead of an answer β you get the feed model's answer instead, and that is the reply your local model's memory keeps. 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**
64 unmodified lines<p align="center"><img src="screenshots/studio-strip.png" width="900" alt="Strip Metadata listing the provenance keys a GGUF carries" /></p>
**πΉ 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.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. Leviathan takes the temperature as the starting value when you add the model (it's carried into a `.lev` when you convert), and you can change it any time in the model's settings. Four presets (Creative, Balanced, Coherent, Code-Focused), and you can save your own.
<p align="center"><img src="screenshots/studio-sampling.png" width="900" alt="Sampling Defaults with the Code-Focused preset applied, ready to bake into a GGUF" /></p>
106 unmodified lines
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.**Eighty-eight 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** / **Mind**, which put your own model, your knowledge banks, or a whole ring of your models 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.
**Every node has a βΌ on its bottom edge** β black, because it takes anything. Drag a wire onto it and Leviathan asks which of the node's settings the wire should drive: a Number on Next Token's *temperature*, a Text on an Expression's *formula*. The wire wins for as long as it's there; unwire it (right-click the βΌ) and the node is exactly as you left it. A dict sets every setting it names, and *code* runs Python on whatever the node makes. On a model graph (a model's weight folder dropped onto the canvas) it reaches the weights: a Block's **scale** sets how much of its change reaches the model's stream (1 = as it is, 0 = skip the block, 2 = double it), and **weights** runs Python on a copy of each weight a node reads (the folder's own files are never touched). Numbers feeding a βΌ are read again before every token, so a value you change while the model writes changes the very next word. Tested on TinyLlama: Block 5 at scale 0 gives exactly the model with Block 5 deleted, to the last bit. Python sent through a βΌ runs with your permissions, like a Code node, and βΆ Run lists it before anything runs.
**Ask ANI can run a ring of your models.** Give each loaded model a **Mind** node and wire them into Ask ANI's βΌ. She puts your question to every one, screens each answer with the security membrane, and checks what she can prove before she answers:- **Code:** when your question carries examples (`>>> f(2)` then `4`, or a line like `f(2) == 4`), she runs each model's code against them in a separate, isolated process, and an answer that passes wins, whoever wrote it. This only happens with security on, and she never runs code the membrane flags.- **A number:** checked by recomputing the model's own sums.- **Anything else:** goes to the answer the models agree on most, marked unverified.
Her report says who said what and what passed.
Tested on HumanEval's 164 coding problems, scored on its own hidden tests:- Qwen 2.5 Coder 7B alone gets 145. With Llama 3.2 3B and 1B beside it in the ring, ANI gets 148.- Where a question had examples to run, she found the right answer in 109 of the 110 problems any of the three solved.- When nothing can be proved, she follows the first mind you wired (**unproven: lead**, so put your strongest first). A crowd of weaker models agreeing outvotes a stronger one: the same ring going by agreement scored 142. Set **unproven** to **agree** for a ring of equals.
**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.
**You can't lose the graph.** However far you drag or scroll, part of it stays in view, and the scrollbars along the canvas's edges show where you are β drag one to an end to bring that side of the graph in. A node added from the palette lands in the middle of what you're looking at, on a free spot.
<p align="center"><img src="screenshots/graph-magnifier.gif" width="716" alt="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" /></p><p align="center"><sub>A parametric enclosure script as 47 nodes, zoomed out to 25 %: the middle button held, the lens glides across it at full size.</sub></p>
371 unmodified lines- 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.- **Another model's words, and a model's own memory.** In a chat with two or more models, or on a Knowledge Route, each model's message is screened before another model reads it or keeps it, so a model that was talked into writing an attack can't hand it along. And memory is a door too: every line a model reads back from its memory β the recent conversation, a stretch of the past you ask about, a thread it recalls β is screened as it comes back in, so a line kept before a guard existed, or while security was off, can't return as orders. A line stopped that way stays in the memory file exactly as written; the model sees a short note in its place.- 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.107 unmodified lines- **Huggingface:** https://huggingface.co/spaces/Omega-Dev/Leviathan
All three are linked from **Settings β About** inside the app.
<sub>Vulkan and the Vulkan logo are registered trademarks of the Khronos Group Inc.</sub>leviathan-readme.md+29-9