VRAM – einfach erklärt
VRAM ist der eigene Arbeitsspeicher der Grafikkarte; er entscheidet, wie große KI-Modelle schnell auf deinem PC laufen können.
Auch: Grafikspeicher, Videospeicher, Video-RAM, GPU-Speicher
Damit die Grafikkarte ein Modell schnell berechnen kann, muss es in ihrem eigenen Speicher liegen, dem VRAM. Stell dir den VRAM als Werkbank vor: Alles, was darauf passt, ist sofort griffbereit. Was nicht passt, muss aus dem langsameren Regal (dem normalen RAM) geholt werden.
Grob überschlagen braucht ein Modell so viel Speicher wie Parameter mal Bytes pro Parameter. Ein Modell mit 7 Milliarden Parametern belegt in 16-Bit-Genauigkeit also rund 14 GB, in 8 Bit etwa 7 GB. Ein 8B-Sprachmodell in der Quantisierung Q4_K_M ist laut llama.cpp-Dokumentation etwa 4,6 GiB groß. Dazu kommt noch Speicher für die Kontextlänge beziehungsweise die Bildauflösung.
Reicht der VRAM nicht, laden viele Programme einen Teil ins normale RAM aus (Offloading). Das funktioniert, macht die Berechnung aber spürbar langsamer.
Was heißt das für dich? Prüfe vor dem Download die Dateigröße eines Modells: Ist sie deutlich kleiner als dein VRAM, läuft es meist komplett auf der Grafikkarte.
Verwandte Begriffe
Fehler, bei denen das wichtig ist
- A1111/Forge: A tensor with NaNs was produced (Schwarzbild)
- Allocation on device (ComfyUI meldet zu wenig VRAM)
- AMD-Grafikkarte wird nicht genutzt (ROCm oder Vulkan)
- CUDA out of memory (Grafikspeicher voll)
- DefaultCPUAllocator: not enough memory: you tried to allocate (Arbeitsspeicher/RAM ist voll)
- Expected all tensors to be on the same device (Daten teils auf GPU, teils auf CPU)
- HostBuffer.read_file_slice failed (Absturz durch die neue Dynamic-VRAM-Speicherverwaltung)
- KoboldCpp schließt sich beim Laden sofort
- llama-server: the request exceeds the available context size, try increasing it (Anfrage länger als die Kontextlänge)
- llama.cpp (Vulkan): vk::Device::allocateMemory: ErrorOutOfDeviceMemory (Grafikspeicher-Block zu groß oder VRAM voll)
- llama.cpp: CUDA error: out of memory
- LM Studio: Model loading was stopped due to insufficient system resources
- LM Studio: This message contains no content. The AI has nothing to say. (Antwort bleibt leer)
- LM Studio: Trying to keep the first … tokens when context the overflows (Eingabe ist länger als die eingestellte Kontextlänge)
- Modell vergisst den Anfang oder ignoriert lange Texte (Kontextlänge zu klein)
- Ollama nutzt die CPU statt der Grafikkarte
- Ollama: llama runner process has terminated: exit status 0xc0000409 (Modell-Prozess abgestürzt)
- Ollama: model requires more system memory
- Ollama: POST predict … /completion: EOF / wsarecv: An existing connection was forcibly closed by the remote host (Modell-Prozess ist mitten in der Antwort abgestürzt)
- Open WebUI: Ollama: 500, message='Internal Server Error' (Ollama erreicht, aber Modell kann nicht antworten)
- Reconnecting / Failed to connect to server
- Schwarze Bilder oder NaN-Werte (VAE-Genauigkeit)
- Sehr langsame Antworten, weil das Modell nicht in den VRAM passt
- Stable diffusion model failed to load (Modell lässt sich nicht laden – eigentliche Ursache steht weiter oben)
- vLLM: The model's max seq len is larger than the maximum number of tokens that can be stored in KV cache / No available memory for the cache blocks (Kontext passt nicht in den VRAM)
- Wan2GP: CUDA out of memory
- Warning: Ran out of memory when regular VAE decoding, retrying with tiled VAE decoding (VAE-Dekodierung weicht auf Kacheln aus)