How to reduce GPU memory usage when running local LLMs?

I’m interested in running large language models locally while keeping GPU memory consumption as low as possible without significantly affecting response quality.

I’ve been reading about several optimization techniques, including:

  • 4-bit and 8-bit model quantization.

  • Reducing context window size.

  • CPU and GPU memory offloading.

  • Optimizing inference with TensorRT-LLM.

  • Managing KV cache memory efficiently.

I’m particularly interested in running AI chatbot applications on consumer-grade NVIDIA GPUs with limited VRAM.

Which optimization techniques offer the best balance between inference speed, memory consumption, and response quality?

Also, is TensorRT-LLM worth considering for smaller models, or would a quantized model running through Ollama be sufficient?

I’d appreciate any technical suggestions or recommendations from developers working with local AI models.

Thanks for laying out the options so clearly. For a smaller chatbot model, starting with a 4-bit quantised version and a modest context window usually gives the biggest saving for the least loss in quality, in my reading. TensorRT-LLM can help, but it adds setup work, so it tends to make more sense once you have a model and workflow you want to keep. What size of model and context length are you aiming for? That would help narrow down which of these is likely to matter most.