CSGLite
A lightweight tool for running large language models locally, powered by models from the CSGHub platform.
Inspired by Ollama, CSGLite provides model download, local inference, interactive chat, and an OpenAI-compatible REST API — all from a single binary.
A request arrives at one of the compatible APIs, the router decides where it
runs, and the answer comes back in the same shape whether it was served here,
by another machine on your network, or by a provider.
Features
Core
- One command to start —
csghub-lite run downloads, loads, and chats
- Model keep-alive — models stay loaded after exit (default 5 min, or set per model in the Web UI run dialog), instant reconnect
- Auto-start server — background API server starts automatically, no manual setup
- Model download from CSGHub platform (hub.opencsg.com or private deployments)
- Local inference via llama.cpp (GGUF models, SafeTensors auto-converted)
- Interactive chat with streaming output
- REST API compatible with Ollama's API format
- OpenAI-compatible API — Chat Completions (including
logprobs, top_logprobs, logit_bias, and response_format), Responses, Embeddings, Images, Audio, Realtime, and the Decisions API (POST /ai-gateway/v1/decisions); the official OpenAI SDKs work with base_url pointed at CSGLite
- Cross-platform — macOS, Linux, Windows
- Resume downloads — interrupted downloads resume where they left off
- Pause/Resume — pause ongoing downloads and resume later
- LAN cluster — install the same binary on several machines with one shared
secret and they form a pool of compute: requests land on whichever node will
finish soonest, models are copied between nodes instead of downloaded again,
and an address that changes on reboot is relearned. Two nodes without a
licence, unlimited with one.
Web UI
- Model Library — manage local models with download progress, pause/resume, and one-click run
- Marketplace — browse and download models/datasets from CSGHub
- Inference testing — open an interactive test dialog from AI Gateway for local, cloud and published model services
- AI Apps — install and launch AI applications with one-click configuration
- Settings — configure storage, third-party providers, and access tokens
Integrations
- Third-Party Providers — integrate OpenAI, DeepSeek, MiMo, Kimi, BigModel, Qianfan, MiniMax, OpenRouter, and any OpenAI-compatible API
- Coding Agents — one-click config for Claude Code, Codex, Pi, OpenCode, and Open Code Review
- Context compression — optionally shrinks the tool output inside agent requests before any model sees it (Settings → Context compression). Safe mode removes only redundancy and keeps every distinct line; aggressive mode also samples long logs, arrays and search results. File reads and source code are never changed. On captured Claude Code / Codex traffic tool output drops 6% (safe) to 17% (aggressive), search results 24–56%; savings per request show in Observability
- AI Applications — one-click setup for Claude Code, OpenCode, Open Code Review, Codex, Codex App, ZCode, Pi, OpenClaw, CSGClaw, CSGLab, Dify, and AnythingLLM
Dataset Support
- Dataset download from CSGHub platform
- Dataset management — list, show details, and delete local datasets
Installation & Upgrade
Desktop client
Download the desktop client from the CSGLite product page.
CLI client
Linux / macOS
curl -fsSL https://hub.opencsg.com/csghub-lite/install.sh | sh
Pin a release version:
curl -fsSL https://hub.opencsg.com/csghub-lite/install.sh | CSGHUB_LITE_VERSION=v0.8.55 sh
Windows PowerShell
irm https://hub.opencsg.com/csghub-lite/install.ps1 | iex
From source
git clone https://github.com/opencsgs/csglite.git
cd csglite
make build
# Binary is at bin/csghub-lite
From GitHub Releases
Download the latest binary for your platform from the Releases page.
Docker
For Docker installation, see the Docker guide.
Quick Start
# Run a model — downloads, starts server, and chats (all automatic)
csghub-lite run Qwen/Qwen3-0.6B-GGUF
# Keep a model loaded until you stop it manually
csghub-lite run Qwen/Qwen3-0.6B-GGUF --keep-alive -1
# Search for models on CSGHub
csghub-lite search "qwen"
# Check running models (model stays loaded after exit)
csghub-lite ps
# Set CSGHub access token (optional, for private models)
csghub-lite login
Note: The install script automatically installs llama-server (required for inference). If you installed from source, install it separately: brew install llama.cpp (macOS) or download from llama.cpp releases.
LAN cluster
Machines on the same network can share one pool of compute. Give every machine
the same secret and they find each other; there is no separate create or join
step:
csghub-lite config set cluster_secret "a-long-shared-secret"
csghub-lite config set cluster_name "lab"
csghub-lite restart
The same values can be set at install time with CSGHUB_LITE_CLUSTER_SECRET
and CSGHUB_LITE_CLUSTER_NAME. The first machine to start creates the cluster;
later ones join when they see it. A request this machine cannot serve is
forwarded to a member that can, models are copied over the LAN instead of
downloaded again, and an address that changes on reboot is picked up
automatically. Two nodes work without a licence; more need a CSGLite Enterprise
licence. A machine with no secret stays a single node and opens no cluster
port.
Routing, model sync, join tokens, and admission codes are in the
cluster command reference.
Local Inference Capabilities
CSGLite can run several model families locally today, with more runtime
types planned. The model detail page shows whether a downloaded model is
currently supported for local inference.
| Capability |
Status |
Runtime |
Typical models |
| Text generation / chat |
Supported |
llama.cpp |
Qwen/Qwen3, GLM, Llama, Mistral, DeepSeek distilled GGUF models |
| Embeddings |
Supported |
llama.cpp |
BGE, GTE, E5, Sentence Transformers-compatible embedding models |
| Vision-language chat |
Supported |
llama.cpp multimodal |
Qwen2.5-VL, Gemma 3 / 4 vision, Idefics-style multimodal models |
| Text-to-image |
Supported |
Diffusers runtime; MLX on Apple Silicon |
Qwen-Image, Qwen-Image-2.1 MLX (including Turbo), FLUX, Stable Diffusion, PixArt, Sana, CogView, Z-Image, Kolors, Hunyuan |
| Image-to-image |
Supported |
Diffusers runtime; MLX on Apple Silicon for one reference image |
Qwen-Image-Edit, FLUX Kontext, inpaint, img2img, editing pipelines |
| Automatic speech recognition |
Supported |
Python ASR runtime |
FunASR, Whisper, Wav2Vec2-family ASR models |
| Text-to-speech |
Supported |
Python TTS runtime |
VoxCPM, Qwen3-TTS, Kokoro, MMS-TTS and other transformers-native TTS models |
| Realtime voice |
Supported |
Python ASR + TTS runtimes |
Full-duplex over WebRTC or WebSocket, OpenAI Realtime-compatible |
| Decisions |
Supported |
llama.cpp (decision LoRA or native head) |
JEV models such as autotrust/JEV-9B and its GGUF quantizations; native decision models such as convaiinnovations/laya; OpenAI Decisions API-compatible |
| Image-to-video |
Coming soon |
- |
Stable Video Diffusion, SV3D |
| Text-to-video |
Coming soon |
- |
Video generation Diffusers models |
Image models
Image requests use POST /ai-gateway/v1/images/generations and POST /ai-gateway/v1/images/edits.
NVIDIA, AMD, and CPU machines run Diffusers checkpoints. Apple Silicon uses
MFLUX for MLX Qwen-Image-2.1 checkpoints and Diffusers for the other image
families. Other MLX image checkpoints are unsupported on every platform,
including before download. The model library disables Run for any
downloaded model that cannot run locally.
| Model |
Runtime |
Notes |
Qwen/Qwen-Image, Qwen/Qwen-Image-2512 |
Diffusers |
Text-to-image |
Qwen/Qwen-Image-Edit, Qwen/Qwen-Image-Edit-2511 |
Diffusers |
Image editing, including multi-image edits |
mlx-community/Qwen-Image-2.1-MLX-4bit |
MFLUX on Apple Silicon |
Text-to-image and one reference image, 40 steps by default. Runs on a 16 GB Mac: about 4 minutes for 1024x1024. Python 3.10 or newer. n=1 only |
OsaurusAI/Qwen-Image-2.1-Turbo-mflux-4bit and other mflux-saved Qwen-Image-2.1 bundles |
MFLUX on Apple Silicon |
Turbo is the 8-step distilled checkpoint, sampled on the fixed sigma grid in its model_index.json; the steps request field is ignored. About 70 seconds for 1024x1024 on a 16 GB Mac. Weights are under the Qwen Research License (non-commercial) |
| FLUX, Stable Diffusion, Stable Cascade, PixArt, Sana, CogView, Z-Image, Kolors, Hunyuan, Kandinsky, Lumina, AuraFlow, GLM-Image, Ovis-Image |
Diffusers |
Text-to-image when model_index.json names that pipeline |
| FLUX Kontext, Stable Diffusion img2img and inpaint |
Diffusers |
Image-to-image and editing |
GGUF image models such as unsloth/Qwen-Image-2.1-Turbo-GGUF |
Not supported |
A GGUF image file holds only the denoiser and needs a separate VAE and text encoder. Download a Diffusers or MLX version of the model instead |
Text-to-speech models
Speech synthesis runs in its own Python runtime, never through llama.cpp: the
vocoder or codec decoder that turns model output into a waveform only exists in
the model's own inference stack. Synthesize with POST /ai-gateway/v1/audio/speech, or
select a text-to-speech model in Chat and send text to hear it.
| Model |
Size |
Voices |
Notes |
openbmb/VoxCPM2 |
4.6 GB |
Reference-audio cloning |
Streams natively; the audio VAE ships with the model |
Qwen/Qwen3-TTS-12Hz-0.6B-CustomVoice |
2.3 GB |
9 presets, 5 Chinese incl. Beijing and Sichuan |
Codec ships with the model |
hexgrad/Kokoro-82M |
327 MB |
54 presets, 8 Chinese |
Smallest option |
facebook/mms-tts-eng |
145 MB |
Single speaker |
Same code path serves the MMS family across many languages |
GET /api/tts-voices?model=<id> lists what a given model can render, since
voices differ per model rather than being a fixed set. The transformers-native
path also covers SpeechT5, Bark, ParlerTTS, CSM, Dia and FastSpeech2 models.
Realtime voice
Full-duplex speech, compatible with the OpenAI Realtime API and served by the
same recognition and synthesis runtimes:
| Transport |
Endpoint |
Audio |
| WebRTC |
POST /ai-gateway/v1/realtime/calls (SDP offer in, SDP answer out) |
Media tracks: Opus in, PCMU out; events on the oai-events DataChannel |
| WebSocket |
GET /ai-gateway/v1/realtime |
Base64 PCM16 in input_audio_buffer.append and response.output_audio.delta |
GET /ai-gateway/v1/realtime/transcription opens a recognition-only session. Recognition
streams partial transcripts as you speak, synthesis starts playing before the
sentence is finished, and response.cancel stops playback for barge-in. Set
defaults and limits in the realtime section of config.json
(default_asr_model, default_tts_model, max_sessions, and the ICE options
for a deployment that has to pin its media ports). The protocol and the
measured latencies are in
docs/guides/realtime-audio-api.md.
Decisions
CSGLite implements the OpenAI Decisions API,
POST /ai-gateway/v1/decisions, for local decision models: JEV models tagged jev or
typed-decisions (for example autotrust/JEV-9B and its GGUF quantizations)
and native decision models whose head llama.cpp runs directly (for example
convaiinnovations/laya and laya-typed-decisions). A request shares one
input across up to 200 questions and returns calibrated probabilities instead
of generated text:
| Question type |
Use it to |
Main result |
predicate |
check whether a condition is true |
probability |