Skip to main content

KoboldCpp: Local LLM Inference for Creative Writing & Roleplay

KoboldCpp is a single-file LLM inference tool built on llama.cpp and purpose-built for creative writing and roleplay. It ships with World Info, Memory, and Author's Note features for long-form storytelling, integrates natively with SillyTavern, and runs anywhere llama.cpp does — all in one portable executable.

✓ World Info + Memory for long-form writing ✓ SillyTavern-compatible (KoboldAI API) ✓ Single portable executable ✓ GPU support (CUDA, Metal, Vulkan)
Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →

Installation & Quick Start

KoboldCpp is distributed as a single executable file — no installation required. Download the right binary for your platform from GitHub Releases:

# Download from: https://github.com/LostRuins/koboldcpp/releases

# Windows (NVIDIA GPU)
# Download: koboldcpp_cu12.exe (CUDA 12) or koboldcpp_cu11.exe (CUDA 11)

# Windows (CPU only)
# Download: koboldcpp.exe

# macOS (Apple Silicon)
# Download: koboldcpp-mac-arm64

# Linux (CPU + CUDA)
# Download: koboldcpp-linux-x64 or koboldcpp-linux-x64-cuda1150

# Run with the GUI launcher (recommended for beginners):
./koboldcpp.exe  # Opens a configuration GUI

# Run headless with command line:
./koboldcpp.exe \
  --model /path/to/model.gguf \
  --contextsize 8192 \
  --gpulayers 35 \
  --port 5001

# Access the web UI at http://localhost:5001
# KoboldAI API at http://localhost:5001/api/v1
# OpenAI API at http://localhost:5001/v1

World Info, Memory & Author's Note

These three features are what make KoboldCpp uniquely powerful for long-form creative writing and roleplay:

# MEMORY (always-on context block)
# Text always included at the start of the model's context
# Use for: setting, rules, character descriptions, writing style notes
# Example Memory entry:
# "Setting: A cyberpunk city in 2157. Technology is advanced but society
#  is stratified. The protagonist is a hacker named Yara, 28, cynical
#  but idealistic. Writing style: noir, present tense, first person."

# AUTHOR'S NOTE (injected near the end of context)
# Guides the model's immediate output style
# Example: "[Write in the style of Philip K. Dick. Build tension slowly.]"
# Position: 3 (default) = inject 3 turns from the bottom of context

# WORLD INFO (keyword-triggered dynamic injection)
# Each entry has: title, content, trigger keywords, priority
# Example entries:
# Title: Yara's Apartment
# Content: "Yara lives in a cramped 200 sq ft pod in sector 7.
#            Her walls are covered in hacked display panels."
# Triggers: "apartment, home, pod, sector 7"
# → Injected automatically when these words appear in conversation

# Title: Nexus Corp
# Content: "Nexus Corp is the megacorporation controlling water and power.
#            CEO: Director Chen. Known for human experimentation."
# Triggers: "nexus, corporation, nexus corp, director chen"

SillyTavern Integration

SillyTavern is the most popular character-based roleplay frontend. It connects to KoboldCpp's API to handle all inference while SillyTavern manages characters, personas, and UI:

# 1. Start KoboldCpp with your model:
./koboldcpp.exe --model mymodel.gguf --contextsize 8192 --gpulayers 35

# 2. Install SillyTavern:
git clone https://github.com/SillyTavern/SillyTavern
cd SillyTavern
npm install
node server.js

# 3. Connect SillyTavern to KoboldCpp:
# Open SillyTavern at http://localhost:8000
# Click the API icon (top bar)
# Select "KoboldAI" as the API type
# Enter: http://localhost:5001
# Click "Test Connection" — should show green

# 4. Key SillyTavern features with KoboldCpp:
# - Character cards (PNG with embedded JSON)
# - Persona management (your character)
# - World info editor (syncs with KoboldCpp)
# - Lorebooks (additional world info)
# - Prompt templates (Alpaca, ChatML, Llama3, etc.)
# - Chat export and import

# Character cards: https://chub.ai (largest library)

KoboldCpp vs text-generation-webui

Feature KoboldCpp text-gen-webui
World Info / MemoryNative, built-inVia extensions
SillyTavern APINative KoboldAI APIVia extension
Model formatsGGUF onlyGGUF, GPTQ, AWQ, EXL2
InstallationSingle executableScript installer
Creative writing featuresExcellentBasic
Model format varietyGGUF focusedAll formats
Best forRoleplay, SillyTavern, storiesGeneral power users

Frequently Asked Questions

What is KoboldCpp?▼

KoboldCpp is a local LLM inference tool built on llama.cpp and specifically optimized for creative writing, roleplay, and interactive fiction. It exposes the KoboldAI API (used by SillyTavern and other frontends) alongside an OpenAI-compatible API, supports special memory and world info features for long-form writing, and runs as a single portable executable — no installation required.

What makes KoboldCpp better for creative writing than Ollama?▼

KoboldCpp includes features specifically for creative writing: (1) Author's Note — inject context at any position in the prompt to guide the narrative; (2) World Info — a knowledge base that auto-injects relevant context when trigger keywords appear; (3) Memory — a persistent block of text always included in the context; (4) Story mode with proper novel formatting; (5) Configurable sampler ordering (Typical P, Mirostat, etc.) that gives more natural, creative text.

How do I use KoboldCpp with SillyTavern?▼

SillyTavern is the most popular character roleplay frontend that connects to KoboldCpp. Start KoboldCpp with your model, note the URL and port (default: http://localhost:5001). In SillyTavern, go to API Connections > KoboldAI and enter the URL. SillyTavern handles character cards, persona management, and chat UI while KoboldCpp handles inference. This is the most feature-rich local AI roleplay setup available.

What GGUF models work best with KoboldCpp for creative writing?▼

Models fine-tuned for roleplay and creative writing perform significantly better than base instruct models. Top choices in 2026: MythoMax 13B (general creative writing), Noromaid 20B (character roleplay), Airoboros 70B (story generation, requires 48+ GB RAM), Fimbulvetr 11B (balanced creative/instruct). Look for models tagged 'roleplay', 'creative writing', or 'storytelling' on HuggingFace.

What is World Info in KoboldCpp?▼

World Info is a dynamic context injection system. You define entries with a title, content, and trigger keywords. When a trigger keyword appears in the recent conversation history, that World Info entry is automatically injected into the model's context. This lets you define characters, locations, lore, and rules that the model references without you manually repeating them. Essential for long-running stories and complex roleplay scenarios.

KoboldCpp vs text-generation-webui for creative writing?▼

Both support GGUF models via llama.cpp. KoboldCpp wins for creative writing because of its native World Info, Memory, Author's Note features and its KoboldAI API compatibility (required by SillyTavern and KoboldAI Lite). text-generation-webui has more model format options (GPTQ, AWQ, EXL2) and extensions, but its creative writing support is mostly through third-party extensions. For roleplay with SillyTavern, KoboldCpp is the clear choice.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

AI Hallucination Detector AI Safety Checklist Generator CrewAI Agent Config Generator AI Model Comparator AI Model Comparison Tool Jotai Atom Explorer LLM Cost Calculator CSS Container Query Builder LLM Context Window Calculator AI Prompt Cost Calculator LLM JSON Schema Builder AI Agent Run Cost Tracker AI Pipeline DAG Builder LLM Benchmark Calculator Prompt Injection Tester LangChain PromptTemplate Builder AI Token Cost Calculator MySQL Query Explainer PostgreSQL EXPLAIN Analyzer AI Model Benchmark Comparator Cron Expression Explainer Font Pairing Preview LLM Prompt Cost Calculator AI Model Context Window Visualizer OpenAI Prompt Tester AI Rate Limit Calculator LLM System Prompt Analyzer Vibe Coding Prompt Optimizer AI IDE Comparator Token Counter & Cost Estimator AI Model Comparison Table RAG Chunk Size Optimizer LLM Prompt Template Builder AI Commit Message Generator AI Doc Generator — Pro Tool AI Regex Explainer — Pro Tool AI System Guardian Mermaid Diagram Generator Elasticsearch Query Tester mTLS Certificate Chain Builder Prompt Token Estimator JS Prototype Chain Visualizer OpenAI Token Counter System Prompt Builder AI Agent Memory Planner Token Context Calculator LLM Prompt Caching Calculator Multi-Agent Orchestration Planner AI Prompt Token Estimator OpenAI Function Calling Generator AI Context Window Visualizer Embedding Storage Calculator AI API Rate Limit Calculator HTTP Headers Analyzer AI Code Review — Pro Tool AI Error Explainer — Pro Tool AI SQL Builder — Pro Tool AI Unit Test Generator — Pro Tool Color Palette Generator Docker Compose Generator JWT Decoder Prompt Template Builder Regex Tester RSA Key Pair Generator SMTP Server Tester Biome Config Generator Terraform Variable Validator Haproxy Config Validator SBOM Generator AI Variable Namer AI PR Description Generator AI JSDoc Generator K8s Resource Limits Calculator Regex Flags Explainer LLM Token Counter OAuth2 Flow Visualizer Playwright E2E Testing Guide Core Web Vitals Calculator RAG Chunking Calculator Solana Program ID Generator Multi-Chain Wallet Address Validator RAG Chunking Calculator TypeScript Discriminated Union Builder Core Web Vitals Budget Calculator JWT Decoder & Validator Blockchain Transaction Fee Calculator Database Query Cost Analyzer

Related Articles

Apr 2, 2026 · 11 min read

LLM Observability Tools 2026: OpenTelemetry, Langfuse, Arize Phoenix Compared

Compare LLM observability tools for 2026: Langfuse, Arize Phoenix, Helicone, LangSmith, and OpenTelemetry for LLMs. Tracing, evals, cost tracking, and self-hosting options.

Apr 2, 2026 · 13 min read

Prompt Engineering Techniques 2026: Chain-of-Thought, RAG, and Advanced Patterns

Advanced prompt engineering guide for 2026: Chain-of-Thought, Tree-of-Thought, RAG integration, few-shot learning, prompt chaining, and evaluation techniques.

Apr 1, 2026 · 11 min read

LLM Observability 2026: LangSmith vs Helicone vs Arize Phoenix Compared

Complete guide to LLM observability platforms in 2026. Compare LangSmith, Helicone, and Arize Phoenix for tracing, evaluation, cost tracking, and debugging AI applications in production.

Apr 1, 2026 · 13 min read

Prompt Engineering Techniques 2026: Chain-of-Thought, Few-Shot, and RAG Patterns

Master practical prompt engineering in 2026. Learn chain-of-thought prompting, few-shot examples, RAG integration patterns, and advanced techniques like tree-of-thought and self-consistency with real code examples.

Apr 1, 2026 · 14 min read

AI Observability in 2026: How to Monitor, Debug, and Improve LLM Applications

A comprehensive guide to AI observability for LLM applications: key metrics, tool comparisons (Langfuse, Helicone, Arize Phoenix, LangSmith), tracing code examples, evaluation frameworks, and production best practices for debugging and cost control.

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →