Tips & Tricks
Topic · 28 posts
- API Pricing 9
- llama.cpp 9
- Prompt Caching 9
- Local LLM 6
- Reasoning Effort 6
- Local AI 5
- Ollama 5
- GGUF 4
- OpenAI API 4
- OpenRouter 4
Practical tips and tricks for AI models: prompting, settings, local model tuning, API cost-cutting and agent workflows.
Popular picks: 7 Ollama settings for faster local models, using a cheap model as a subagent, getting reliable JSON with structured outputs and token counting to avoid surprise API bills.
-

Run Big MoE Models on a Small GPU: llama.cpp CPU Expert Offload and the New MoE Cache
Keep MoE experts in system RAM with -cmoe or -ncmoe, then use llama.cpp v1.0’s MoE cache and tuning script to get decode speed back.
-

How to Use a Local LLM as an OpenAI-Compatible API (Ollama, LM Studio, llama-server)
Point any OpenAI SDK or tool at a model on your own machine: base URLs and ports for Ollama, LM Studio and llama-server, what…
-

LLM Sampling Settings Explained: Temperature, top_p, top_k and min_p for Local Models
What temperature, top_k, top_p, min_p and repeat penalties actually do, the defaults in llama.cpp and Ollama, and a simple order for tuning them.
-

How Much VRAM Do You Need to Run a Local LLM? Weights, KV Cache and a Quick Formula
Add up three numbers (weights, KV cache, overhead) to know if a model fits your GPU. Charts of Gemma 4 and Qwen3.8 sizes vs…
-

How to Evaluate a Local LLM on Your Own Tasks (A Short, Repeatable Method)
Build a small, versioned set of your own tasks, freeze the runner and the quant, and grade with a written rubric. Public leaderboards are…
-

Token Counting and Context Budgets: How to Avoid a Surprise API Bill
Count tokens with the official tokenizer, include tools, thinking and retrieved documents, and watch price steps such as Haiku 5.5’s 100k-prompt band and Luna’s…
-

How to Use a Cheap Model as a Subagent (Without Making the Bill Worse)
Let a frontier model plan and send narrow lookups to Haiku 5.5 or GPT-6 Luna at $0.10/$0.50. Keep the child brief short, use a…
-

Structured Outputs: How to Get Reliable JSON from APIs and Local Models
Use a JSON Schema (or a Pydantic model) so the API has to return a shape your code can parse, and still validate refusals,…