Skip to main content

🛰️ inferhost

Your own private, multi-modal AI server — one command, any GPU, no compiling.

PyPI Python License Docs

Chat · Vision · Speech · Image generation — all behind one OpenAI-compatible endpoint.

inferhost dashboard

inferhost turns any GPU box into a private AI server. It wraps llama.cpp and stable-diffusion.cpp behind a single OpenAI-compatible endpoint — pulls the official upstream binaries for you (nothing to compile), auto-fetches the right model files when you paste a Hugging Face link, and hot-swaps models in and out of VRAM so one card can serve a big LLM and image generation. You only ever touch a keyboard-driven dashboard (and an optional .env).

⚡ Quick start

uv tool install inferhost      # or:  pipx install inferhost  /  pip install inferhost
inferhost                      # opens the dashboard — press 'a' to add a model

That's the whole setup. First launch fetches the runtime binaries automatically. To add a model, press a and paste a Hugging Face repo — inferhost lists the files, downloads what's needed, and serves it. Then call it like OpenAI:

inferhost quick start: chat, speech, and image generation on one endpoint
🗣️ Chat / LLM 🔊 Text-to-speech 🎨 Image generation
paste
Qwen/Qwen2.5-7B-Instruct-GGUF
paste
OuteAI/OuteTTS-0.2-500M-GGUF
paste
OlegSkutte/sdxl-turbo-GGUF
# 🗣️  Chat  →  /v1/chat/completions
curl http://localhost:9001/v1/chat/completions -H 'Content-Type: application/json' \
  -d '{"model":"<name-from-dashboard>","messages":[{"role":"user","content":"Hello!"}]}'

# 🔊  Speech  →  /v1/audio/speech   (returns WAV)
curl http://localhost:9001/v1/audio/speech -H 'Content-Type: application/json' \
  -d '{"model":"<name>","input":"Hello from inferhost.","voice":"default"}' --output speech.wav

# 🎨  Image  →  /v1/images/generations   (returns base64 PNG)
curl http://localhost:9001/v1/images/generations -H 'Content-Type: application/json' \
  -d '{"model":"<name>","prompt":"a red apple on a table","size":"512x512"}' \
  | jq -r '.data[0].b64_json' | base64 -d > out.png

Everything lives on http://localhost:9001/v1 — point any OpenAI client (Python SDK, Open WebUI, your app) at it. The model name is whatever shows in the dashboard.

✨ Why inferhost

  • One endpoint, every modality — chat, vision, speech, and images on the same OpenAI-compatible :9001. No per-model servers to wire up.
  • Nothing to compile — official llama-server / sd-server binaries are pulled from upstream for your hardware (NVIDIA Vulkan, ROCm, SYCL, CPU, Apple Metal).
  • Paste a link, it figures out the rest — picks the best quant for your VRAM, and for multi-file models (Flux, Z-Image, Qwen-Image) auto-downloads the right VAE + text encoders from known-good repos.
  • One GPU, many models — llama-swap lazy-loads and hot-swaps models in/out of VRAM on demand, so a 24 GB card serves a 27B LLM and Flux image generation.
  • TUI or headless — drive everything from a keyboard dashboard, or run inferhost start/stop/status on a server with no terminal.
  • Tuned by default — q8_0 KV-cache compression, stacked MTP + ngram speculative decoding, and honest context windows, all overridable from a .env.
  • Faster with DFlash — attach a z-lab block-diffusion draft model to a supported target (Qwen3.5/3.6, Gemma-4) for speculative decoding: press f on a paired model and the right draft downloads and wires itself up automatically.

🧩 Supported models

Modality Models How
Chat / Vision any GGUF LLM (Qwen, Llama, Gemma, DeepSeek…), vision via mmproj paste repo → pick quant
Speech (TTS) OuteTTS, Qwen3-TTS paste repo (vocoder auto-detected, or pick the Text-to-speech kind explicitly)
Image — single-file SD 1.5, SDXL (incl. Turbo) paste repo → pick file
Image — Flux.1 schnell / dev auto-fetches VAE + CLIP-L + T5XXL
Image — Flux.2 Klein incl. Bonsai-Image (1-bit) auto-fetches VAE + Qwen3-4B
Image — Z-Image Z-Image-Turbo auto-fetches VAE + Qwen3-4B
Image — Qwen-Image Qwen-Image / Qwen-Image-Edit auto-fetches VAE + Qwen2.5-VL + mmproj

All image families above were verified end-to-end on a Vulkan GPU (SDXL-Turbo ~2 s, Flux-schnell ~4 s, Bonsai ~2 s, Z-Image-Turbo ~11 s, Qwen-Image-Edit via /v1/images/edits).

⚡ DFlash speculative decoding

DFlash speeds up a large target model by attaching a small z-lab block-diffusion draft model that proposes several of the target's next tokens per step, which the big model verifies in one pass — the target's quality at a fraction of the wall-clock time. It's a per-model attachment (like a vision projector), served by the same upstream llama-server (≥ build b9831) — nothing extra to compile.

Press f on a highlighted chat model and, if it has a known pairing, the right community draft downloads and wires itself up (⚡ in the sidebar). Or use Configure → Suggest / Browse / Clear for a progress bar and manual repo entry — pasting an official z-lab draft repo (raw safetensors, no GGUFs) into Browse auto-redirects to its paired GGUF conversion when one is known.

Target family Draft repo
Qwen3.6-27B / 35B-A3B (MoE) Alittlehammmer/*-DFlash-GGUF-llama.cpp
Gemma-4-31B / 26B-A4B (MoE) Alittlehammmer/*-DFlash-GGUF-llama.cpp
Gemma-4-12B williamliao/gemma-4-12B-it-DFlash-GGUF
Qwen3.5-27B / Qwen3-Coder-30B-A3B (MoE) AtomicChat/*-DFlash-GGUF
Qwen3.5-9B Anbeeld/Qwen3.5-9B-DFlash-GGUF
  • Thinking caveat: DFlash acceptance drops sharply (~5–14%) with reasoning on — run the target with reasoning off for the full speedup. inferhost warns when a draft is attached to a model whose reasoning resolves to on.
  • Vision caveat: draft-based speculation (DFlash and MTP) can't run on a model with a vision projector (--mmproj) — llama-server aborts every image request with failed to process speculative batch (a known upstream limit). inferhost auto-disables the draft lane for vision models and serves them with the model-free ngram-mod lane only, so images always work; the draft stays attached in case a future llama.cpp lifts the limit.
  • VRAM: the draft is co-resident with the target (usually well under 2 GiB) and folded into the VRAM/pin-feasibility estimate automatically.
  • MoE targets (…-A3B / …-A4B) are already cheap per step, so DFlash buys a smaller speedup than on a dense model of similar total size.
  • On a llama-server older than b9831, inferhost serves the model draftless with a notice rather than failing — see Usage.

📚 Documentation

Full guides live in docs (and in the docs/ folder):

  • Installation — install, upgrade, uninstall, requirements
  • Usage — the dashboard, keyboard keys, and chat / TTS / image / Flux / Z-Image / Qwen-Image walkthroughs
  • Configuration — every .env variable, KV-cache quant, custom binaries
  • Troubleshooting — ports, tmux mouse, common errors
🏗️ Architecture
Your app ──HTTP──▶  LiteLLM gateway        llama-swap (loopback)       llama-server  (chat/vision)
                    :9001 (public)   ──▶    127.0.0.1:9090      ──┬──▶  sd-server     (images)
                                                                  └──▶  inferhost-tts (speech)
  • llama.cpp (llama-server) runs chat/vision inference — official upstream binary, backend auto-detected.
  • llama-swap fronts the model backends and lazy-loads / hot-swaps them on demand (loopback only). Image models (sd-server) ride here too, so they swap VRAM with LLMs.
  • inferhost-tts wraps llama.cpp's llama-tts (OuteTTS) — or the separate qwen3-tts.cpp engine for Qwen3-TTS — behind /v1/audio/speech (started only when a TTS model is registered).
  • LiteLLM is the single always-on public gateway on :9001, routing each request to the right backend.

The extra engines (llama-tts, sd-server) are fetched automatically the first time you add a model that needs them. qwen3-tts.cpp has no prebuilt release, so it's compiled from source on demand instead (needs git/cmake/a C++ compiler on the host).

🛠️ Development

The repo ships a run.sh wrapper for source-tree work (end users never need it — they only type inferhost):

git clone git@github.com:amirrouh/inferhost.git && cd inferhost
./run.sh install     # venv + editable install
./run.sh start       # launch the TUI (downloads binaries on first run)
./run.sh status      # headless status
./run.sh stop        # stop daemons
./run.sh test        # pytest

Run ./run.sh help for the full list.

License

Apache 2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

inferhost-0.8.2.tar.gz (784.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

inferhost-0.8.2-py3-none-any.whl (120.9 kB view details)

Uploaded Python 3

File details

Details for the file inferhost-0.8.2.tar.gz.

File metadata

  • Download URL: inferhost-0.8.2.tar.gz
  • Upload date:
  • Size: 784.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for inferhost-0.8.2.tar.gz
Algorithm Hash digest
SHA256 317738860f398efbbd123fbcb4443e721aa9f1bc8f32032a6a05998cdd931de9
MD5 677b76572827b6fcc2fcd36f0c9e7fed
BLAKE2b-256 246db32902bf06851cf0c69504e3cb575c6ba6a41fd89b30e5ccc4d97bee3fa4

See more details on using hashes here.

Provenance

The following attestation bundles were made for inferhost-0.8.2.tar.gz:

Publisher: publish.yml on amirrouh/inferhost

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file inferhost-0.8.2-py3-none-any.whl.

File metadata

  • Download URL: inferhost-0.8.2-py3-none-any.whl
  • Upload date:
  • Size: 120.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for inferhost-0.8.2-py3-none-any.whl
Algorithm Hash digest
SHA256 682f58483f4d32ff97944b80c96c865a875353a9243ed08462611554d327f460
MD5 951d70b04d42206f681cbd6941763802
BLAKE2b-256 10be0e52a4805fd6ad3325bb585babf5daf07886d53282ead1f7b8ce4052f10e

See more details on using hashes here.

Provenance

The following attestation bundles were made for inferhost-0.8.2-py3-none-any.whl:

Publisher: publish.yml on amirrouh/inferhost

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page