DocsAdvanced TopicsPerformance Optimization

Performance Optimization

Local inference speed is mostly hardware and model size. These are the levers that actually move it.

Levers, in Order of Impact

  • Model size / quantization — a smaller or more-quantized model is the single biggest speedup, at some quality cost.
  • GPU offload — if you have a compatible GPU, make sure the model is using it rather than CPU only.
  • One big model at a time — unload models you are not using; swapping destroys throughput.
  • Context length — very long sessions cost memory and time on every generation. Start a fresh session for a new task.