Small (4B)
qwen3:4b is listed at 2.5 GB; 4-8 GB host RAM to start testing.
Practical VPS tutorial
Work out AI VPS RAM for API agents and Ollama models. Compare 4, 8, 16 and 32 GB, calculate model weights and context cache, and check real memory pressure.
For a light app calling an external AI API, I'd start testing with 2-4 GB RAM. For one local 7B-8B model at roughly 4-bit quantization, 8-16 GB is a useful starting range.

The question isn't just whether the model loads. It needs room for a conversation, the runtime and everything else on the VPS. This guide walks through that budget so you can compare plans without buying memory on guesswork.
The ranges below are estimates for planning, not official minimums or benchmarks. Unless stated otherwise, they refer to CPU inference in system RAM.
An agent framework doesn't automatically need a large RAM plan. A browser worker or local document pipeline can, even when model inference is remote. Count the tools as well as the chatbot.

qwen3:4b is listed at 2.5 GB; 4-8 GB host RAM to start testing.
qwen3:8b is listed at 5.2 GB; 8-16 GB host RAM.
llama3.3:70b is listed at 43 GB; 64-96+ GB host RAM.
These named examples give you something checkable before the arithmetic. They are reference models, not a ranking of the newest releases.
qwen3:4b2.5 GB4-8 GBqwen3:8b5.2 GB8-16 GBqwen3:14b9.3 GB16-24+ GBqwen3:32b20 GB32-48+ GBllama3.3:70b43 GB64-96+ GBArtifact sizes come from the Qwen3 and Llama 3.3 listings checked on October 31, 2026. RAM estimates assume one model and modest context. The download size is not the total working-memory requirement, and tags can change.
For a larger model, test speed separately. Enough RAM can make a CPU deployment possible without making it pleasant to chat with.
For a dense model, the lower-bound weight calculation is:
Weight bytes ≈ parameter count × bits per weight ÷ 8
8 billion parameters at 4 bits ≈ 4 GB
8 billion parameters at 8 bits ≈ 8 GB
8 billion parameters at 16 bits ≈ 16 GBThese are decimal GB before format metadata and tensors stored at different precision. Formats such as Q4_K_M don't put every tensor at exactly four bits. Check the actual artifact rather than treating the formula as a purchase recommendation. Also keep GB and GiB distinct when comparing file labels and Linux readings.
For the whole server:
Host RAM budget = resident model weights
+ KV cache and runtime buffers
+ OS and other applications
+ spare capacity for peaksSuppose your budget is 5.2 GB for weights, 1.5 GB for runtime/cache and 2 GB for the OS and other apps. That's 8.7 GB before spare capacity. I'd compare 16 GB plans rather than trying to squeeze it onto 8 GB.
That is an illustrative budget, not a measured Qwen deployment. Replace the assumed values with measurements. Keeping roughly 20-30% spare is a reasonable starting choice, not a rule every workload must meet.
A mixture-of-experts model still needs storage and memory for its stored weights. Don't use only the active parameter count to estimate the full model footprint.
The KV cache holds attention state for the conversation. Its size depends on architecture, context length, cache precision and parallel processing. Two similarly sized model files can therefore behave differently.
Don't allocate a model's maximum advertised context just because it's available. Start with the context your prompts need, then increase it while watching memory.
Ollama's current context guide describes defaults that vary with VRAM. I'd set context explicitly for a capacity test rather than depend on a default. With qwen3:8b already downloaded and Ollama running locally:
curl -fsS http://127.0.0.1:11434/api/generate \
-H 'Content-Type: application/json' \
-d '{"model":"qwen3:8b","prompt":"Explain DNS in one paragraph.","stream":false,"options":{"num_ctx":4096}}'
ollama psThen repeat with representative prompt lengths and your expected parallel load. Extra requests can need more cache; multiple resident models use memory together. The weights aren't necessarily duplicated once per user. See Ollama's concurrency explanation.
Use the table to shortlist, not to skip testing. I'd rather measure a monthly plan first than discover after annual prepayment that the model fits but the workload doesn't.
GPUs can accelerate text generation as well as images and video. Check the selected runtime's hardware support, fit the intended weights/cache allocation, and allow host memory for loading and services.
On a CPU-only VPS, extra RAM helps when it prevents swapping or keeps data resident. Once capacity is sufficient, doubling it alone doesn't promise a higher token rate.
On the VPS, run representative requests while checking:
free -h
vmstat 1 10
# If using Docker:
sudo docker stats --no-stream
# If using Ollama:
ollama psRead available, not only free. Linux uses idle memory as reclaimable cache. In vmstat, sustained si and so during inference suggest paging pressure; a swap file merely existing isn't the same problem.
If a process disappears, check for out-of-memory events:
sudo journalctl -k --since '1 hour ago' | grep -Ei 'out of memory|oom|killed process'Often, with suitable quantization, limited context and few other services. Measure the exact model. A 16 GB plan gives more room but doesn't guarantee a response speed.
It can prevent some sudden failures, but sustained paging can make inference too slow. Fit the working model and cache into appropriate memory.
No. Some quantized variants can run on a large enough CPU host. Interactive or shared use may still make GPU acceleration the more practical choice.
Next step
Commands assume a fresh Ubuntu server. Replace domains, users, database names and provider-specific values before running them. VPS sizing is a practical starting point, not a guarantee: monitor the real workload and resize when CPU, memory, disk or network headroom becomes tight.
Affiliate links: you pay the same price as buying direct.