TurboQuant model server manager — auto-configured llama-server with KV cache compression
Project description
tq — TurboQuant Model Server Manager
Auto-configured llama-server with KV cache compression.
Install
# macOS (Apple Silicon) — one-liner
curl -fsSL https://raw.githubusercontent.com/xt8086/tq/main/install.sh | bash
Note:
tq-serveis a pure Python package — it does NOT include thellama-serverbinary. The binary comes from TheTom/llama-cpp-turboquant, a fork of llama.cpp with TurboQuant KV cache compression built in.tq install(run automatically by the installer) downloads the correct binary for your platform (macOS Metal).Currently macOS Apple Silicon only. Windows and Linux support coming soon.
Quick Start
tq doctor # Verify setup
tq list # List local GGUF models
tq search "qwen2.5 coder 7b" # Search HuggingFace (numbered, pick # to download)
tq serve 1 # Launch with auto-configured TurboQuant
tq chat # Interactive coding agent
How It Works
tq serve automatically:
- Detects your hardware (GPU, RAM)
- Parses model metadata (quant type, layers, context length)
- Calculates optimal TurboQuant cache settings
- Launches llama-server with the right flags
Example: A Q4_K_M model on Apple M1 with 8GB RAM gets:
ctk=q8_0(protect K cache)ctv=turbo4(compress V cache 3.8x)- Context capped to safe memory limit
- Idle auto-stop after 5 min
Commands
| Command | Description |
|---|---|
tq list |
List local GGUF models |
tq search <query> |
Search HuggingFace for GGUF models (numbered, with download prompt) |
tq download <model> |
Download a model from HuggingFace |
tq remove <model> |
Remove a downloaded model |
tq serve <model> |
Launch with auto TurboQuant config |
tq serve 1 |
Serve by list number |
tq serve 1 --dry-run |
Show command without running |
tq status |
Check if server is running |
tq stop |
Stop the server |
tq logs |
View server logs |
tq validate <model> |
Pre-flight check |
tq install |
Download TurboQuant+ binary (from TheTom/llama-cpp-turboquant) |
tq doctor |
Verify setup |
tq config show |
Show/edit configuration |
tq chat |
Interactive coding agent (local AI) |
API
The server exposes an OpenAI-compatible API:
POST http://127.0.0.1:8080/v1/chat/completions
No auth needed. Works with any OpenAI client:
from openai import OpenAI
client = OpenAI(base_url="http://127.0.0.1:8080/v1", api_key="not-needed")
response = client.chat.completions.create(
model="your-model.gguf",
messages=[{"role": "user", "content": "Hello"}]
)
Configuration
Config stored at ~/.tq/config.toml:
tq config show # Show all settings
tq config set port 9090 # Change port
tq config set idle_timeout 600 # 10 min idle timeout (0 to disable)
TurboQuant Cache Types
| Type | Bits | Compression | Use Case |
|---|---|---|---|
| f16 | 16 | 1x | No compression (baseline) |
| q8_0 | 8 | 2x | Safe for K cache |
| turbo4 | 4.25 | 3.8x | Best quality/compression for V |
| turbo3 | 3.25 | 4.9x | Aggressive, for large models |
Requirements
- Python 3.10+
- macOS (Apple Silicon)
- ~2GB free RAM minimum (depends on model)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tq_serve-0.4.23.tar.gz.
File metadata
- Download URL: tq_serve-0.4.23.tar.gz
- Upload date:
- Size: 47.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43acfb7be81dec373662f62d814db314a6f6dbd25282c3551fe2b9f4aacf8295
|
|
| MD5 |
5f8beab73423556de208558d47986457
|
|
| BLAKE2b-256 |
e08e299ac0b39d9f2343500103d75f6d4df77da8efc7fb04b87d616b17e72d7b
|
File details
Details for the file tq_serve-0.4.23-py3-none-any.whl.
File metadata
- Download URL: tq_serve-0.4.23-py3-none-any.whl
- Upload date:
- Size: 49.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e895ec2a060db47cb1e6859a9544b06e3522fd7d3bc83d54fbdd24a40464489d
|
|
| MD5 |
bb73fdbf9864362c094eb12b4c72718a
|
|
| BLAKE2b-256 |
da9a2e1d3aba6ef9fbf2d085293a2cfd913231f312ee9a4a67bea972eb859e6c
|