# weightlift

An in-browser model manager for local, on-device AI that handles download progress, cache detection, and deduplication of concurrent model loads, with React hooks and a worker bridge, working out of the box with Transformers.js.

weightlift is a JavaScript library for loading and managing on-device AI models such as Whisper or CLIP inside a web browser, handling the parts of that problem a developer would otherwise have to wire up: tracking download progress, detecting when a model is already cached, deduplicating concurrent requests to load the same model, and bridging model execution into a web worker. It works with Transformers.js out of the box, picking WebGPU when available and falling back to WASM, and any custom model loader can be plugged in as well.

The library ships as a core model manager, an optional React package with hooks such as useModel and useModelManager, a worker package for running models off the main thread, and a Transformers.js integration package, with React and Transformers.js both treated as optional peer dependencies rather than requirements. It is used in at least one featured project, a transcript-based video editor that runs Whisper entirely on-device in the browser.

Website: https://weightlift.dev/
