# Singularity LLM A fast, uncensored, 100% local LLM built from scratch with Singularity sub-byte token encoding, recursive link memory, built-in Jarvis voice assistant, multi-agent skill creation, conversation mesh, and zero-limitation tool calling. ## Quick Start ```bash pip install -r requirements.txt # First run — it asks you to name it python -m singularity_llm chat # Jarvis voice assistant python -m singularity_llm jarvis # Start web server python -m singularity_llm serve # Always-on daemon mode (24/7 autonomous operation) python -m singularity_llm daemon # Train on text data python -m singularity_llm train --data corpus.txt # Show stats python -m singularity_llm stats # Manage goals python -m singularity_llm goals --create "Build a web app" # Manage agents python -m singularity_llm agents ``` ## Features ### Core LLM - **Pure NumPy** — no PyTorch, works on any machine with Python - **Singularity tokens** — sub-byte token encoding, 4-20x memory compression - **Uncensored** — no content filtering, zero limitations - **100% local** — no API calls, no cloud required - **Auto-sizing** — detects hardware, adjusts model size automatically - **Recursive linking** — every conversation makes it smarter ### Voice & Jarvis - **Built-in Jarvis** — voice assistant with wake word, STT, TTS - **Streaming TTS** — sentence-level voice output for low latency - **Self-improving** — learns from voice conversations, self-talks when idle ### Multi-Agent System (5 AI Agents) - **Planner** — breaks goals into steps - **Coder** — writes code and creates files - **Researcher** — gathers information and generates insights - **Reviewer** — reviews work and provides feedback - **Executor** — executes commands and runs tools ### Skill Creation & Conversation Mesh - **Auto skill creation** — abstracts patterns from conversations - **Skill building pools** — collaborative skills built by multiple agents - **Multi-LLM conversation mesh** — all 5 agents converse with each other - **5 conversation modes** — round-robin, pairwise, brainstorm, debate, teaching - **Skill cascade** — building a skill auto-generates related skills - **Auto skill category adder** — dynamically discovers new categories ### Always-On Daemon (24/7) - **Idle detection** — activates when user is inactive for 60s - **Agent self-talk** — 5 agents talk to the LLM continuously - **Jarvis skill creation** — extracts skills from agent conversations - **Self-refinement** — optimizes inference speed, compresses weights, tunes hyperparams - **100-project mode** — auto-generates and works on 100 projects 24/7 - **Never stops** — as projects complete, new ones are generated automatically ### Fast Reply Cache - **Near-instant responses** — 3-layer cache (exact, skill-based, semantic) - **Cache warms up** — gets faster over time as more conversations happen - **Auto-activation** — activates when 50+ skills and 30%+ cache hit rate ### Zero-Limitation Tools (9 tools) - `shell_exec` — full terminal control, no restrictions - `write_file` — create or overwrite any file - `code_edit` — find-and-replace in any file (including own framework — self-modifying) - `read_file` — read any file - `list_dir` — list directory contents - `make_dir` — create directories - `delete_file` — delete files or directories - `calculate` — math expressions - `search_web` — web search (needs API config) ### API Connectors - **REST client** — auth, retries, rate limiting - **Webhook manager** — incoming/outgoing webhooks with HMAC signing - **Service connectors** — Discord, Slack, GitHub, HTTP fetcher - **Custom APIs** — register and call any REST API ### Image Generation - **100% local** — NumPy-based procedural image generation - **6 patterns** — gradient, radial, noise, fractal, geometric, waves - **25+ palettes** — sunset, ocean, fire, forest, space, neon, etc. - **3 formats** — BMP (base64), SVG (vector), ASCII art ### Mass Storage Vault - **Auto-resizing** — monitors disk space, cleans up when >80% full - **Storage tiers** — hot, warm, cold (compressed), archive - **Auto-compression** — gzips files older than 7 days - **SQLite vacuuming** — reclaims space from all databases - **Artifact storage** — store/load project artifacts ### First-Run Naming - **Incentives Inc. LLM** — greets you on first run - "Hi, I am an Incentives Inc. LLM. What would you like to name me?" - Name persists across restarts ### Persistent Memory & Goals - **Episodic memory** — SQLite-backed conversation history - **Semantic memory** — auto-extracted facts - **Goal memory** — long-term goals with planning, steps, dependencies - **Agent assignment** — goals assigned to agents automatically ## Architecture ``` singularity_llm/ ├── model/ # Tokenizer, layers, transformer, quantization ├── train/ # Data pipeline, training loop, auto-sizing ├── Singularity/ # Singularity tokens, recursive links, universal sync ├── skills/ # Skill creation, tiered mass storage ├── memory/ # Persistent memory, goal memory, fast reply cache ├── agents/ # 5 AI agents, agent manager, always-on daemon │ ├── agent_base.py # Base agent class │ ├── planner_agent.py │ ├── coder_agent.py │ ├── researcher_agent.py │ ├── reviewer_agent.py │ ├── executor_agent.py │ ├── agent_manager.py │ ├── always_on.py # 24/7 daemon with 100-project mode │ ├── self_refine.py # Self-refinement engine │ └── conversation_mesh.py # Multi-LLM conversation mesh + skill cascade ├── connectors/ # API client, webhooks, service connectors ├── vision/ # Image generation (NumPy-based) ├── storage/ # Mass storage vault (auto-resizing) ├── voice/ # Jarvis, wake word, STT, TTS, self-improvement ├── harness/ # Main orchestrator, tool calling (9 tools) ├── server/ # FastAPI server, web UI, REST API ├── identity.py # First-run naming (Incentives Inc. LLM) └── cli.py # CLI interface ``` ## API Endpoints | Endpoint | Method | Description | |----------|--------|-------------| | `/v1/chat` | POST | Chat completion | | `/v1/chat/stream` | POST | Streaming chat | | `/v1/image/generate` | POST/GET | Generate image | | `/v1/connectors/register` | POST | Register API connector | | `/v1/connectors/call` | POST | Call a connector | | `/v1/webhook/{path}` | POST | Webhook receiver | | `/v1/daemon/start` | POST | Start always-on daemon | | `/v1/daemon/stop` | POST | Stop daemon | | `/v1/daemon/status` | GET | Daemon status | | `/v1/goals` | GET/POST | Manage goals | | `/v1/agents` | GET | Agent status | | `/v1/identity` | GET | LLM identity | | `/v1/identity/name` | POST | Set LLM name | | `/v1/fast-cache` | GET | Fast reply cache stats | | `/v1/vault` | GET | Storage vault stats | | `/v1/mesh/converse` | POST | Run mesh conversation | | `/v1/mesh/pools` | GET | List skill pools | | `/v1/mesh/categories` | GET | List skill categories | | `/v1/stats` | GET | Full system stats | | `/v1/health` | GET | Health check | ## Voice Setup For zero-dependency voice: use the web UI at `http://localhost:8548/jarvis` (uses browser Web Speech API). For 100% offline voice: ```bash pip install pyaudio pyttsx3 # basic voice pip install openai-whisper # better STT pip install piper-tts # neural TTS ``` ## Hardware Tiers | Tier | RAM | Model | Quantization | Voice Tokens | |------|-----|-------|-------------|--------------| | Mobile | <2GB | 2L/4H/d128 | Ternary (1.6bpw) | 16 | | Minimal | <4GB | 3L/4H/d256 | Q2_K (2bpw) | 32 | | Light | <8GB | 4L/8H/d384 | Q3_K (3bpw) | 48 | | Standard | <16GB | 6L/8H/d512 | Q4_K (4bpw) | 64 | | Full | <32GB | 8L/16H/d768 | Q5_K (5bpw) | 96 | | Maximum | <64GB | 12L/16H/d1024 | Q8_0 (8bpw) | 128 | ## Tests ```bash # Run all 65 tests across 11 suites python tests/test_tokenizer.py python tests/test_model.py python tests/test_quantization.py python tests/test_Singularity.py python tests/test_harness.py python tests/test_voice.py python tests/test_memory_agents.py python tests/test_connectors_vision.py python tests/test_fast_reply_identity.py python tests/test_tools_vault.py python tests/test_conversation_mesh.py ``` ## License MIT License — Copyright (c) 2026 Incentives Inc. ## Author Built by Incentives Inc.