Performance report: 55 t/s on RTX 4060

#4
by SlavikF - opened

I downloaded the model:

curl -LsSf https://hf.co/cli/install.sh | bash
sudo /home/slavik/.local/bin/hf download unsloth/gemma-4-E4B-it-qat-GGUF --include *UD-Q4_K_XL.gguf --include *-BF16.gguf

On Nvidia RTX 4060 with 8GB VRAM, I'm getting:

  • Prompt processing: 2500 t/s
  • Token generation: 55 t/s
  • VRAM used: 6.2 Gi

running it on k3s on Debian:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: ai-small
  labels:
    app.kubernetes.io/name: ai-small
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: ai-small
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app.kubernetes.io/name: ai-small
    spec:
      runtimeClassName: nvidia
      containers:
        - name: ai-small
          image: ghcr.io/ggml-org/llama.cpp:server-cuda12-b9776
          imagePullPolicy: IfNotPresent
          resources:
            requests:
              cpu: 20m
              memory: "4Gi"
            limits:
              memory: "10Gi"
              cpu: 2
          env:
            - name: NVIDIA_VISIBLE_DEVICES
              value: all
            - name: NVIDIA_DRIVER_CAPABILITIES
              value: all
          command: ["./llama-server"]
          args:
            - "--host"
            - "0.0.0.0"
            - "--port"
            - "30060"
            - "--cache-ram"
            - "4096"
            - "--tools"
            - "all"
            - "--models-max"
            - "1"
            - "--models-preset"
            - "/app/models.ini"
          volumeMounts:
            - mountPath: /root/.cache
              name: host-cache
            - mountPath: /app/models.ini
              name: models
              subPath: models.ini
      volumes:
        - name: host-cache
          hostPath:
            path: /root/.cache
            type: DirectoryOrCreate
        - name: models
          configMap:
            name: ai-small-models
---
apiVersion: v1
kind: Service
metadata:
  name: ai-small
  labels:
    app.kubernetes.io/name: ai-small
spec:
  type: NodePort
  ports:
    - name: http
      port: 30060
      targetPort: 30060
      nodePort: 30060
  selector:
    app.kubernetes.io/name: ai-small
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: ai-small-models
  labels:
    app.kubernetes.io/name: ai-small
data:
  models.ini: |
    version = 1

    [unsloth/gemma-4-E4B-it-qat-GGUF:Q4_K_XL]
    alias=local-vla-gemma4B
    ctx-size=131072
    fit=off
    gpu-layers=all
    load-on-startup=true

that is some decent Prompt processing, but I imagined Token generation to be faster on a 4060? I only have a 5060 and haven't tried this yet.

Sign up or log in to comment