# Can the Tesla P40 run Qwen3.8-4B-Distill?

> Yes. The Tesla P40 runs Qwen3.8-4B-Distill fully in VRAM at FP16 / BF16 (about 10.0 GB of 24 GB), at roughly 20 tokens/s.

Tesla P40: 24 GB (24 GB usable), 347 GB/s. Estimates at an 8K context.

## Every quantisation

| Quant | Quality | ≈ GB | Fit | Est. tok/s |
|---|---|---|---|---|
| Q2_K | Heavy loss | 3.41 | fits | 125 |
| Q3_K_M | Noticeable loss | 3.77 | fits | 84 |
| Q4_K_M | Small loss | 4.22 | fits | 68 |
| Q5_K_M | Near-lossless | 4.59 | fits | 58 |
| Q6_K | Near-lossless | 4.99 | fits | 50 |
| Q8_0 | Lossless | 6 | fits | 39 |
| F16 (pick) | Lossless | 9.97 | fits | 20 |

## Run it

BF16 straight from Hugging Face (ollama):

```bash
ollama run hf.co/empero-ai/Qwen3.8-4B-Distill-GGUF:BF16
```

OpenAI-compatible server with a web UI (llama.cpp):

```bash
llama-server -hf empero-ai/Qwen3.8-4B-Distill-GGUF:BF16
```

Download with the lms CLI (lmstudio):

```bash
lms get empero-ai/Qwen3.8-4B-Distill-GGUF@BF16
```

Serve an OpenAI-compatible API (vllm):

```bash
vllm serve empero-ai/Qwen3.8-4B-Distill
```

Docker Compose (NVIDIA) (vllm):

```yaml
services:
  vllm:
    image: vllm/vllm-openai:latest
    command: empero-ai/Qwen3.8-4B-Distill
    ports:
      - "8000:8000"
    ipc: host
    volumes:
      - ~/.cache/huggingface:/root/.cache/huggingface
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]
```

Serve an OpenAI-compatible API (sglang):

```bash
sglang serve empero-ai/Qwen3.8-4B-Distill --host 0.0.0.0 --port 30000
```

Docker Compose (NVIDIA) (sglang):

```yaml
services:
  sglang:
    image: lmsysorg/sglang:latest
    command: sglang serve empero-ai/Qwen3.8-4B-Distill --host 0.0.0.0 --port 30000
    ports:
      - "30000:30000"
    ipc: host
    volumes:
      - ~/.cache/huggingface:/root/.cache/huggingface
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]
```

Chat with the pipeline API (transformers):

```python
from transformers import pipeline

pipe = pipeline("text-generation", model="empero-ai/Qwen3.8-4B-Distill", dtype="auto", device_map="auto")
messages = [{"role": "user", "content": "Explain self-hosting in one paragraph."}]
out = pipe(messages, max_new_tokens=512)
print(out[0]["generated_text"][-1]["content"])
```


## Chat models that fit comfortably

- [Qwen/Qwen3-4B](https://selfhost.directory/models/qwen/qwen3-4b/on/tesla-p40): Q8_0 ≈5.82 GB, est. 45 tok/s
- [meta-llama/Llama-3.2-3B-Instruct](https://selfhost.directory/models/meta-llama/llama-3.2-3b-instruct/on/tesla-p40): Q8_0 ≈4.73 GB, est. 56 tok/s
- [meta-llama/Llama-3.1-8B-Instruct](https://selfhost.directory/models/meta-llama/llama-3.1-8b-instruct/on/tesla-p40): Q8_0 ≈9.84 GB, est. 22 tok/s
- [Qwen/Qwen2.5-7B-Instruct](https://selfhost.directory/models/qwen/qwen2.5-7b-instruct/on/tesla-p40): Q8_0 ≈8.86 GB, est. 24 tok/s
- [Qwen/Qwen3-8B](https://selfhost.directory/models/qwen/qwen3-8b/on/tesla-p40): Q8_0 ≈10.15 GB, est. 22 tok/s
- [microsoft/Phi-4-mini-instruct](https://selfhost.directory/models/microsoft/phi-4-mini-instruct/on/tesla-p40): Q8_0 ≈5.49 GB, est. 47 tok/s

## Other GPUs that run it

- [GeForce RTX 4060](https://selfhost.directory/models/empero-ai/qwen3.8-4b-distill/on/rtx-4060): Q8_0, est. 30 tok/s
- [Apple M4 (16 GB)](https://selfhost.directory/models/empero-ai/qwen3.8-4b-distill/on/apple-m4-16gb): F16, est. 7.1 tok/s
- [Radeon RX 6700 XT](https://selfhost.directory/models/empero-ai/qwen3.8-4b-distill/on/rx-6700-xt): F16, est. 23 tok/s
- [GeForce RTX 3060 12GB](https://selfhost.directory/models/empero-ai/qwen3.8-4b-distill/on/rtx-3060): F16, est. 21 tok/s
- [Arc B580](https://selfhost.directory/models/empero-ai/qwen3.8-4b-distill/on/arc-b580): F16, est. 27 tok/s
- [Tesla T4](https://selfhost.directory/models/empero-ai/qwen3.8-4b-distill/on/tesla-t4): F16, est. 19 tok/s
- [Arc A770 16GB](https://selfhost.directory/models/empero-ai/qwen3.8-4b-distill/on/arc-a770): F16, est. 33 tok/s
- [Radeon RX 7800 XT](https://selfhost.directory/models/empero-ai/qwen3.8-4b-distill/on/rx-7800-xt): F16, est. 37 tok/s

---
Model: https://selfhost.directory/models/empero-ai/qwen3.8-4b-distill. GPU: https://selfhost.directory/models/gpus/tesla-p40. Source: https://selfhost.directory/models/empero-ai/qwen3.8-4b-distill/on/tesla-p40