The cloud is optional. Intelligence is not.
LocalHost-AI is a privacy-first, fully offline AI assistant powered by llama.cpp and built with a premium React + Electron desktop frontend. Everything runs locally on your machine β no cloud, no API keys, no internet dependency.
Most AI assistants depend on cloud APIs, which introduces critical problems:
| Problem | LocalHost-AI Solution |
|---|---|
| β Internet Required | β
Runs 100% offline on 127.0.0.1 |
| β Privacy Risks | β Data never leaves your hardware |
| β API Costs | β Free forever β you own the model |
| β Vendor Lock-in | β Full sovereignty over your AI |
ββββββββββββββββββββββββββββββββ
β React + Electron Desktop β
β (Tailwind CSS v4 + Framer) β
ββββββββββββ¬ββββββββββββββββββββ
β HTTP POST (localhost)
βΌ
ββββββββββββββββββββββββββββββββ
β llama.cpp Server β
β 127.0.0.1:8080 β
ββββββββββββ¬ββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββββββ
β Meta-Llama-3-8B-Instruct β
β (GGUF Q4_K_M Β· ~4.7 GB) β
ββββββββββββββββββββββββββββββββ
CPU / GPU
| Layer | Technology |
|---|---|
| Frontend | React 19 Β· TypeScript Β· Tailwind CSS v4 |
| Desktop Shell | Electron 42 Β· Vite 8 |
| Animations | Framer Motion Β· Custom Typewriter Effect |
| Inference Engine | llama.cpp (local HTTP server) |
| Model | Meta-Llama-3-8B-Instruct (GGUF Q4_K_M) |
| Storage | Browser localStorage (persistent memory) |
| Communication | HTTP on 127.0.0.1:8080 β zero external calls |
- β‘ Quick β Fast, concise answers (512 tokens, temp 0.7)
- π§ Reasoning β Step-by-step logical analysis (1024 tokens, temp 0.5)
- βοΈ Writing β Long-form, structured Markdown output (2048 tokens, temp 0.7)
- Typewriter Animation β Responses type out naturally with a blinking cursor (click to skip)
- Streaming & Instant Modes β Toggle real-time token streaming or full-response delivery
- Markdown & Code Highlighting β Beautiful rendering with Prism OneDark theme
- Copy Button β One-click copy on any assistant message
- Persistent Memory β Remembers conversation context across sessions via
localStorage - Smart Truncation β Long responses are summarized before storing to save context tokens
- Anti-Repetition β Llama-3 chat template with explicit deduplication rules
- Toggle On/Off β Enable or disable memory on the fly
- Chat Export β Download any session as a formatted Markdown (
.md) file - New Session β Clear chat and start fresh instantly
- Clear Memory β Wipe all stored context with one click
- Real-time Metrics β Live latency (ms), character count, and token budget display
- Zero telemetry β no analytics, no tracking
- Zero external API calls β all traffic stays on
127.0.0.1 - Zero cloud dependency β runs in airplane mode
- Node.js v18+ (for the frontend)
- llama.cpp compiled with
llama-server(build instructions) - GGUF model file (e.g.,
Meta-Llama-3-8B-Instruct-Q4_K_M.gguf)
cd C:\testLlama\llama.cpp
build\bin\Release\llama-server.exe ^
-m models\Meta-Llama-3-8B-Instruct-Q4_K_M.gguf ^
-ngl 0 ^
-t 8 ^
-c 4096 ^
--host 127.0.0.1 ^
--port 8080Note:
-ngl 0runs on CPU only. Set-ngl 99to offload layers to GPU if available.
cd desktop_llm_chat
# Install dependencies (first time only)
npm install
# Start the dev server + Electron window
npm run devThe app connects automatically to http://127.0.0.1:8080/completion.
npm run distProduces a standalone .exe in dist-electron/ β no Node.js or terminal needed to run!
Kill_the_cloud/
βββ .gitignore
βββ README.md # This file
βββ desktop_llm_chat/ # Electron + React application
βββ main.cjs # Electron main process
βββ index.html # Entry HTML
βββ package.json # Dependencies & build config
βββ vite.config.ts # Vite + Tailwind v4 config
βββ src/
β βββ main.tsx # React entry point
β βββ App.tsx # Main chat UI & logic
β βββ config.tsx # Inference modes & Llama-3 prompt builder
β βββ memory.ts # localStorage persistence service
β βββ TypewriterContent.tsx # Typewriter animation component
β βββ index.css # Tailwind v4 theme tokens
βββ public/ # Static assets
| Property | Value |
|---|---|
| Model | Meta-Llama-3-8B-Instruct |
| Quantization | Q4_K_M (~4.7 GB) |
| Format | GGUF |
| Context Window | 4096 tokens |
| Prompt Format | Llama-3 native chat template |
Warning
Model files are not included in this repository due to size. Download the weights from HuggingFace and place them in your llama.cpp models/ directory.
- π Low-connectivity environments β Work anywhere, no internet needed
- π Privacy-critical systems β Legal, medical, or personal journaling
- π’ On-device enterprise AI β Secure internal knowledge without cloud exposure
- β‘ Edge AI deployments β Lightweight hardware implementations
- File upload & RAG (Retrieval-Augmented Generation) support
- In-app Model Selector UI
- Multi-session chat history with tabs
- Voice-to-Text and Text-to-Voice integration
- Custom temperature/top-p sliders in settings
- GPU auto-detection and layer offloading
Challenge: DeepSeek vs. Llama β "Kill The Cloud" Challenge
Theme: Deploying powerful AI systems without relying on centralized cloud infrastructure.
Author: Yash Marathe
LocalHost-AI demonstrates that advanced AI assistants can operate securely, privately, and efficiently β entirely offline.
The cloud is optional. Intelligence is not. π§