Skip to main content

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

# One-liner (macOS / Linux)
curl -fsSL https://your-droplet/install.sh | bash

# Or via pip
pip install tq-serve
tq install

Quick Start

tq doctor                        # Verify setup
tq list                          # List local GGUF models
tq search "qwen2.5 coder 7b"    # Search HuggingFace
tq download bartowski/Qwen2.5-Coder-7B-Instruct-GGUF
tq serve 1                       # Launch with auto-configured TurboQuant

How It Works

tq serve automatically:

  1. Detects your hardware (GPU, RAM)
  2. Parses model metadata (quant type, layers, context length)
  3. Calculates optimal TurboQuant cache settings
  4. 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
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
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) or Linux (x86_64 with NVIDIA/AMD GPU)
  • ~2GB free RAM minimum (depends on model)

Project details


Download files

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

Source Distribution

tq_serve-0.4.8.tar.gz (45.1 kB view details)

Uploaded Source

Built Distribution

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

tq_serve-0.4.8-py3-none-any.whl (46.7 kB view details)

Uploaded Python 3

File details

Details for the file tq_serve-0.4.8.tar.gz.

File metadata

  • Download URL: tq_serve-0.4.8.tar.gz
  • Upload date:
  • Size: 45.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for tq_serve-0.4.8.tar.gz
Algorithm Hash digest
SHA256 27c476ff2d19408a4f7bd5ad813b69c6c802f8dc64842bb0673674f6bac1dc28
MD5 953b71b889be367ed440a57aadba2393
BLAKE2b-256 a89025e9380b928d667870242e01164f69b6f2bb6ad8d01aa3625455fbd0b54c

See more details on using hashes here.

File details

Details for the file tq_serve-0.4.8-py3-none-any.whl.

File metadata

  • Download URL: tq_serve-0.4.8-py3-none-any.whl
  • Upload date:
  • Size: 46.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for tq_serve-0.4.8-py3-none-any.whl
Algorithm Hash digest
SHA256 2e5db1352e244267c21e2e7689269ad8c9c53ba4cecdcf030a66def8bcb5da4f
MD5 ae899daea4526cda72b7c4049a1b02e4
BLAKE2b-256 69b23953645e5f6068c9c5bfe23eaa8be8bc6cd4efe8e43fd7732d0a9498ee72

See more details on using hashes here.

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