Skip to content

feat: 8sync gguf serve --balance -- model-aware auto-tuning #2

Description

@8syncdev

Summary

Added --balance mode to 8sync gguf serve that selects optimal llama-server config from live hardware state.

How it works

  1. Reads model file size to estimate bytes per layer
  2. Queries live VRAM free + GPU temperature via nvidia-smi
  3. Calculates max GPU layers that fit while leaving 300 MiB headroom for CUDA overhead + KV cache
  4. Thermal guard: reduces GPU layers 20% if temp >= 75 C to keep the card cool and power-efficient
  5. Enables flash-attn only when all layers fit on GPU (required for cache-type-v quantization)
  6. Scales context size with available VRAM: 4K / 8K / 16K

Usage

# Auto-tune everything
8sync gguf serve --engine-path "C:\...\run" --model-path "C:\...\model.gguf" --balance

# Balance + override one param on top
8sync gguf serve ... --balance --ctx 16384 --gpu-layers 26

# View what balance would choose for your model right now
8sync gguf info --model-path "C:\...\model.gguf"

Per-param overrides (stack on any mode)

Flag Controls
--gpu-layers N GPU offload layers
--ctx N Context window tokens
--threads N CPU generation threads
--parallel N Concurrent request slots
--batch N Logical batch size

New commands added

  • 8sync gguf list — running servers with health [OK/LOADING/UNREACHABLE], tok/s from /metrics, GPU layers, mem, uptime
  • 8sync gguf info — hardware snapshot, mode comparison table, param reference, balance preview, running server config dump
  • 8sync gguf info --model-path <file> — shows what balance would compute for that model given current VRAM/temp

Commit

5dfea7e

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    configConfiguration file changesenhancementNew feature or requestos:windowsWindows-specific issue or fixperformancePerformance improvement or optimization

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions