llama-slot-pinning

Configure llama-server slot pinning to persist KV caches across restarts.

Updated Apr 19, 2026
One-click install
npx skills add https://github.com/crycriM/hermes-skills --skill llama-slot-pinning
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: llama-slot-pinning
Source: https://github.com/crycriM/hermes-skills/tree/main/mlops/llama-slot-pinning
Command: npx skills add https://github.com/crycriM/hermes-skills --skill llama-slot-pinning

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a reproducible setup for configuring the llama-server with slot pinning to persist prompt KV caches across restarts, enabling stable performance in multi-model deployments.

Core Features & Use Cases

  • Enables per-model slot isolation by allocating dedicated slots and independent save paths to prevent cross-model cache contamination.
  • Supports saving, restoring, and erasing slot states to preserve prompt context across restarts and deployments.
  • Provides guidance for running multiple server instances on different ports with consistent slot management.

Quick Start

Launch the llama-server with a chosen parallel slot count and a slot-save-path, then verify the available slots via the /slots endpoint.

Frequently Asked Questions about llama-slot-pinning

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I persist KV caches across llama-server restarts?

To persist KV caches across llama-server restarts, configure slot pinning by launching the server with a designated slot-save-path and verifying available slots via the /slots endpoint. This setup preserves prompt context and enables stable performance in multi-model deployments.

What is slot pinning and when do I need it for multi-model deployments?

Slot pinning is a configuration technique that allocates dedicated slots and independent save paths to prevent cross-model cache contamination. You need it for multi-model deployments where each model requires separate slots to maintain stable performance and preserve prompt context across restarts.

Can I run multiple llama-server instances with separate slot management?

Yes, you can run multiple llama-server instances on different ports with consistent slot management by configuring each instance with its own dedicated slots and independent save paths. This approach ensures per-model slot isolation and prevents cross-model cache contamination.

Do I need specific settings to configure llama-server for slot pinning?

Yes, configuring llama-server for slot pinning requires a server build with KV-cache support, a writable slot-save-path directory, and appropriate --parallel and --ctx-size settings to allocate the correct number of slots and context window sizes for your models.

Why does cross-model cache contamination happen in llama-server?

Cross-model cache contamination happens when multiple models share the same slots without isolation, causing prompt context overwrites. Configuring per-model slot isolation with dedicated slots and independent save paths prevents this contamination in multi-model deployments.