Hey DEV! 👋
I’ve been working on Quokka, a small open-source project written in Rust. It’s a single-binary, hardware-aware local AI router.
Instead of manually tweaking settings or burning all your RAM on a massive model for simple prompts, Quokka inspects your machine at startup, sets up a Flash + Expert model pair, and routes each request in < 2 ms—fast model for trivial tasks, heavy model for reasoning and code.
How it works under the hood
I kept the architecture modular as a Cargo workspace:
• Hardware probe (quokka-hardware): Checks your RAM, CPU SIMD flags (AVX2/AVX-512/NEON), and GPU VRAM (CUDA/Metal/Vulkan) to automatically pick the right GGUF quantizations and n_gpu_layers.
• Direct llama.cpp FFI (quokka-core): No Python wrappers or external HTTP servers. It binds straight to llama.cpp, mmaps weights to keep memory usage tight, and reuses any GGUF files you already have in your Ollama, LM Studio, or Hugging Face caches.
• Single binary: Ships with an OpenAI-compatible API (/v1/chat/completions with SSE) and a lightweight Svelte UI baked right into the binary via rust-embed.
Where it's at
• Done: Hardware detection, GGUF cache reuse, llama.cpp FFI inference, OpenAI API, and the embedded Web UI.
• Up next: The < 2 ms intent router (quokka-router), LZ4 KV-cache eviction to disk for instant model swaps without OOMs, and a native MCP server for Claude Code / Cursor.
