You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+166-1Lines changed: 166 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@
28
28
29
29
## Why Hypercore?
30
30
31
-
Most LLM inference runtimes (vLLM, TGI, llama.cpp server) are research-first tools retrofitted for production. Hypercore is built production-first from day one.
31
+
Most LLM inference runtimes (vLLM, TGI, llama.cpp server) are research-first tools retrofitted for production. Hypercore is built **production-first** from day one.
32
32
33
33
**The problem:** You want to deploy a local LLM behind an API. You need it to be fast, safe, observable, and compatible with every tool that speaks OpenAI. Existing solutions give you speed but not safety — or safety but not speed.
34
34
@@ -42,6 +42,63 @@ Most LLM inference runtimes (vLLM, TGI, llama.cpp server) are research-first too
Hypercore is designed for teams who need **predictable, safe, observable inference** without the operational complexity of GPU clusters. If you're running models on CPU or edge devices, Hypercore is purpose-built for your use case.
66
+
67
+
---
68
+
69
+
## Design Philosophy
70
+
71
+
Hypercore is built on three core principles that guide every engineering decision:
72
+
73
+
### 1. Boring is What Users Trust
74
+
75
+
We don't chase benchmarks or add features for marketing. Every component is designed to be **predictable under load**. When your inference server is handling production traffic at 3 AM, you don't want clever optimizations — you want boring reliability. Hypercore chooses explicit error handling over silent fallbacks, deterministic scheduling over probabilistic heuristics, and clear failure modes over optimistic retries.
76
+
77
+
### 2. No Silent Mutations
78
+
79
+
If Hypercore can't fulfill a request exactly as specified, it rejects it with a clear error. It will never silently truncate your prompt, quietly reduce `max_tokens`, or drop requests without telling you. Every admission decision, every timeout, every rejection is logged, metriced, and traceable. This is a hard contract — not a best-effort promise.
80
+
81
+
### 3. Safety is Not Optional
82
+
83
+
Memory limits aren't suggestions. Request timeouts aren't configurable to "infinity." Body size limits can't be disabled. The Safety Governor runs continuously, monitoring system memory and swap pressure. When resources are constrained, Hypercore explicitly rejects new requests rather than degrading quality for existing ones. This protects both the system and the user experience.
84
+
85
+
---
86
+
87
+
## Performance Characteristics
88
+
89
+
Hypercore is optimized for **consistent latency** rather than peak throughput. Here's what to expect:
90
+
91
+
| Metric | Typical Value | Notes |
92
+
|--------|---------------|-------|
93
+
| Cold start | < 3 seconds | Model loading depends on file size |
94
+
| Time to first token | 50-200ms | Depends on prompt length and model |
95
+
| Token throughput | 20-80 tok/s | CPU-only, varies by model and hardware |
**Why CPU-first?** Most teams don't need (or can't afford) GPU infrastructure for every deployment. Hypercore is built to run on standard cloud VMs, edge devices, and developer laptops. When you need GPU acceleration, the llama.cpp backend supports CUDA, Metal, and Vulkan — but you don't need them to get started.
101
+
45
102
## Quickstart
46
103
47
104
### Option 1: Docker Compose (Recommended)
@@ -351,6 +408,114 @@ Contributions are welcome! Please:
351
408
4. Push to the branch (`git push origin feature/amazing-feature`)
-**Zero warnings policy** — the codebase compiles with zero warnings across lib and all test files.
424
+
-**No `unwrap()` in hot paths** — all engine and API code uses explicit error handling.
425
+
-**Every metric is real** — no placeholder counters or hardcoded values.
426
+
427
+
---
428
+
429
+
## Use Cases
430
+
431
+
Hypercore is purpose-built for these deployment scenarios:
432
+
433
+
### 🏢 Internal AI APIs
434
+
Deploy behind your corporate firewall with Bearer auth. Teams can use the standard OpenAI Python SDK to interact with your own models without sending data to third-party APIs. Compliance-friendly, auditable, and fully under your control.
435
+
436
+
### 🌐 Edge Inference
437
+
Run on edge servers, IoT gateways, or retail locations. Hypercore's small binary size (~15MB), CPU-first design, and strict memory limits make it ideal for resource-constrained environments where GPU infrastructure isn't available.
438
+
439
+
### 🧪 AI Product Prototyping
440
+
Swap out OpenAI API calls with a local Hypercore instance during development. Same API, same SDKs, but with zero cost per token. Test prompt engineering, fine-tuned models, and RAG pipelines without cloud bills.
441
+
442
+
### 🏥 Regulated Industries
443
+
Healthcare, finance, and government deployments require data to stay on-premises. Hypercore runs entirely local — no telemetry phones home, no data leaves your network. The MIT license has no usage restrictions.
444
+
445
+
### 🔬 Research & Experimentation
446
+
Benchmark different GGUF models with the built-in `bench` and `stress` commands. Compare token throughput, latency profiles, and memory consumption across model sizes and quantization levels.
447
+
448
+
---
449
+
450
+
## Security
451
+
452
+
Hypercore takes security seriously at every layer:
453
+
454
+
| Layer | Protection |
455
+
|-------|------------|
456
+
|**Network**| Optional Bearer token auth, CORS controls |
457
+
|**Input**| 2MB body size limit prevents OOM attacks |
-[ ] Graceful HTTP shutdown (connection draining without abort)
475
+
-[ ]`/v1/completions` endpoint (legacy text completion)
476
+
477
+
### v1.2
478
+
-[ ] Multi-model serving (load multiple models, route by name)
479
+
-[ ] LoRA adapter hot-loading
480
+
-[ ] Structured output / JSON mode
481
+
-[ ] WebSocket streaming
482
+
483
+
### v2.0
484
+
-[ ] Distributed inference across multiple nodes
485
+
-[ ] Speculative decoding
486
+
-[ ] KV-cache offloading to disk
487
+
-[ ] Plugin system for custom pre/post-processing
488
+
489
+
Want to influence the roadmap? [Open an issue](https://github.com/SBALAVIGNESH123/hypercore-rs/issues) or start a discussion.
490
+
491
+
---
492
+
493
+
## FAQ
494
+
495
+
**Q: Is Hypercore ready for production?**
496
+
A: Yes. The core engine, API server, safety boundaries, and observability stack are production-hardened. It compiles with zero warnings, has comprehensive tests, and handles edge cases (timeouts, memory pressure, malicious payloads) explicitly.
497
+
498
+
**Q: Do I need a GPU?**
499
+
A: No. Hypercore is CPU-first by design. It runs on any machine with a modern x86_64 or ARM processor. GPU support through llama.cpp is available but not required.
500
+
501
+
**Q: What models does it support?**
502
+
A: Any model in GGUF format. This includes all models from the Hugging Face GGUF ecosystem — Llama, Mistral, Phi, Qwen, Gemma, and hundreds more. Any quantization level (Q4_K_M, Q5_K_M, Q8_0, F16) is supported.
503
+
504
+
**Q: How does it compare to Ollama?**
505
+
A: Ollama is a great tool for local experimentation. Hypercore is designed for production deployment — it adds continuous batching, safety governors, request timeouts, authentication, Prometheus metrics, and OpenTelemetry tracing that Ollama doesn't have.
506
+
507
+
**Q: Can I use it with LangChain / LlamaIndex?**
508
+
A: Yes. Both frameworks support custom OpenAI-compatible endpoints. Point them at `http://localhost:8080/v1` and they work out of the box.
509
+
510
+
**Q: Is it free?**
511
+
A: Yes. MIT licensed. No usage limits, no telemetry, no vendor lock-in. Use it for anything.
512
+
513
+
---
514
+
515
+
## Star History
516
+
517
+
If Hypercore is useful to you, consider giving it a ⭐ on GitHub. It helps others discover the project.
0 commit comments