{"id":31985,"date":"2026-06-11T12:47:58","date_gmt":"2026-06-11T10:47:58","guid":{"rendered":"https:\/\/contabo.com\/blog\/?p=31985"},"modified":"2026-07-07T13:29:08","modified_gmt":"2026-07-07T11:29:08","slug":"how-to-run-llm-inference-on-a-gpu-vps-2026-guide","status":"publish","type":"post","link":"https:\/\/contabo.com\/blog\/how-to-run-llm-inference-on-a-gpu-vps-2026-guide\/","title":{"rendered":"How to Run LLM Inference on a GPU VPS (2026 Guide)"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"630\" src=\"https:\/\/contabo.com\/blog\/wp-content\/uploads\/2026\/07\/blog-head_how2-llm-inference.webp\" alt=\"How to Run LLM Inference on a GPU VPS (2026 Guide)\" class=\"wp-image-32014\" srcset=\"https:\/\/contabo.com\/blog\/wp-content\/uploads\/2026\/07\/blog-head_how2-llm-inference.webp 1200w, https:\/\/contabo.com\/blog\/wp-content\/uploads\/2026\/07\/blog-head_how2-llm-inference-600x315.webp 600w, https:\/\/contabo.com\/blog\/wp-content\/uploads\/2026\/07\/blog-head_how2-llm-inference-768x403.webp 768w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/figure>\n\n\n\n<p><strong>In short.<\/strong> Running LLM inference on a GPU VPS gives you a private model endpoint, full data sovereignty, and flat predictable cost instead of per-token billing. You need a GPU VPS with enough VRAM for your model, Ubuntu 22.04 or later, CUDA, and either Ollama or vLLM as the runtime. From order to first inference call takes about 15 to 30 minutes.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>Running your own inference gives you control that managed APIs don&#8217;t: the model runs on your hardware, and prompts and responses never leave your server. Cost works differently too. You pay a flat monthly rate whether you process a thousand tokens or a billion, with no per-token bill that climbs as usage grows. A managed API is fine for low-traffic prototyping, but it adds latency and ties you to a vendor&#8217;s uptime and pricing decisions. This guide deploys a working LLM endpoint on a GPU VPS from scratch.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-you-need-to-run-llm-inference\">What You Need to Run LLM Inference<\/h2>\n\n\n\n<p>Before provisioning the server, confirm you have the following:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>A GPU VPS with sufficient VRAM for your target model. Look for a plan with at least 48 GB VRAM to run 70B quantized models on a single card; for FP8 or FP16 70B inference, 80 GB or more is the practical requirement. The VRAM sizing table in the next section maps each configuration.<\/li>\n\n\n\n<li>Ubuntu 22.04 LTS or 24.04 LTS. All commands in this guide target Ubuntu. NVIDIA drivers and CUDA are typically pre-installed on Contabo server images.<\/li>\n\n\n\n<li>Root SSH access to the server.<\/li>\n\n\n\n<li>An LLM inference runtime: Ollama for fast single-user setup, or vLLM for production APIs with high concurrency. The comparison table later in this guide walks through the decision.<\/li>\n\n\n\n<li>Storage for model weights. A 7B model in FP16 takes about 14 GB on disk; a 70B model at Q4 quantization runs to around 40 GB. Contabo server plans include at least 1 TB of storage, which covers most model configurations.<\/li>\n<\/ol>\n\n\n\n<p>For a self-hosted AI inference server designed to run an LLM locally without external dependencies, all five requirements need to be confirmed before you begin.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-sizing-vram-for-your-model\">Sizing VRAM for Your Model<\/h2>\n\n\n\n<p>VRAM is the binding constraint. If the model does not fit in GPU memory, the runtime falls back to system RAM and inference slows substantially. Use this table to choose the right GPU for LLM inference before ordering a plan:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Model<\/th><th>Precision<\/th><th>Approx. VRAM<\/th><th>Min. GPU VRAM<\/th><\/tr><\/thead><tbody><tr><td>7B<\/td><td>FP16<\/td><td>~14 GB<\/td><td>24 GB<\/td><\/tr><tr><td>7B<\/td><td>Q4<\/td><td>~4 GB<\/td><td>8 GB<\/td><\/tr><tr><td>13B<\/td><td>FP16<\/td><td>~26 GB<\/td><td>32 GB<\/td><\/tr><tr><td>13B<\/td><td>Q4<\/td><td>~8 GB<\/td><td>16 GB<\/td><\/tr><tr><td>70B<\/td><td>Q4<\/td><td>~38 GB<\/td><td>48 GB<\/td><\/tr><tr><td>70B<\/td><td>FP8<\/td><td>~70 GB<\/td><td>80 GB<\/td><\/tr><tr><td>70B<\/td><td>FP16<\/td><td>~140 GB<\/td><td>141 GB<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Q4 quantization cuts VRAM by roughly 75% compared to FP16, with a modest accuracy trade-off that works for most LLM hosting and inference tasks. For FP8 or FP16 70B inference, look for a GPU with at least 80 GB VRAM on a single card.<\/p>\n\n\n\n<p>For most self host LLM deployments, a 48 GB GPU is the practical starting point. It handles any 70B quantized model and leaves room for multiple concurrent sessions. Step up to a larger card only if your workload requires unquantized accuracy or pushes context window limits.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-1-order-a-gpu-server\">Step 1: Order a GPU Server<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Provision a GPU server with enough VRAM for your target model. Use the sizing table in the previous section to confirm your requirement before ordering.<\/li>\n\n\n\n<li>Select your preferred operating system. All commands in this guide are tested on the latest Ubuntu distribution. Pick the region closest to your users and complete the order.<\/li>\n\n\n\n<li>SSH in as root:<br><code>ssh root@YOUR_SERVER_IP<\/code><\/li>\n\n\n\n<li>Confirm the GPU is present and the NVIDIA driver is loaded:<br><code>nvidia-smi<\/code><\/li>\n<\/ol>\n\n\n\n<p>A healthy output shows the installed GPU model name in the title row. The header line reports the driver and CUDA versions: for pre-Blackwell GPUs, expect driver 535.x or higher; for Blackwell and newer, 570.x or higher. CUDA 12.x or later is expected on both paths. If nvidia-smi returns &#8220;command not found&#8221;, the driver is not loaded.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-2-install-cuda-and-an-inference-runtime\">Step 2: Install CUDA and an Inference Runtime<\/h2>\n\n\n\n<p>The correct driver path depends on your GPU architecture. NVIDIA splits Linux GPU support into two tracks from Blackwell onwards:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Blackwell and newer:<\/strong> require the open GPU kernel module driver, available from version 570. An older proprietary driver will not work on Blackwell hardware.<\/li>\n\n\n\n<li><strong>Pre-Blackwell<\/strong> (Hopper, Ada Lovelace, Ampere, and earlier): use the traditional proprietary kernel module driver, available from version 535 onwards.<\/li>\n<\/ul>\n\n\n\n<p>Confirm the driver and CUDA are both available:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nvidia-smi\nnvcc --version<\/code><\/pre>\n\n\n\n<p>For pre-Blackwell GPUs, a healthy nvidia-smi reports a driver of 535.x or higher. For Blackwell and newer, expect 570.x or higher. If the wrong driver is installed for your architecture, or if nvcc returns &#8220;command not found&#8221;, install the correct version:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Blackwell and newer: open GPU kernel module path (driver 570+)\nsudo apt update &amp;&amp; sudo apt install -y nvidia-open\n\n# Pre-Blackwell: traditional proprietary path (if reinstallation is needed)\nsudo apt update &amp;&amp; sudo apt install -y nvidia-driver-535\n\n# CUDA toolkit (required by both paths if not already present)\nsudo apt update &amp;&amp; sudo apt install -y cuda-toolkit-12-4<\/code><\/pre>\n\n\n\n<p>With CUDA confirmed, choose your runtime.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-ollama\">Ollama<\/h3>\n\n\n\n<p>Ollama installs in one command and registers as a system service immediately:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -fsSL https:\/\/ollama.com\/install.sh | sh\nollama --version<\/code><\/pre>\n\n\n\n<p>For the automation angle, including wiring Ollama into n8n workflow tools, see <a href=\"https:\/\/contabo.com\/blog\/what-is-ollama-and-how-to-use-it-with-n8n\/\">What Is Ollama and How to Use It with n8n<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-vllm\">vLLM<\/h3>\n\n\n\n<p>vLLM requires Python 3.9 or later and CUDA 11.8 or later. Install via pip:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pip install vllm\npython -c \"import vllm; print(vllm.__version__)\"<\/code><\/pre>\n\n\n\n<p>vLLM also requires at least 8 GB of system RAM in addition to GPU VRAM. If you are working in a shared Python environment, set up a virtual environment first:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>python -m venv .venv &amp;&amp; source .venv\/bin\/activate\npip install vllm<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-3-serve-the-model-and-test-it\">Step 3: Serve the Model and Test It<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-ollama-0\">Ollama<\/h3>\n\n\n\n<p>Pull a model by name and test the local endpoint:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Download the model weights\nollama pull llama3.2:8b\n\n# Ollama starts as a service on port 11434 automatically\n# Send a synchronous test request\ncurl http:\/\/localhost:11434\/api\/generate \\\n-d '{\"model\":\"llama3.2:8b\",\"prompt\":\"What is 2+2?\",\"stream\":false}'<\/code><\/pre>\n\n\n\n<p>A successful response is a JSON object with a <code>response<\/code> field containing the model&#8217;s answer. That is your LLM inference endpoint running locally. To expose the server to other machines on your network, set <code>OLLAMA_HOST=0.0.0.0<\/code> before starting the service.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-vllm-0\">vLLM<\/h3>\n\n\n\n<p>Start the OpenAI-compatible API server and send a test completion:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Start the server\npython -m vllm.entrypoints.openai.api_server \\\n--model meta-llama\/Llama-3.2-8B-Instruct \\\n--host 0.0.0.0 --port 8000\n\n# Test\ncurl http:\/\/localhost:8000\/v1\/completions \\\n-H \"Content-Type: application\/json\" \\\n-d '{\"model\":\"meta-llama\/Llama-3.2-8B-Instruct\",\"prompt\":\"What is 2+2?\",\"max_tokens\":50}'<\/code><\/pre>\n\n\n\n<p>Llama 3 models on Hugging Face require accepting Meta&#8217;s license agreement before the download proceeds. Run <code>huggingface-cli login<\/code> and approve the terms at huggingface.co\/meta-llama first. Any OpenAI-compatible client can then point to <code>http:\/\/YOUR_SERVER_IP:8000\/v1<\/code> with no other code changes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-ollama-vs-vllm-which-runtime\">Ollama vs vLLM: Which Runtime?<\/h2>\n\n\n\n<p>The decision comes down to one variable: how many concurrent users will be hitting the endpoint?<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th><\/th><th>Ollama<\/th><th>vLLM<\/th><\/tr><\/thead><tbody><tr><td>Setup time<\/td><td>~2 min (single command)<\/td><td>10\u201320 min (pip + config)<\/td><\/tr><tr><td>Concurrent requests<\/td><td>Limited (sequential processing)<\/td><td>Production-grade (continuous batching)<\/td><\/tr><tr><td>Throughput<\/td><td>Moderate<\/td><td>High<\/td><\/tr><tr><td>Model management<\/td><td>Pull by name, auto-download<\/td><td>Manual Hugging Face download<\/td><\/tr><tr><td>API surface<\/td><td>OpenAI-compatible REST<\/td><td>OpenAI-compatible REST<\/td><\/tr><tr><td>Fine-tune support<\/td><td>No<\/td><td>Via separate tooling<\/td><\/tr><tr><td>Best for<\/td><td>Development, solo use, n8n workflows<\/td><td>Shared APIs, multi-user deployments<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Pick Ollama if you are building an internal tool or iterating solo, or any time you want an agent talking to a local model with minimal setup. You go from install to first inference call in about two minutes, with no configuration to manage. The OpenAI-compatible API also means your client code does not need to know the difference.<\/p>\n\n\n\n<p>Pick vLLM when you are running a shared API endpoint across a team or serving a production application with concurrent traffic. Its PagedAttention algorithm handles the memory management that makes high-concurrency inference possible, at the cost of a more involved initial setup. Since both runtimes expose the same OpenAI-compatible API surface, migrating from Ollama to vLLM later is a single base-URL change in your client configuration.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-faq-llm-inference-on-a-gpu-vps\">FAQ: LLM Inference on a GPU VPS<\/h2>\n\n\n\n<div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1\"><strong class=\"schema-faq-question\">How much VRAM do I need to run a 70B model?<\/strong> <p class=\"schema-faq-answer\">A 70B model in FP16 needs roughly 140 GB VRAM on a single card. Quantize to Q4 and that drops to about 38\u201340 GB, which a 48 GB GPU handles comfortably. FP8 needs around 70 GB, so look for a card with at least 80 GB. For most inference tasks, Q4 is the starting point: a small accuracy trade-off for a large VRAM saving.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-2\"><strong class=\"schema-faq-question\">Should I use Ollama or vLLM for inference?<\/strong> <p class=\"schema-faq-answer\">Use Ollama for development, solo use, or n8n integrations: one command installs and starts it, and it manages models by name. Use vLLM for shared APIs with concurrent users. Its PagedAttention and continuous batching handle production loads that would bottleneck Ollama. Both expose an OpenAI-compatible REST API, so switching later is a single base-URL change in your client code.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-3\"><strong class=\"schema-faq-question\">Is self-hosting an LLM cheaper than using an API?<\/strong> <p class=\"schema-faq-answer\">At low volume, managed APIs are cheaper because you pay only for what you use. At scale, a flat monthly GPU server rate wins. Teams running several hundred million tokens per day consistently find that self-hosting costs less over time. Self-hosting also removes vendor price-change risk: your monthly cost stays fixed even if your usage doubles or an API provider changes its pricing.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-4\"><strong class=\"schema-faq-question\">Can I fine-tune a model on the same GPU server?<\/strong> <p class=\"schema-faq-answer\">Yes, with the right tooling. Ollama handles inference only; for fine-tuning an LLM, you need a framework like Axolotl or Hugging Face Transformers. A GPU with 80 GB or more VRAM gives comfortable headroom for LoRA fine-tuning 7B to 13B models. The same GPU server handles fine-tuning runs; budget extra storage for checkpoints and adapter weights.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-5\"><strong class=\"schema-faq-question\">What GPU is best for LLM inference?<\/strong> <p class=\"schema-faq-answer\">For most GPU for AI inference workloads, a 48 GB GPU is the practical choice: it runs any 70B quantized model on a single card. For FP8 or FP16 70B inference, look for a plan with 80 GB or more VRAM. For full FP16 70B or very large context windows, a 141 GB single-card plan is the clean solution.<\/p> <\/div> <\/div>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to run LLM inference on a GPU VPS from scratch. This guide covers VRAM sizing, CUDA setup, and choosing between Ollama and vLLM to deploy a private, cost-efficient AI inference endpoint.<\/p>\n","protected":false},"author":63,"featured_media":32014,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":"","_members_access_role":[],"_members_access_error":""},"categories":[18],"tags":[3439,2580,4298,1909,4488,4487,4287,3736,4468,3396,3321,4288,3315],"ppma_author":[1492],"class_list":["post-31985","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-ai-workloads","tag-artificial-intelligence","tag-gguf","tag-gpu","tag-gpu-server","tag-gpu-vps","tag-llama-cpp","tag-llm","tag-llm-api","tag-llm-applications","tag-llm-deployment","tag-local-llm","tag-local-llm-hosting"],"uagb_featured_image_src":{"full":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2026\/07\/blog-head_how2-llm-inference.webp",1200,630,false],"thumbnail":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2026\/07\/blog-head_how2-llm-inference-150x150.webp",150,150,true],"medium":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2026\/07\/blog-head_how2-llm-inference-600x315.webp",600,315,true],"medium_large":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2026\/07\/blog-head_how2-llm-inference-768x403.webp",768,403,true],"large":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2026\/07\/blog-head_how2-llm-inference.webp",1200,630,false],"1536x1536":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2026\/07\/blog-head_how2-llm-inference.webp",1200,630,false],"2048x2048":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2026\/07\/blog-head_how2-llm-inference.webp",1200,630,false]},"uagb_author_info":{"display_name":"Christopher Carter","author_link":"https:\/\/contabo.com\/blog\/author\/christophercarter\/"},"uagb_comment_info":0,"uagb_excerpt":"Learn how to run LLM inference on a GPU VPS from scratch. This guide covers VRAM sizing, CUDA setup, and choosing between Ollama and vLLM to deploy a private, cost-efficient AI inference endpoint.","authors":[{"term_id":1492,"user_id":63,"is_guest":0,"slug":"christophercarter","display_name":"Christopher Carter","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/63db81672a5ce4c1e8ee39753d00251d561b5b3a9967febf1c4f662024cef00f?s=96&d=mm&r=g","author_category":"","user_url":"","last_name":"Carter","first_name":"Christopher","job_title":"","description":""}],"_links":{"self":[{"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/posts\/31985","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/users\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/comments?post=31985"}],"version-history":[{"count":3,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/posts\/31985\/revisions"}],"predecessor-version":[{"id":32025,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/posts\/31985\/revisions\/32025"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/media\/32014"}],"wp:attachment":[{"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/media?parent=31985"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/categories?post=31985"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/tags?post=31985"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=31985"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}