Skip to Content
Start

Tokenminning

Tokenminning is the deliberate practice of reducing large language model (LLM) token consumption while preserving useful output quality. Teams treat inference tokens as a finite resource and optimize where spend does not convert to measurable value.

Press coverage, job posts, and internal docs may say token minimizing — searches for that phrase describe the same practice. This wiki standardizes tokenminning as the engineering term for instrumented, attributed cost control: meter usage, attribute spend per feature, and enforce inference budgets in production.

It is the counter-move to tokenmaxxing: maximizing raw AI usage, often tracked on leaderboards by token volume rather than shipped outcomes. When inference bills caught up with that habit, tokenminning became standard engineering practice — meter first, then trim prompts, route models, and cap agent loops.

Read the full definition →

Where should you start?

Follow the branches — every endpoint links to a guide on this wiki.

Each branch optimizes for a different cost model: remove inference entirely · stretch subscription quota · trim per-token API spend.

View paths as plain text

  1. Remove AI entirely: Can you stop using AI? → Yes → Remove LLMs from your stack
  2. Subscription / IDE: Can you stop using AI? → No → How do you pay for tokens? → Subscription → Prompt hygieneIDE guidesWhere to start
  3. API billing: Can you stop using AI? → No → How do you pay for tokens? → API per-token → Metering firstModel routingPrompt hygienePrompt cachingContext compactionOutput and RAGSemantic cachingLocal inferenceSelf-hosting deep dives

What’s on this wiki

SectionTeaser
PracticeImplementation guides ordered by leverage — metering, prompt hygiene, model routing, caching, and context compression. Each guide includes expected savings ranges and anti-patterns. Start with Where to start.
ConstitutionEngineering law for production AI stacks — immutable metering, model routing rules, session caps, prompt lint rules, and CI blocks. Load-bearing guardrails, not style guides.
ManifestoThe philosophical case for treating inference as a scarce resource — why tokenmaxxing fails, what tokenminning advocates, and how unit economics should shape architecture.
ConceptsDefinitions for token economics — input vs output tokens, context inflation, model selection, and the full tokenminning definition.
Self-hostingWhen on-prem inference beats cloud APIs — GPU metering, workload fit, and deep dives on Ollama, vLLM, llama.cpp, TGI, and LocalAI.
IDEsPer-editor guides for Cursor, Copilot, Claude Code, Cline, and others — same optimization sequence, different controls for subscription vs API billing.

Docs are also available via MCP and llms.txt for agents and IDE tooling.

Last updated on