Get the latest tech news

Show HN: Keep your PyTorch model in VRAM by hot swapping code


Pytorch script hot swap: Change code without unloading your LLM from VRAM - valine/training-hot-swap

This is a barebones implementation of a method to keep large models in VRAM even after your training script exits. I personally like to build out UI for my training scripts to monitor progress, loss over time, and enable easy evaluation. It takes about 0.32 seconds on my machine from when I run the code to when I can interact with the model, and that's including initializtion time for the GUI.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of VRAM

VRAM

Photo of PyTorch model

PyTorch model

Photo of hot swapping code

hot swapping code

Related news:

News photo

Nvidia announces RTX 5060 Ti and 5060 mainstream graphics cards - but VRAM counts are concerning

News photo

Nvidia's RTX Pro 6000 has 96GB of VRAM and 600W of power

News photo

Nvidia's new texture compression tech slashes VRAM usage by up to 95% | Neural networks can apparently work wonders in reducing VRAM requirements for real-time graphics