TLDRocket
Sign in

Model Optimization

8 summarised stories about Model Optimization, each linking back to the original source. Browse all topics →

Tuesday, 27 September 2022

How 🤗 Accelerate runs very large models thanks to PyTorch

Hugging Face Blog 3 years ago

Hugging Face developed Accelerate, a tool that lets users run very large language models like OPT-6.7B on consumer hardware without enough RAM by loading model weights progressively onto different devices instead of loading the entire model at once. OPT-6.7B has 6.7 billion parameters, which would require 26.8GB of RAM just to create the empty model in default precision, but the new approach avoids this bottleneck. The system automatically decides which model layers go on GPU, CPU RAM, or disk storage, then loads and places weights incrementally, freeing memory after each step.