[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-113459":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":14,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":9,"rankLanguage":9,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":21,"topics":23,"createdAt":9,"pushedAt":34,"updatedAt":35,"readmeContent":36,"aiSummary":37,"trendingCount":15,"starSnapshotCount":15,"syncStatus":38,"lastSyncTime":39,"discoverSource":40},113459,"ghost-infer","affifuddin-hazam\u002Fghost-infer","affifuddin-hazam","Fast local LLM inference for the GPU you already have: one Rust binary, GGUF models, an OpenAI-compatible server and a chat page with a ghost.",null,"HTML",265,20,5,4,0,24,65,25,70.4,"Apache License 2.0",false,"main",[24,25,26,27,28,29,30,31,32,33],"cuda","desktop-app","gguf","llm","llm-inference","local-llm","mixture-of-experts","openai-compatible-api","rust","windows","2026-11-19 04:32:39","2026-11-23 18:03:08","\u003Cp align=\"center\">\n  \u003Cimg src=\"docs\u002Fghost.png\" width=\"132\" alt=\"The ghost-infer ghost\">\n\u003C\u002Fp>\n\n\u003Ch1 align=\"center\">ghost-infer\u003C\u002Fh1>\n\n\u003Cp align=\"center\">\n  \u003Cb>Fast local LLM inference for the GPU you already have.\u003C\u002Fb>\u003Cbr>\n  One small Rust program that runs GGUF models on an NVIDIA card, serves an OpenAI-compatible API,\u003Cbr>\n  and comes with a desktop app where the model works on your files.\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"#install\">\u003Cb>Install\u003C\u002Fb>\u003C\u002Fa> ·\n  \u003Ca href=\"#speed\">Speed\u003C\u002Fa> ·\n  \u003Ca href=\"#models-bigger-than-your-gpu\">The engine\u003C\u002Fa> ·\n  \u003Ca href=\"#the-desktop-app\">Desktop app\u003C\u002Fa> ·\n  \u003Ca href=\"#whats-new\">What's new\u003C\u002Fa> ·\n  \u003Ca href=\"docs\u002Fusage.md\">Server API\u003C\u002Fa> ·\n  \u003Ca href=\"docs\u002Fhow-it-works.md\">How it works\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fwww.paypal.com\u002Fncp\u002Fpayment\u002FWPSFYDSR9HVSY\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FSupport_ghost--infer-PayPal-00457C?logo=paypal&logoColor=white\" alt=\"Support ghost-infer with PayPal\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"design\u002Freadme\u002Fstats.svg\" width=\"860\" alt=\"On an RTX 2060 SUPER: 2 times llama.cpp's speed on a model bigger than the GPU; an 80B model on an 8 GB GPU; long prompts read 6.6 times faster; 4 times faster at a 64K context\">\n\u003C\u002Fp>\n\nMost inference engines are built for data centres: many users, big GPUs, batching. ghost-infer is built\nfor the other case: **one person, one consumer GPU, one model at a time**, and it is tuned for exactly that.\n\n## Speed\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"design\u002Freadme\u002Frace.svg\" width=\"860\" alt=\"A race to 256 tokens on Qwen3.6-35B-A3B, replayed from each engine's recorded token times: ghost-infer 82.5 tokens\u002Fs, done in 4.0 s; llama.cpp 39.5, 7.0 s; Ollama 34.7, 7.9 s\">\n\u003C\u002Fp>\n\nOn an 8 GB RTX 2060 SUPER with 24 GB of RAM, on the same GGUF files:\n\n| Generation speed | ghost-infer | llama.cpp | Ollama |\n|---|---|---|---|\n| Qwen3 8B, 5 GB: fits in the GPU | **75.3 tokens\u002Fs** | 64.7 | 65.8 |\n| Qwen3.6-35B-A3B, 16.8 GB: bigger than the GPU | **80.5 tokens\u002Fs** | 39.5 | 34.7 |\n| Qwen3-30B-A3B, 13.7 GB: bigger than the GPU | **68.7 tokens\u002Fs** | 29.5 | 26.9 |\n| Qwen3.5-35B-A3B Claude-4.6-Opus distill, 16.8 GB | **76.4 tokens\u002Fs** | not measured | not measured |\n| Qwen3-Coder-30B-A3B, 14.7 GB \\* | **32.7 \u002F 47.3** | not measured | not measured |\n| Qwen3-Coder-Next 80B, 22 GB: bigger than the RAM \\* | **11.8 \u002F 14.5** | 9.3 \u002F 12.4 | not measured |\n\n\u003Csub>ghost-infer 0.4.0, llama.cpp b11747 and Ollama 0.40.13, all measured 2026-11-14 in one run\n(`scripts\u002Fbench-all.ps1`). Qwen3 8B: GuideLLM, a ~264-token chat prompt and 128 tokens. The A3B rows: seven varied\nprompts (code, an explanation, a code review, a summary, a chat, a word problem, SQL) through each engine's API,\nthe median of two rounds, llama.cpp at its best `--n-cpu-moe` setting (24); i1-Q3_K_M files. Rows marked \\*:\nmeasured 2026-11-10 with 16 GB of RAM and ghost-infer 0.3.0, tokens\u002Fs writing code \u002F writing a long answer, the\nsecond (warm) of two runs, llama.cpp with its automatic GPU split. Method and more results in\n[Benchmarks](docs\u002Fbenchmarks.md).\u003C\u002Fsub>\n\n## Models bigger than your GPU\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"design\u002Freadme\u002Fexperts.svg\" width=\"860\" alt=\"How a mixture-of-experts model bigger than the GPU runs: the experts stay in RAM, the ones a reply keeps using move into a cache on the GPU, and the CPU runs the rest\">\n\u003C\u002Fp>\n\nA mixture-of-experts model uses only a few of its experts for each token. ghost-infer keeps attention on the GPU\nand the experts in RAM, caches on the GPU the ones a reply keeps reaching for, and runs the others on the CPU\nmeanwhile. Each layer runs as one CUDA graph and the GPU picks its own experts, so the cached ones never wait for\nthe CPU. So Qwen3.6-35B-A3B (16.8 GB) runs on an 8 GB card at 80 tokens\u002Fs, twice llama.cpp's speed, and an 80B\nmodel runs at all.\n\n## Long chats stay fast\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"design\u002Freadme\u002Flong.svg\" width=\"860\" alt=\"On Qwen3.6-35B-A3B, writing after a 64K-token context went from 12.3 to 49.1 tokens\u002Fs, and reading a 128K-token prompt from 28.6 minutes to 4.3\">\n\u003C\u002Fp>\n\nAttention runs on the tensor cores, both while the model writes and while it reads a prompt, so a long chat or a\nlong file pasted in does not slow it down: 49 tokens\u002Fs after 64K tokens of context, and a 128K-token prompt read\nin about 4 minutes instead of 28. `GHOST_INFER_NO_TC_DECODE=1` and `GHOST_INFER_NO_TC_ATT=1` turn the\ntensor-core kernels off.\n\n## Exact speculative decoding\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"design\u002Freadme\u002Fexact.svg\" width=\"860\" alt=\"Speculative decoding: guessed tokens are checked in one pass and only the ones the model agrees with are kept, so the text is the same as plain decoding. A small draft model: 1.4 times faster; lookup: 3.2 times faster on agent work that copies text\">\n\u003C\u002Fp>\n\nghost-infer guesses a few tokens ahead and checks them all in one pass, keeping only the ones the model would have\nwritten itself, so the reply is the same text as plain greedy decoding, only sooner. The guesses come from text\nalready in the chat (lookup, on by default for models that fit in the GPU: 3.2× on agent work that copies text,\nsuch as editing a file) or from a small draft model (`--draft`). Results are also checked against exact maths and llama.cpp. [More](docs\u002Fhow-it-works.md)\n\n## A drop-in server\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"design\u002Freadme\u002Fserver.svg\" width=\"860\" alt=\"Editor plugins, chat apps, agent harnesses and scripts that speak the OpenAI API point at ghost-infer's \u002Fv1 address and get streamed replies and tool calls\">\n\u003C\u002Fp>\n\nAn OpenAI-compatible `\u002Fv1\u002Fchat\u002Fcompletions` with streaming and tool calls, so editor plugins, chat apps and agent\nharnesses work unchanged: point them at `http:\u002F\u002F127.0.0.1:8080\u002Fv1`. [More](docs\u002Fusage.md)\n\n## One small program\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"design\u002Freadme\u002Fsmall.svg\" width=\"860\" alt=\"Instead of Python, pip packages, a CUDA toolkit and Docker: one 3.8 MB file with two dependencies that starts a server\">\n\u003C\u002Fp>\n\nOne 3.8 MB file with two Rust dependencies: no Python, no Docker. It compiles its GPU code for your card on first\nstart.\n\n## Install\n\n**[Download GhostSetup for Windows](https:\u002F\u002Fgithub.com\u002Faffifuddin-hazam\u002Fghost-infer\u002Freleases\u002Flatest)** and run\nit. It needs no administrator rights and nothing else installed. The app starts the server and, the first\ntime, offers models to download, or uses the GGUF files you already have.\n\n\u003Cdetails>\n\u003Csummary>Build from source\u003C\u002Fsummary>\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Faffifuddin-hazam\u002Fghost-infer\ncd ghost-infer\ncargo build --release\ntarget\\release\\ghost-infer serve models\\Qwen3-8B-Q4_K_M.gguf --gpu\n```\n\nOpen \u003Chttp:\u002F\u002F127.0.0.1:8080> to chat, or point any OpenAI client at `http:\u002F\u002F127.0.0.1:8080\u002Fv1`. Built from\nsource, it needs the CUDA toolkit's NVRTC: see [Building](docs\u002Fbuilding.md).\n\n\u003C\u002Fdetails>\n\n## The desktop app\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"docs\u002Fdemo.gif\" width=\"860\" alt=\"The ghost-infer desktop app finding and fixing a bug, then running the tests\">\n  \u003Cbr>\u003Csub>Real time, not sped up: the desktop app fixing a failing test, Qwen3.6-35B-A3B (Huihui abliterated, i1-Q3_K_M) on an RTX 2060 SUPER (8 GB) with 16 GB of RAM.\u003C\u002Fsub>\n\u003C\u002Fp>\n\n- **An agent on your files.** The model reads and edits your files and runs commands, asking first,\n  with permission modes, a task list and background jobs. [More](docs\u002Fdesktop-app.md)\n- **Voice calls.** Talk with Maya, a companion who answers aloud and remembers your calls, with her own\n  model beside the coding one when the GPU has room. Speech and listening run on the same card. The voice\n  files (about 3 GB) are on [Hugging Face](https:\u002F\u002Fhuggingface.co\u002Faffifuddin-hazam\u002Fghost-voice).\n  [More](docs\u002Fdesktop-app.md#voice-calls)\n- **English or Chinese.** The desktop app's own words come in either language: Settings, General, Language,\n  or follow Windows.\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"docs\u002Fdemo-voice.gif\" width=\"520\" alt=\"A voice call in the desktop app: Maya answers aloud while the pixel orb moves with her voice\">\n  \u003Cbr>\u003Csub>A voice call, real time: Impish_LLAMA_3B, the voice (maya1 with a voice fine-tune of our own,\n  \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Faffifuddin-hazam\u002Fghost-voice\">on Hugging Face\u003C\u002Fa>) and Whisper turbo together on an 8 GB RTX 2060 SUPER. \u003Ca href=\"docs\u002Fdemo-voice.mp4\">With sound\u003C\u002Fa>.\u003C\u002Fsub>\n\u003C\u002Fp>\n\n### It learns while you sleep\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"design\u002Freadme\u002Fsleep.svg\" width=\"860\" alt=\"During the day, chats hold facts worth keeping; at 3:00 they are trained into a small adapter beside the model's frozen weights and checked (facts learned, general answers kept, tools still called 6 of 6) before it is installed; the next morning the model knows them without being told and still uses its tools\">\n\u003C\u002Fp>\n\nEach night it can read the day's chats for things worth remembering and train them into the model's own\nweights: a small LoRA adapter for Qwen3-4B, beside its frozen weights. The adapter is checked before it is\nused: the facts must be learned, general answers unchanged, and the model must still call its tools. If any\ncheck fails, the one before stays. Settings, Sleep training shows each night and everything it has learned,\nwith the chat each fact came from, and forgetting a fact takes it out of the next night's training.\n\nExperimental, and for now from source only: it trains with Python and PyTorch on the model's original weights\n(`scripts\u002Fnightly`, about 25 minutes a night on an 8 GB card), and the installer does not include it yet.\n\n## What's new\n\nNew in 0.4.0:\n\n- **About twice as fast on models bigger than the GPU.** Each layer runs as one CUDA graph, the GPU picks its own\n  experts, small kernels are fused, and the CPU's expert threads each keep a core of their own: Qwen3.6-35B-A3B\n  on an RTX 2060 SUPER went from about 45 to 80 tokens\u002Fs, twice llama.cpp's speed, with the same tokens as before.\n- **Faster sampling.** Picking a token with temperature, top-k or a repetition penalty no longer scans the whole\n  vocabulary: up to 3 ms less per token.\n- **Ternary Bonsai 27B on the GPU** (Q2_0 and PTQ1_0), about 40 tokens\u002Fs on an 8 GB card.\n- **4-bit KV cache** (`--kv q4`, the app's default): about half the memory per token, so longer chats fit.\n- **Plugins in the app**: a side-bar row with its own page, and a status badge over every page.\n- **Select and copy anywhere** in a chat, tool output included; pages the model opens go to the side pane.\n- **`ghost-infer monitor`** draws a live tokens\u002Fs graph in a terminal, and `claude-local.bat` runs Claude Code on\n  your own model (from source).\n\nNew in 0.3.0:\n\n- **Faster on models bigger than the GPU.** The GPU's expert cache now keeps the experts a reply keeps using\n  instead of swapping one in on every miss, which made a 16 GB computer read them back from the disk:\n  Qwen3.6-35B-A3B on an RTX 2060 SUPER went from 34.7 to 42.1 tokens\u002Fs on average. The CPU's workers run below\n  normal priority, so the rest of the computer stays responsive while it writes.\n- **RAM for experts.** Settings, Models: leave 2 GB (the default) or 4 GB free for your other programs, or use\n  all of it. Qwen3.6-35B-A3B on 16 GB used 10.5 GB of RAM before and 3.9 GB now, at the same speed.\n- **Experts on the GPU only.** Settings, Models: the CPU runs none of the experts, at some cost in speed.\n- **Edit, regenerate, copy.** Edit a message you sent and send it again; regenerate any reply, not only the\n  last; copy a message, or select part of it to copy.\n- **Plugins it writes itself.** The model can write small tools for its own use (plain Python functions) and\n  turn them on; it asks before saving one. Skills, plugins and MCP tools are found when a message needs them\n  instead of filling every prompt.\n- **LoRA adapters.** `--lora \u003Cfile>[:scale]` loads an adapter in llama.cpp's GGUF format, on the GPU or CPU.\n- **Sleep training (from source, experimental).** Each night it can train what your chats taught into an\n  adapter for Qwen3-4B, checked before it is used: the facts learned, general answers unchanged, tools still\n  called. Settings, Sleep training shows what it learned and lets you forget any of it. It needs Python and\n  PyTorch and runs from a copy of the source (`scripts\u002Fnightly`); the installer does not include it yet.\n\nNew in 0.2.5:\n\n- **The desktop app in Chinese.** Settings, General, Language: English, 中文, or System to follow Windows. It\n  switches at once, no restart. The model still answers in whatever language you write in. Thanks to\n  [huai_xin](https:\u002F\u002Fgithub.com\u002F2424830124) for the translation.\n\nNew in 0.2.4:\n\n- **Long chats stay fast on Qwen3.6-35B-A3B.** Its attention (256-wide heads) now runs on the tensor cores,\n  both when it writes and when it reads a prompt. On an RTX 2060 SUPER, generation at a 16K context went from\n  25.2 to 39.7 tokens\u002Fs and at 64K from 12.0 to 40.8; reading a 128K-token prompt takes about 4 minutes\n  instead of 27 (81 to 581 tokens\u002Fs). `GHOST_INFER_NO_TC_DECODE=1` and `GHOST_INFER_NO_TC_ATT=1` turn the new\n  kernels off.\n- **Attach files in the desktop app.** Text and code files go with a message: from the + menu, dropped on the\n  window, or pasted with Ctrl+V after copying them in Explorer.\n- **See a file being written.** While the model writes a file, the reply shows a live line with its name, how\n  much is written and for how long, instead of going quiet until the file is done.\n- **Smaller fixes in the app.** Each thinking block opens and closes on its own, and the token count and\n  speed show only while the model is writing (not while it waits for your OK).\n\n## Models\n\nThe app offers these on its first start:\n\n| Model | Download | Good for |\n|---|---|---|\n| Qwen3.6-35B-A3B | 16.8 GB | Thinks before it answers: coding and agent work (16 GB of RAM) |\n| Qwen3-Coder-30B-A3B | 14.7 GB | Answers at once: fast for code |\n| Qwen3-4B-Instruct-2507 | 2.5 GB | Computers with less memory |\n\nOther GGUF files of Llama 3, Mistral Nemo, Qwen3, Qwen3-Next, Qwen3.5 \u002F 3.6 and DeepSeek-style models such as\nGLM-4.7-Flash run too, in Q3_K to Q8_0 or the 2-bit IQ2 formats: [the full list](docs\u002Fbuilding.md#supported-models).\n3-bit files stay 3-bit on the GPU, so a 12B Q3_K_M runs on an 8 GB card.\n\n## Requirements\n\nWindows 10 or 11, an NVIDIA GPU from the GTX 10 series on with a current driver, and a CPU with AVX2.\n\n## Documentation\n\n- [Benchmarks](docs\u002Fbenchmarks.md): the method, long contexts, mixture of experts, speculative decoding\n- [The desktop app and the chat page](docs\u002Fdesktop-app.md)\n- [Command line and server API](docs\u002Fusage.md)\n- [How it works](docs\u002Fhow-it-works.md), and its accuracy\n- [Building, requirements and models](docs\u002Fbuilding.md): from source, GPU requirements, the installer\n\n## Roadmap\n\n- Linux support\n- More architectures (Gemma) and formats (Q4_0, the other IQ quants)\n- Constrained decoding for tool calls\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or \u003Chttps:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0>)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or \u003Chttps:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT>)\n\nat your option.\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work\nby you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional\nterms or conditions.\n\nThe chat page includes [three.js](https:\u002F\u002Fthreejs.org) (MIT, [`src\u002Fvendor\u002Fthree.LICENSE`](src\u002Fvendor\u002Fthree.LICENSE))\nand the [Instrument Sans](https:\u002F\u002Fgithub.com\u002FInstrument\u002Finstrument-sans) typeface (SIL Open Font License 1.1,\n[`src\u002Fvendor\u002Finstrument-sans.LICENSE`](src\u002Fvendor\u002Finstrument-sans.LICENSE)). The installer includes NVIDIA's\nNVRTC under the CUDA Toolkit EULA ([`installer\u002FTHIRD-PARTY.txt`](installer\u002FTHIRD-PARTY.txt)).\n\nThe speed race names the engines it measures with their marks: llama.cpp's from\n[ggml-org\u002Fllama-brand](https:\u002F\u002Fgithub.com\u002Fggml-org\u002Fllama-brand), and Ollama's. They belong to their projects,\nwhich do not endorse ghost-infer.\n","ghost-infer 是一个面向个人用户的轻量级本地大语言模型（LLM）推理引擎，专为消费级 NVIDIA GPU 设计。它以单个 Rust 二进制文件形式分发，支持 GGUF 格式模型，提供 OpenAI 兼容 API，并内置带图形界面的桌面应用（含交互式幽灵形象）。核心优势在于高效显存管理：通过细粒度 GPU\u002FCPU 协同调度与 MoE（混合专家）优化，在显存小于模型体积时仍可高速推理（如 8GB 显卡运行 16GB 模型），实测吞吐显著优于 llama.cpp 和 Ollama。适用于本地离线 AI 应用开发、私有文档问答、个人知识助理等对隐私、低延迟和硬件兼容性要求较高的场景。",2,"2026-11-24 04:45:56","CREATED_QUERY"]