Why Your LLM Prompt Costs More Tokens Than Expected
See how whitespace, punctuation, numbers, code and multilingual text shift token counts, with before/after examples and cheaper prompt formatting tips.
Read the guide
Deep dives between the course and the docs: each guide explains one decision you will actually have to make, with the trade-offs spelled out.
See how whitespace, punctuation, numbers, code and multilingual text shift token counts, with before/after examples and cheaper prompt formatting tips.
Read the guide
RAG or fine-tuning? Use a simple decision framework to pick the right approach for knowledge, style and cost, with trade-offs and a worked LoRA example.
Read the guide
How much VRAM does a local LLM need? Learn the weights-plus-KV-cache formula, what 4-bit quantization saves, and which GPU fits Llama 3 8B or 70B.
Read the guide
Learn the dot product, L1 and L2 norms with worked examples, and see when ML uses each for loss, regularization and similarity. No heavy math required.
Read the guide
Learn how to price an AI feature: estimate LLM cost per request and per user, set usage limits, and protect gross margin with a simple worked example.
Read the guide
Why full fine-tuning needs about 16 bytes per parameter: weights, gradients and Adam states. Compare it to LoRA and QLoRA with a worked 7B example.
Read the guide
Use the KV cache size formula to see why long context eats VRAM. Worked numbers for Llama 3 8B and 70B, plus ways to shrink the cache and serve more users.
Read the guide
Prompt caching and batch APIs can cut LLM bills sharply. See how cached input and batch discounts work, with a worked cost example and checklist.
Read the guide
Turkish, Chinese and Arabic often use more tokens than English for the same meaning. Learn why, how to measure the gap, and how it changes your API bill.
Read the guide
Learn how to count tokens across a full multi-turn chat, including per-message overhead and role tags, with a worked 3-message example and a budgeting checklist.
Read the guide
Compare GPT-4o mini, Claude Haiku and Gemini Flash on token pricing, context handling and real workload costs, with a practical calculator walkthrough.
Read the guide
A practical breakdown of DeepSeek API pricing, cache hits, and output costs, with a calculator walkthrough to see when it is truly cheaper.
Read the guide