# Run Qwen3.8-27B on a dedicated GPU
Run Qwen3.8-27B with Ollama on an Ubuntu GPU server in Switzerland. Start with a short prompt, confirm that the model fits on the GPU, then connect your coding tools or agent through SSH. See our [Qwen4-27B GPU guide](https://www.swissgpu.ch/guides/qwen-4-27b) if you’re choosing hardware for the next release.

## 1. Choose a GPU for Qwen3.8-27B
Ollama lists the Q4_K_M package at about 18 GB on disk. Allow additional GPU memory for the runtime and context. Start with one text request at 4,096 tokens of context, then measure your workload before increasing context or concurrency. See the [Ollama model tag](https://ollama.com/library/qwen3.8:27b-q4_K_M) and [context-length guide](https://docs.ollama.com/context-length).

- [RTX 5080](https://www.swissgpu.ch/gpus/rtx-5080) (16 GB VRAM). Try a smaller build using the [16 GB test options](https://www.swissgpu.ch/guides/qwen-4-27b#16-gb).

- [RTX 4090](https://www.swissgpu.ch/gpus/rtx-4090) (24 GB VRAM). Start here for a short-context test with the Ollama tag below.

- [RTX 5090](https://www.swissgpu.ch/gpus/rtx-5090) (32 GB VRAM). Choose it for more headroom when testing longer prompts.

## 2. Install Ollama and download the model
Choose an Ubuntu image and [connect by SSH](https://www.swissgpu.ch/docs/ssh). Check that the NVIDIA driver sees the GPU and that the server has disk space for the model and Ollama. If the GPU check fails, consult [Ollama’s NVIDIA requirements](https://docs.ollama.com/gpu).

```
nvidia-smi
df -h /
```

Download the official Linux installer, then run it and pull the model.

```
curl -fsSLo install-ollama.sh https://ollama.com/install.sh &&
  sh install-ollama.sh &&
  sudo systemctl start ollama &&
  ollama --version &&
  ollama pull qwen3.8:27b-q4_K_M
```

## 3. Send a request and check GPU usage
On the rental server, send a short text request with thinking disabled. Expect a JSON response with content in `message.content` and `done: true`.

```
curl --fail-with-body --silent --show-error http://127.0.0.1:11434/api/chat \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "qwen3.8:27b-q4_K_M",
    "messages": [{"role": "user", "content": "Give me a one-sentence summary of GPU memory."}],
    "stream": false,
    "think": false,
    "options": {"num_ctx": 4096, "num_predict": 128}
  }'
```

```
ollama ps
```

Check the `PROCESSOR` column for `100% GPU`. If Ollama splits the model between CPU and GPU, check available VRAM and other GPU processes before increasing context. Try a lower context or more VRAM if needed. To calculate generated tokens per second, divide `eval_count` by `eval_duration` converted from nanoseconds to seconds. See the [Ollama chat API reference](https://docs.ollama.com/api/chat).

## 4. Connect your app or agent
Keep Ollama bound to loopback. On your computer, run this tunnel with the SSH host from the dashboard. For shared IPv4, add the SSH port shown in the dashboard with `-p`.

```
ssh -o ExitOnForwardFailure=yes -N -L 127.0.0.1:11434:127.0.0.1:11434 ubuntu@SERVER_HOST
```

With the tunnel open, repeat the chat request on your computer. An OpenAI-compatible client can use `http://127.0.0.1:11434/v1/` as its base URL and `qwen3.8:27b-q4_K_M` as its model ID. If the client requires an API key field, use the placeholder `ollama`. Check your client’s required endpoints in [Ollama’s compatibility guide](https://docs.ollama.com/api/openai-compatibility).
For agents that also manage compute, read the [Offers API](https://www.swissgpu.ch/docs/offers-api) to compare models and rates. With your authorization, use the [Customer API](https://www.swissgpu.ch/docs/customer-api) to check live capacity and credit, set an on-demand rate ceiling, request a rental and wait for SSH details. Back up any files you need and end the rental when you finish. See [current rates and billing details](https://www.swissgpu.ch/pricing).

## When Qwen4 weights are available
Check the [official Qwen model listing](https://huggingface.co/Qwen) for the model card and license. Once Ollama lists a compatible build, repeat the same test with its published tag. Compare GPU residency and generated tokens per second at the same context and quantization before resizing your GPU or switching your agent over.