{
 "schema_version": 1,
 "generated": "2026-11-09",
 "id": "lostruins-koboldcpp--tune-gpu-offload-and-context-with-koboldcpp",
 "repo": "LostRuins/koboldcpp",
 "repo_url": "https://github.com/LostRuins/koboldcpp",
 "repo_slug": "lostruins-koboldcpp",
 "title": "Fit a bigger model on your GPU with offload flags",
 "page_title": "How to fit a bigger model on your GPU with offload flags with Koboldcpp",
 "summary": "Use the command line flags to choose how many layers go to the GPU and how long the context is.",
 "who": "A local AI user whose model loads slowly or runs out of memory.",
 "problem": "Default settings may leave the GPU idle or overflow its memory on long chats.",
 "outcome": "A launch command tuned to your hardware, with vision support if you add an mmproj file.",
 "steps": [
  "List every option with `./koboldcpp-linux-x64 --help`",
  "Set GPU offload with `--gpulayers N` and the context length with `--contextsize N`",
  "Add `--mmproj /path/to/mmproj.gguf` next to a compatible vision model for image understanding",
  "On Apple silicon built from source, run `python3 koboldcpp.py --model /path/to/model.gguf --gpulayers -1`"
 ],
 "agent_prompt": "Using LostRuins/koboldcpp, run `./koboldcpp-linux-x64 --help`, then launch <my model> with a `--gpulayers N` value and a `--contextsize N` value that fit <my GPU memory>, and report load time and whether it stayed in memory.",
 "agents": [
  "claude-code",
  "codex",
  "cursor",
  "gemini-cli"
 ],
 "difficulty": "Intermediate",
 "time": "1 hour",
 "basis": "readme",
 "caveat": "A dedicated GPU is optional; if the binaries do not run on your hardware the README points to building from source.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "",
 "requirements": [
  "The KoboldCpp executable for Windows, Linux or macOS from the latest release (no installation required)",
  "A GGUF text model downloaded separately, for example from Hugging Face",
  "Optional: a GPU for offloading layers; the model size and context length decide how much memory you need"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/lostruins-koboldcpp/tune-gpu-offload-and-context-with-koboldcpp/",
 "md": "https://dedupedai.com/use-cases/lostruins-koboldcpp/tune-gpu-offload-and-context-with-koboldcpp/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/lostruins-koboldcpp--tune-gpu-offload-and-context-with-koboldcpp.json",
 "api_version": "v1"
}
