How to Serve Your Own Fine-Tuned Model on a Rented GPU with vLLM

How to Serve Your Own Fine-Tuned Model on a Rented GPU with vLLM
How to Serve Your Own Fine-Tuned Model on a Rented GPU with vLLM

A fine-tuned model is only useful once it's behind an API. If your model isn't in a serverless catalog, which is true of anything you've trained yourself, the usual route is to rent a GPU and serve it with vLLM, an open-source engine that exposes an OpenAI-compatible endpoint. Your application can then call it the same way it would call any hosted model.

This guide maps the whole path on a Nebula Block GPU instance: size the GPU, deploy, install vLLM, prepare your weights, serve them, test the endpoint, lock it down and shut it down. The steps follow the Nebula Block and vLLM documentation. Drivers, images and vLLM versions differ, and flag names and install steps change between vLLM versions, so use the commands as a map and check them against the current docs for the version you install. Details are as of November 2026.

Before you start: do you need your own GPU?

If a model from the serverless catalog does the job, you can skip all of this and pay per token. Renting makes sense when you need to serve your own fine-tuned weights, a model that isn't listed, or a serving stack you control. If you're not sure, compare the per-token price of a catalog model with the hourly cost of a GPU you'd keep busy.

Step 1: Size the GPU

Memory decides which GPU you can use. A rough rule is 2 GB per billion parameters at 16-bit precision, plus space for the KV cache and overhead, and you should plan around 90% of the card's memory. Two examples worked through in our VRAM guide, both at 8K context:

  • An 8B model in BF16 with 4 concurrent chats needs about 23 GB in total, which fits a 48 GB card such as an L40S.
  • A 70B model in FP8 with 10 concurrent chats needs about 112 GB, which fits two 80 GB GPUs.

If a model doesn't fit, you can quantize it, serve fewer users, or use a larger card. When you split a model across GPUs, the GPU count must divide the model's attention heads.

Step 2: Deploy a GPU instance

The GPU Cloud Quickstart covers this in detail. In short:

  1. Make sure your account is at Tier 3 (a $10 deposit) and that you've added an SSH key.
  2. Open Deploy in the console and choose a location and a GPU configuration.
  3. Choose an operating system image, select your SSH key, name the server and click Deploy.
  4. When it's running, connect with ssh -i /path/to/key username@instance-ip. The username and IP are on the instance's detail page.

Then check that the GPU is visible:

nvidia-smi

If your GPU doesn't show up, install the NVIDIA drivers before going further.

Step 3: Install vLLM

In a fresh Python virtual environment:

python3 -m venv vllm-env
source vllm-env/bin/activate
pip install vllm

vLLM's builds target specific CUDA versions, so follow the installation guide in the vLLM documentation for your GPU, especially if you've rented a newer architecture such as Blackwell.

Step 4: Prepare your weights

Where your fine-tuned model lives depends on how you trained it.

A full fine-tune is a normal model directory with weights, config and tokenizer. Copy it to the instance:

rsync -avP -e "ssh -i /path/to/key" ./my-model/ username@instance-ip:~/my-model/

You can also pull it from the Hugging Face Hub with an access token if it's stored there.

A LoRA adapter is much smaller and sits on top of a base model. You have two choices:

  • Serve the adapter directly, which vLLM supports (see Step 5).
  • Merge it into the base weights first. Use the merge function in your training library, such as the merge_and_unload() method in the PEFT library, following its documentation. Save the merged model together with its tokenizer, and test it before you rely on it. If you trained with QLoRA, merge the adapter into the full-precision base model rather than the quantized one, since merging into quantized weights can lose accuracy.

One thing to plan for: storage on an instance may be ephemeral, which means it disappears when you terminate the instance. Keep your weights somewhere durable too, for example in Nebula Block's S3-compatible object storage, so you can redeploy without re-uploading.

Step 5: Serve the model

For a full fine-tune or a merged model:

vllm serve ~/my-model \
  --served-model-name my-model \
  --host 127.0.0.1 \
  --port 8000 \
  --api-key "$VLLM_API_KEY" \
  --max-model-len 8192 \
  --gpu-memory-utilization 0.9

What the options do:

  • --served-model-name sets the name clients use in the model field of a request.
  • --api-key makes the server require a key. Set VLLM_API_KEY to a long random string first.
  • --max-model-len caps context length. Setting it to what you actually need frees memory for KV cache.
  • --gpu-memory-utilization 0.9 is vLLM's default and covers weights, cache and activations together.
  • --host 127.0.0.1 keeps the server reachable only from the instance itself, which is what you want if you connect through an SSH tunnel (see Step 7).

For a model split across two GPUs, add --tensor-parallel-size 2.

To serve a LoRA adapter on top of a base model, vLLM's LoRA documentation shows this pattern:

vllm serve <base-model-id> \
  --enable-lora \
  --lora-modules my-adapter=/path/to/adapter

Requests then select the adapter by name in the model field, as if it were any other model, and /v1/models lists both the base model and the adapter. vLLM limits the adapter rank it accepts (see the --max-lora-rank option), so if your adapter was trained with a high rank, raise the limit or the server will reject it.

Run the server inside tmux or screen so it keeps running after you disconnect. The first start can take a while, because vLLM loads the weights and prepares the cache. Wait for the startup logs to say the server is ready.

Step 6: Test the endpoint

From the instance itself:

curl http://127.0.0.1:8000/v1/models \
  -H "Authorization: Bearer $VLLM_API_KEY"

Then send a chat request through the OpenAI SDK, exactly as you would with any OpenAI-compatible service:

import os
from openai import OpenAI

client = OpenAI(
    base_url="http://127.0.0.1:8000/v1",
    api_key=os.environ["VLLM_API_KEY"],
)

response = client.chat.completions.create(
    model="my-model",
    messages=[{"role": "user", "content": "Summarize what you were fine-tuned to do."}],
)
print(response.choices[0].message.content)

Before you point production traffic at it, run your evaluation set against it and compare the answers with your training baseline. Also run a simple load test at your expected concurrency and record tokens per second and p95 latency. You'll need those numbers for the cost calculation below.

Step 7: Reach it safely from your application

An API key alone is basic protection. Common guidance is to put a reverse proxy or API gateway in front of the server if you need TLS or rate limiting. For development and testing, the safest option is an SSH tunnel, which means you don't open the port to the internet at all. Run this on your own machine:

ssh -i /path/to/key -L 8000:127.0.0.1:8000 username@instance-ip

Then call http://127.0.0.1:8000/v1 locally. If your application runs elsewhere and has to reach the server over the network, use the instance's firewall rules to allow only the addresses that need access, and put TLS in front of the server.

Step 8: Work out the cost, then shut it down

An instance is billed for as long as it exists, whether or not it's powered on, and stopping it doesn't stop the charge. When you're done testing, terminate it. Keep your weights in durable storage so you can redeploy later.

To find out whether serving this model yourself is worth it, use the numbers from your load test:

cost per million tokens = hourly price ÷ (tokens per second × 3,600) × 1,000,000

Compare the result with what a hosted model would cost for the same traffic. Quantization, batching and prefix caching are the main levers for lowering your number.

Common problems

  • Out of memory at startup. Lower --max-model-len, use a quantized version of the model, or move to a larger GPU. Re-check the sizing in Step 1.
  • "Model not found" from a client. The model field must match --served-model-name (or the adapter name, for LoRA).
  • Authentication errors. The client's api_key must match the value you passed to --api-key.
  • Connection refused over the network. If you bound to 127.0.0.1, remote clients can't reach it. Use an SSH tunnel, or rebind and restrict access with firewall rules.
  • Chat requests fail or look wrong. The chat endpoint needs a chat template in the tokenizer configuration. If your fine-tuned model doesn't include one, add the template it was trained with.
  • Slow first request. The first request after startup can be slower while the engine warms up. Measure after a few requests.

Serving your own model is mostly a handful of steps: size the GPU, deploy, install vLLM, load the weights and run vllm serve. The parts that deserve the most attention are the ones around it: testing quality against your baseline, keeping the endpoint private, and terminating the instance when you're done. Measure cost per million tokens before you commit to running it for real.

The bottom line

Serving your own model is mostly a handful of steps: size the GPU, deploy, install vLLM, load the weights and run vllm serve. The parts that deserve the most attention are the ones around it: testing quality against your baseline, keeping the endpoint private, and terminating the instance when you're done. Measure cost per million tokens before you commit to running it for real.

Learn more at