Running locally
First ask whether to run locally at all: data that must stay on your machine and offline use are the strongest reasons. Many tiny calls are often given as a reason too, but hosted small tiers are already cheap, so price them with the Model & API Radar first. Once you decide to run locally, check in turn whether it fits, which model, which runtime, which settings and how fast; how the KV cache grows with context is covered in the How LLMs work group, in Attention Variants and KV-Cache Compression.