Black Friday: Save 10% for life on all of our VPS plans, now through Cyber Monday

10% off on selected plans for as long as you keep the service · new orders · up to 10 uses per customer · ends Dec 1, 2026, 12:00 AM EST.

See plans
Guideschevron_rightServers

Servers · 8 min read · Updated

How to Fine-Tune an LLM with Unsloth on a GPU Server

To fine-tune an LLM with Unsloth on a GPU server, install the NVIDIA driver and Container Toolkit, run the official unsloth/unsloth Docker image with its ports bound to the server, and open its web interface or notebooks through an SSH tunnel. Or install the Python package with uv pip install unsloth --torch-backend=auto. Train a LoRA or 4-bit QLoRA adapter on your data, then export it to GGUF with save_pretrained_gguf to run in Ollama or llama.cpp.

Our GPU Servers

GPU servers for fine-tuning
PlanGPUTotal GPU memorySystem memoryPrice
Intel Core Ultra 9 285K w/ NVIDIA Tesla P4NVIDIA Tesla P4 · 8 GB8 GB192 GB$589.00/mo
NVIDIA DGX SparkNVIDIA DGX Spark · 128 GB128 GB128 GB$609.00/mo
AMD EPYC 7443P w/ NVIDIA RTX 3090NVIDIA RTX 3090 · 24 GB24 GB256 GB$659.00/mo
AMD Ryzen 9 9950X w/ NVIDIA RTX 3050NVIDIA RTX 3050 · 6 GB6 GB192 GB$699.00/mo
AMD Dual EPYC 7702 w/ NVIDIA RTX 3050NVIDIA RTX 3050 · 6 GB6 GB256 GB$749.00/mo
AMD Ryzen 9 9950X w/ NVIDIA RTX 5090NVIDIA RTX 5090 · 32 GB32 GB64 GB$789.00/mo
AMD Ryzen 9 9950X w/ NVIDIA RTX 5090NVIDIA RTX 5090 · 32 GB32 GB96 GB$829.00/mo
AMD Dual EPYC 7702 w/ NVIDIA RTX 5070NVIDIA RTX 5070 · 12 GB12 GB256 GB$859.00/mo
AMD EPYC 7702 w/ 4x NVIDIA RTX 30904× NVIDIA RTX 3090 · 24 GB each96 GB128 GB$929.00/mo
AMD EPYC 7443P w/ 4x NVIDIA V100 16GB4× NVIDIA V100 · 16 GB each64 GB128 GB$1,059.00/mo
AMD EPYC 7443P w/ 4x NVIDIA V100 32GB4× NVIDIA V100 · 32 GB each128 GB128 GB$1,059.00/mo
AMD EPYC 7443P w/ 4x NVIDIA V1004× NVIDIA V100—256 GB$1,189.00/mo
Intel Dual Xeon Platinum 8260 w/ 8x NVIDIA V1008× NVIDIA V100 · 32 GB each256 GB1 TB$1,319.00/mo
2x NVIDIA DGX Spark2× NVIDIA DGX Spark · 128 GB each256 GB256 GB$1,449.00/mo
AMD EPYC 9B14 w/ 2x NVIDIA RTX 50902× NVIDIA RTX 5090 · 32 GB each64 GB384 GB$2,639.00/mo
AMD EPYC 9355 w/ NVIDIA RTX PRO 6000NVIDIA RTX PRO 6000 · 96 GB96 GB768 GB$2,639.00/mo
AMD EPYC 9254 w/ 4x NVIDIA RTX 50904× NVIDIA RTX 5090 · 32 GB each128 GB384 GB$3,819.00/mo
Intel Dual Xeon Gold 6338N w/ 8x Intel Gaudi 28× Intel Gaudi 2 · 96 GB each768 GB1 TB$3,949.00/mo

1. Driver and Container Toolkit

Follow installing NVIDIA drivers on Ubuntu Server, including its section on GPUs in Docker, and check the card with nvidia-smi. Install Docker first if it is not there.

2. Run Unsloth in Docker

docker run -d --name unsloth --gpus all --ipc=host \
  -p 127.0.0.1:8000:8000 -p 127.0.0.1:8888:8888 \
  -v "$PWD":/workspace/host \
  -v unsloth-workspace:/workspace \
  -v "$HOME/.cache/huggingface":/workspace/.cache/huggingface \
  -v unsloth-studio:/opt/unsloth-studio \
  unsloth/unsloth && docker logs -f unsloth

This is Unsloth's own command with one change: the 127.0.0.1: prefixes keep its web interface and Jupyter off the internet, since Docker publishes ports past ufw. From your own computer:

ssh -L 8000:127.0.0.1:8000 -L 8888:127.0.0.1:8888 [email protected]
# then open http://localhost:8000 and http://localhost:8888

The current folder is mounted at /workspace/host, so put your training data there, and downloaded models are cached in your Hugging Face folder so they are not fetched twice.

3. Or Install the Python Package

curl -LsSf https://astral.sh/uv/install.sh | sh && source ~/.local/bin/env
uv venv unsloth_env --python 3.13
source unsloth_env/bin/activate
uv pip install unsloth --torch-backend=auto

--torch-backend=auto picks the PyTorch build for your GPU. Unsloth's notebooks are the quickest start: open one for the model family you want and run it on the server.

4. Train

Unsloth's fine-tuning guide starts from these settings and adjusts from there:

  • load_in_4bit = True for QLoRA, which the guide says cuts memory use about four times; set it to False for 16-bit LoRA.
  • max_seq_length = 2048, the longest example the model sees.
  • per_device_train_batch_size = 2 with gradient_accumulation_steps = 4.
  • learning_rate = 2e-4, and max_steps = 60 for a first test run.

Run the short test first to check the data loads and the loss falls, then train for real. Watch memory with nvidia-smi; if it runs out, lower the batch size or sequence length, or use 4-bit.

5. Export and Run Your Model

model.save_pretrained_gguf("my-model", tokenizer, quantization_method = "q4_k_m")

q4_k_m is Unsloth's recommended balance of size and quality; q8_0 and f16 are larger and closer to the original. The GGUF file runs in Ollama and llama.cpp, so you can serve it with Open WebUI and Ollama, or keep the adapter and serve it with vLLM. Copy finished models off the server to object storage; training data and checkpoints fill disks quickly.

Common Questions

  • What is Unsloth?

    An open-source toolkit for fine-tuning and running language models with less GPU memory. Its core Python package is Apache 2.0; its Studio web interface is AGPL-3.0. Unsloth says it trains models 2× faster with 70% less VRAM and no accuracy loss.

  • What is the difference between LoRA and QLoRA?

    Both train a small adapter instead of the whole model. QLoRA also loads the base model in 4-bit, which Unsloth's guide says saves about 75% of the memory; plain LoRA keeps it at 16-bit, which needs more memory and can be slightly more accurate.

  • How much GPU memory do I need?

    It depends on the model's size and whether you use 4-bit. Unsloth's own notebooks fine-tune small models on GPUs with very little memory; larger models need more. Our guide on how much VRAM an LLM needs gives the sizes for running models, and training takes more than running.

  • What do I get at the end?

    A LoRA adapter, which Unsloth describes as a small file of about 100 MB used on top of the base model, or a merged model you can export to GGUF and run in Ollama or llama.cpp.

Plans and prices

GPU Servers

Dedicated servers with their own NVIDIA GPUs for training and inference.

See all plans
  • Intel Core Ultra 9 285K w/ NVIDIA Tesla P4

    NVIDIA Tesla P4 · 8 GB GPU

    24 Cores · 192 GB RAM · 2x 3.84TB NVMe Gen4

    Los Angeles, CA (LA1) · 50 TB transfer · 25 Gbps

    $589.00/mo

  • NVIDIA DGX Spark

    NVIDIA DGX Spark · 128 GB GPU

    20 Cores · 128 GB RAM · 4TB NVMe Gen4

    Ogden, UT (UT1) · 50 TB transfer · 10 Gbps

    $609.00/mo

    Sold out
  • AMD EPYC 7443P w/ NVIDIA RTX 3090

    NVIDIA RTX 3090 · 24 GB GPU

    24 Cores · 256 GB RAM · 3.84TB NVMe

    Ogden, UT (UT1) · 100 TB transfer · 10 Gbps

    $659.00/mo

  • AMD Ryzen 9 9950X w/ NVIDIA RTX 3050

    NVIDIA RTX 3050 · 6 GB GPU

    16 Cores · 192 GB RAM · 2x 2 TB NVMe

    Ashburn, VA (ASH1) · Dallas, TX (TX3) · New York, NY (NY2) · Charlotte, NC (NC1) · Bend, OR (OR1) · Unmetered transfer · 1 Gbps

    $699.00/mo

Keep Reading

All guides