{"id":51457703,"url":"https://github.com/insider77circle/darkswarm","last_synced_at":"2026-07-06T02:01:29.187Z","repository":{"id":368432697,"uuid":"1285109810","full_name":"Insider77Circle/DarkSwarm","owner":"Insider77Circle","description":"P2P decentralized swarm for collective open-source LLM inference. Uncensored, self-hosted, distributed AI. No central authority, no API fees. llama.cpp-based peer-to-peer compute mesh for local LLMs.","archived":false,"fork":false,"pushed_at":"2026-06-30T14:12:21.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-30T15:29:12.069Z","etag":null,"topics":["decentralized","distributed","llm","open-source","p2p","peer-to-peer","privacy","self-hosted","swarm","uncensored"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Insider77Circle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-30T13:42:40.000Z","updated_at":"2026-06-30T14:14:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Insider77Circle/DarkSwarm","commit_stats":null,"previous_names":["insider77circle/darkswarm"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Insider77Circle/DarkSwarm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Insider77Circle%2FDarkSwarm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Insider77Circle%2FDarkSwarm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Insider77Circle%2FDarkSwarm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Insider77Circle%2FDarkSwarm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Insider77Circle","download_url":"https://codeload.github.com/Insider77Circle/DarkSwarm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Insider77Circle%2FDarkSwarm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35175119,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-06T02:00:07.184Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["decentralized","distributed","llm","open-source","p2p","peer-to-peer","privacy","self-hosted","swarm","uncensored"],"created_at":"2026-07-06T02:01:27.374Z","updated_at":"2026-07-06T02:01:29.176Z","avatar_url":"https://github.com/Insider77Circle.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/assets/demo.gif\" alt=\"DarkSwarm P2P LLM Mesh Demo\" width=\"100%\"\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n# DarkSwarm\n\n### The open-source P2P mesh for decentralized LLM inference. Run local AI across self-hosted nodes with zero API fees.\n\n**Privacy. Control. Freedom. No central authority.**\n\n\u003cbr/\u003e\n\n[![GitHub stars](https://img.shields.io/github/stars/Insider77Circle/DarkSwarm?style=for-the-badge\u0026logo=github)](https://github.com/Insider77Circle/DarkSwarm/stargazers)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue?style=for-the-badge)](LICENSE)\n[![Python 3.9+](https://img.shields.io/badge/Python-3.9+-green?style=for-the-badge\u0026logo=python\u0026logoColor=white)](https://www.python.org/)\n[![Latest Release](https://img.shields.io/badge/Release-v0.1.0-orange?style=for-the-badge)](https://github.com/Insider77Circle/DarkSwarm/releases)\n\n\u003ca href=\"https://discord.gg/darkswarm\"\u003e\u003cimg src=\"https://img.shields.io/badge/Discord-Join%20Community-7289da?style=for-the-badge\u0026logo=discord\u0026logoColor=white\" alt=\"Discord\"\u003e\u003c/a\u003e\n\u003ca href=\"https://x.com/darkswarm_ai\"\u003e\u003cimg src=\"https://img.shields.io/badge/X-Follow-black?style=for-the-badge\u0026logo=x\u0026logoColor=white\" alt=\"Follow on X\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/Insider77Circle/DarkSwarm/issues\"\u003e\u003cimg src=\"https://img.shields.io/badge/Questions-Open%20Issue-lightgray?style=for-the-badge\" alt=\"Ask Questions\"\u003e\u003c/a\u003e\n\n\u003c/div\u003e\n\n---\n\n## 🎯 Why DarkSwarm?\n\nDarkSwarm solves a critical problem: **centralized AI is expensive, censored, and extracts your data.**\n\n| | OpenAI/Claude/Gemini | Self-Hosted Alone | **DarkSwarm** |\n|---|---|---|---|\n| **Cost per 1M tokens** | $15–$60 | Hardware + power | **$0** (peer-shared) |\n| **Privacy** | ❌ Sent to OpenAI | ✅ Local only | ✅ Local only |\n| **Latency** | 100–500ms+ | 10–100ms | 10–100ms (optimized) |\n| **Uptime** | API dependent | Single point of failure | **99.9%+ (mesh redundancy)** |\n| **Censorship** | ❌ OpenAI content policy | ✅ Your policy | ✅ Your policy |\n| **Model Freedom** | Limited models | ✅ Any GGUF | ✅ Any GGUF |\n\nDarkSwarm is a **peer-to-peer compute mesh** that runs local LLMs (via llama.cpp) across self-hosted nodes. Think of it as a **decentralized, censorship-resistant alternative to OpenAI's API**, but owned and operated by you and your community.\n\n---\n\n## 🚀 Quick Start\n\n**Prerequisites:**\n- Python 3.9+ or Docker\n- [A local LLM model](https://huggingface.co/models?other=llm\u0026sort=trending\u0026search=GGUF)\n\n### One-Command Start\n\n```bash\n# Clone the repo\ngit clone https://github.com/Insider77Circle/DarkSwarm.git \u0026\u0026 cd DarkSwarm\n\n# Install dependencies\npip install -r requirements.txt\n\n# Run a node (adjust model path)\npython3 run_node.py --model /path/to/model.gguf --name my-node-01\n```\n\n**Expected output:**\n```\n[INFO] Node 'my-node-01' initialized\n[INFO] Listening on P2P port 5000\n[INFO] Web UI available at http://localhost:8080\n[INFO] Ready to accept peer connections...\n```\n\nVisit **`http://localhost:8080`** to see your node's dashboard.\n\n👉 **[Full Quickstart Guide](docs/QUICKSTART.md)** — Python, Docker, and multi-node examples\n\n---\n\n## ✨ Key Features\n\n### 🔗 **Peer-to-Peer Mesh Architecture**\n- **Decentralized node discovery** — nodes find each other without a central server\n- **Self-healing network** — nodes join/leave gracefully, mesh keeps working\n- **No single point of failure** — if one node goes down, inference continues\n\n### ⚡ **Distributed Inference Engine**\n- **Intelligent load balancing** — routes requests to the fastest available node\n- **Model distribution** — different nodes run different models; mesh optimizes routing\n- **Batch inference** — combines requests for higher throughput\n- **Real-time latency metrics** — see which nodes are fastest for your workload\n\n### 🛡️ **Privacy-First Design**\n- **Zero data leaves your infrastructure** — all inference stays local, P2P\n- **End-to-end encryption** — all inter-node communication is encrypted\n- **No telemetry or tracking** — complete transparency\n- **Open-source \u0026 auditable** — inspect every line of code\n\n### 🎨 **Simple Web UI**\n- **Real-time node monitoring** — see active nodes, model status, throughput\n- **Interactive inference testing** — test models directly from browser\n- **Network visualizer** — watch your mesh topology live\n- **Performance dashboard** — latency, throughput, resource utilization\n\n### 🔧 **Developer-Friendly API**\n```python\nfrom darkswarm import DarkSwarmClient\n\nclient = DarkSwarmClient(bootstrap_nodes=[\"localhost:5000\"])\nresponse = client.infer(\n    prompt=\"What is decentralized AI?\",\n    model=\"auto\",\n    temperature=0.7\n)\nprint(response.text)\n```\n\n### 📦 **Compatible with llama.cpp Ecosystem**\n- Run **any GGUF-format model** (Llama, Mistral, Qwen, etc.)\n- Leverage **llama.cpp's optimizations** (ARM support, GPU acceleration)\n- Drop-in replacement for oobabooga, text-generation-webui, ollama\n\n---\n\n## 🏗️ Architecture Overview\n\nDarkSwarm uses **mesh topology** where nodes communicate directly:\n\n```\n┌─────────────┐      ┌─────────────┐      ┌─────────────┐\n│   Node 1    │      │   Node 2    │      │   Node 3    │\n│ Llama 2-7B  │◄────►│ Mistral-7B  │◄────►│ Qwen-14B    │\n└─────────────┘      └─────────────┘      └─────────────┘\n      ▲                    ▲                     ▲\n      │                    │                     │\n      └────────┬───────────┴─────────────────────┘\n               │ P2P Mesh Network (libp2p)\n      ┌────────▼──────────┐\n      │  Your Application  │\n      │  (Client)          │\n      └───────────────────┘\n```\n\n**How It Works:**\n1. Client submits inference request to any node\n2. Local node queries peers for model availability\n3. Request routes to best-fit peer (lowest latency + available model)\n4. Inference runs on selected peer, results stream back\n5. Network automatically load-balances and recovers from failures\n\n📖 **[Full Architecture Guide](docs/ARCHITECTURE.md)** — Protocol, security model, message flow\n\n---\n\n## 🎯 Use Cases\n\n### 💻 **Local AI for Development**\nRun LLMs locally during development without API costs or rate limits.\n\n### 🏥 **Privacy-Sensitive Applications**\nHealthcare, legal, finance — keep data completely local and encrypted.\n\n### 🌍 **Edge Deployment**\nRun inference on edge devices, IoT networks, or geographically distributed infrastructure.\n\n### 👥 **Community AI Sharing**\nJoin a trusted P2P mesh with colleagues/friends to pool compute resources and costs.\n\n### 🔐 **Censorship-Resistant AI**\nEnsure your AI service isn't subject to any third-party API provider's policies.\n\n### 📡 **Offline-First Systems**\nMesh works without internet — just connect nodes over LAN or intranet.\n\n---\n\n## 💰 Cost Comparison\n\n| Scenario | Traditional API | Self-Hosted Alone | **DarkSwarm** |\n|----------|---|---|---|\n| **Single app, 1M inferences/month** | $30–$60 | GPU: $300–$800/mo | **$0** (your hardware) |\n| **Scale to 10M inferences** | $300–$600 | Multiple servers | **Add nodes, same cost** |\n| **Data privacy** | ❌ Shared with provider | ✅ Local only | ✅ Local only |\n| **Downtime risk** | Provider outage | Single server fails | **Mesh continues** |\n| **Vendor lock-in** | Heavy (API format) | Medium (model format) | **None (pure P2P)** |\n\n**Bottom line:** For organizations doing serious inference work, DarkSwarm eliminates recurring API fees and gives you complete control.\n\n---\n\n## 📚 Documentation\n\n- **[🚀 Quickstart Guide](docs/QUICKSTART.md)** — Get running in 5 min (Python/Docker/Multi-node)\n- **[🏗️ Architecture \u0026 Protocol](docs/ARCHITECTURE.md)** — Deep dive into mesh, routing, security\n- **[📖 API Reference](docs/API.md)** — Full client library and REST API docs\n- **[🔐 Security Model](docs/SECURITY.md)** — Threat model, encryption, trust assumptions\n- **[🤝 Contributing Guide](CONTRIBUTING.md)** — How to contribute code, docs, features\n- **[📜 Code of Conduct](CODE_OF_CONDUCT.md)** — Community guidelines\n\n---\n\n## 🎮 Real-World Examples\n\n### Example 1: Multi-Node Inference\n\n```bash\n# Terminal 1: Start node with Mistral\npython3 run_node.py --model ./models/mistral-7b.gguf --name node-1 --port 5000\n\n# Terminal 2: Start node with Llama and connect\npython3 run_node.py --model ./models/llama2-13b.gguf --name node-2 --port 5001 --peer localhost:5000\n\n# Terminal 3: Query the mesh\ncurl -X POST http://localhost:8080/infer \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"prompt\": \"Explain quantum computing\", \"model\": \"auto\"}'\n```\n\nThe mesh **automatically routes to the fastest node**:\n```json\n{\n  \"text\": \"Quantum computing leverages quantum mechanics...\",\n  \"model_used\": \"llama2-13b\",\n  \"node_used\": \"node-2\",\n  \"latency_ms\": 387,\n  \"peer_latencies\": {\"node-1\": 523, \"node-2\": 387}\n}\n```\n\n### Example 2: Python Client\n\n```python\nfrom darkswarm import DarkSwarmClient\n\n# Create client\nclient = DarkSwarmClient(bootstrap_nodes=[\"localhost:5000\"])\n\n# Simple inference\nresponse = client.infer(\n    prompt=\"What is P2P networking?\",\n    model=\"auto\",\n    max_tokens=256\n)\nprint(f\"Response: {response.text}\")\nprint(f\"Latency: {response.latency_ms}ms\")\n\n# Streaming for long responses\nfor chunk in client.infer_stream(\n    prompt=\"Write a story about AI\",\n    max_tokens=500\n):\n    print(chunk.text, end=\"\", flush=True)\n\n# Batch processing\nresponses = client.infer_batch(\n    prompts=[\"What is AI?\", \"What is ML?\", \"What is DL?\"],\n    model=\"mistral-7b\"\n)\n```\n\n---\n\n## 🗺️ Roadmap\n\n| Version | Features | ETA |\n|---------|----------|-----|\n| **v0.2** | Model caching \u0026 optimization layer | Q3 2025 |\n| **v0.3** | Payment/incentive system for mesh participants | Q4 2025 |\n| **v0.4** | GPU acceleration \u0026 hardware-specific optimizations | Q1 2026 |\n| **v0.5** | Web-based mesh explorer \u0026 analytics dashboard | Q2 2026 |\n| **v1.0** | Production-ready with comprehensive benchmarks | Q3 2026 |\n\n👉 **[Vote on features](https://github.com/Insider77Circle/DarkSwarm/discussions)** — Tell us what you want!\n\n---\n\n## 🤝 Contributing\n\nWe welcome contributions! Whether code, docs, or ideas:\n\n- **Code:** Bug fixes, features, performance improvements\n- **Documentation:** Guides, tutorials, examples\n- **Community:** Testing, feedback, spreading the word\n\n👉 **[Contributing Guide](CONTRIBUTING.md)** — Get started in 5 minutes\n\n**First-time contributor?** Look for [`good-first-issue`](https://github.com/Insider77Circle/DarkSwarm/labels/good-first-issue) labels.\n\n---\n\n## 🐛 Support \u0026 Community\n\n- **Questions?** [Open a Discussion](https://github.com/Insider77Circle/DarkSwarm/discussions)\n- **Found a bug?** [File an Issue](https://github.com/Insider77Circle/DarkSwarm/issues)\n- **Chat with us:** [Join Discord](https://discord.gg/darkswarm)\n- **Follow updates:** [X / Twitter](https://x.com/darkswarm_ai)\n\n---\n\n## 📜 License \u0026 Acknowledgments\n\nDarkSwarm is released under the **MIT License** — see [**LICENSE**](LICENSE).\n\n**Built on:**\n- [**llama.cpp**](https://github.com/ggerganov/llama.cpp) — efficient local LLM inference\n- [**libp2p**](https://libp2p.io/) — P2P networking protocol\n- [**Hugging Face**](https://huggingface.co/) — LLM model distribution\n- Open-source community — privacy advocates \u0026 distributed systems researchers\n\n---\n\n## ⭐ Support DarkSwarm\n\n**Love DarkSwarm?**\n- ⭐ **Star the repo** ([GitHub](https://github.com/Insider77Circle/DarkSwarm))\n- 🐦 **Share on X/Twitter** (mention [@darkswarm_ai](https://x.com/darkswarm_ai))\n- 👥 **Invite others** to join the community\n- 📝 **Write about it** — blog posts, tutorials, case studies\n\n---\n\n\u003e [!WARNING]\n\u003e **Legal Disclaimer:** You are responsible for complying with all applicable laws and regulations regarding data privacy, AI use, and open-source licensing. Ensure you have permission to run LLMs on your infrastructure and that your use case complies with model licenses and local regulations.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**Ready to take back control of your AI?**\n\n[**Get Started Now →**](docs/QUICKSTART.md)\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finsider77circle%2Fdarkswarm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finsider77circle%2Fdarkswarm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finsider77circle%2Fdarkswarm/lists"}