Janus: A Go-based Local LLM Server with Vulkan Support

Janus is a lightweight local LLM server implemented as a single Go binary that allows users to run .gguf models on GPU or CPU. It exposes an OpenAI-compatible API, enabling seamless integration with AI clients like Cursor and Cline without requiring Python, Docker, or the Ollama runtime.

Core Functionality and API Support

Janus acts as a wrapper around llama.cpp, utilizing Vulkan for hardware acceleration across AMD, Intel, and NVIDIA GPUs, with a fallback to CPU. It provides a set of endpoints that mimic the OpenAI API, allowing it to serve as a drop-in replacement for local inference workflows.

Supported API Endpoints

Method Path Description
GET /health Liveness check (supports ?deep=true for detailed status)
GET /v1/models Lists available models
POST /v1/chat/completions Chat interface with streaming support
POST /models/load Hot-swaps the active model without restarting the server
GET /models/list Lists available .gguf files in the models directory
GET /engine/status Provides VRAM usage and backend information

Key Technical Features

  • Hardware Agnostic Inference: Uses Vulkan to support a wide range of GPUs (NVIDIA, AMD, Intel) or CPU fallback.
  • Thinking Model Support: Specifically handles reasoning models by splitting <think> blocks into reasoning_content.
  • Automatic Template Detection: Detects chat templates directly from the GGUF metadata.
  • Zero-Dependency Deployment: On Windows, it compiles to a single .exe (alongside llama.dll), removing the need for a Python environment.

Installation and Configuration

Janus is designed for quick deployment on Windows, Linux, and macOS, requiring Go 1.22+ for building from source.

Setup Workflow

  1. Build: Users clone the repository and run the build script (e.g., .\build.ps1 on Windows), which downloads the necessary llama.cpp Vulkan DLLs.
  2. Model Acquisition: Models are placed in the models\ folder. A provided utility, modelget, can be used to download GGUF files from Hugging Face.
  3. Configuration: The server is configured via a .env file. Key variables include:
    • INFERENCE_BACKEND: Set to vulkan, cpu, or openrouter.
    • JANUS_MODEL_PATH: The absolute or relative path to the .gguf file.
    • JANUS_GPU_LAYERS: Controls GPU offloading (-1 for all layers, 0 for CPU only).
    • JANUS_VRAM_CEILING_MB: Sets a VRAM budget hint (default 9216 MiB).

Community Feedback and Technical Critiques

While Janus simplifies the deployment of llama.cpp for some users, the developer community on Hacker News has raised several technical concerns regarding its value proposition and performance.

Redundancy Concerns

Some users argue that Janus provides little functionality beyond what is already available in the native llama-server provided by llama.cpp.

"Llama.cpp already ships a web server. I don't see anything in the README that llama.cpp doesn't already support... Usually people advertise 'Go binary' when it's pure Go, not just a CGO wrapper."

Performance and Hardware Overhead

There is specific discussion regarding the efficiency of the Vulkan backend, particularly on Intel hardware.

"From what I've seen, Vulkan adds a lot of overhead on Intel hardware."

Additionally, critics noted a lack of comparative benchmarks against high-performance inference engines such as vLLM, SGLang, or ExLlama to justify the use of this specific wrapper.

Sources

Related

  • Dispatch
  • Dispatch
  • Project
  • Project
  • Project