Run AI Faster on Almost Any GPU with ML Drift
By Nick Bild
Running AI models locally has some big advantages over relying on cloud services. Keeping things local improves privacy, eliminates the need for an internet connection, and reduces latency. But getting those models to run efficiently on consumer hardware isn't always easy, particularly when developers need to support devices with different GPUs, drivers, and software interfaces. Google is looking to simplify that process with the release of ML Drift , a new open source GPU compute engine designed to accelerate AI inference on everything from smartphones to desktop computers. Developed by the Google AI Edge team, ML Drift supports a wide range of hardware platforms and promises significant performance improvements over existing solutions. ML Drift is the successor to the GPU delegate previously used by TensorFlow Lite. It now serves as the GPU acceleration engine for Google's LiteRT framework, although developers can also use it independently through its C++ APIs. The software is available under the Apache 2.0 license. Once you step outside of a data center environment, one of the biggest challenges with GPU acceleration is that different hardware platforms use different programming interfaces. Android devices might rely on OpenCL or OpenGL ES, while Apple devices use Metal. Web browsers increasingly support WebGPU, which can also run natively on Windows and Linux through Google's Dawn implementation. ML Drift addresses this problem with a unified compute architecture that abstracts away many of those hardware-specific differences. Developers can write GPU operations using a common framework rather than maintaining separate implementations for every supported platform. An important part of this architecture is a technique called tensor virtualization, which separates the logical representation of tensors from their physical storage on the GPU. Combined with dynamically generated shaders and optimized memory management, this allows ML Drift to adapt workloads to different hardware without introducing significant runtime overhead. The engine also introduces native support for five-dimensional tensors, enabling more complex workloads such as 3D convolutional networks and models that process spatial or temporal information. ML Drift isn't limited to a small set of use cases. Google has introduced optimizations specifically for computer vision, audio and depth processing, and large language models, including separate execution strategies for processing input prompts and generating output tokens. These optimizations include specialized memory layouts, improved KV cache handling, and quantization techniques that reduce memory traffic. In Google's benchmarks, ML Drift achieved up to 12% lower memory overhead than competing frameworks. Google has published the ML Drift source code on GitHub , along with examples for getting started with OpenCL and WebGPU. The repository also includes documentation for implementing custom GPU operations. Feature development for the legacy TensorFlow Lite GPU delegate has ended with this release, so developers are encouraged to migrate to the new engine. Fortunately, backward compatibility has been maintained, so the upgrade process shouldn't be too painful.ML Drift simplifies AI at the edge (📷: Google) A wide range of devices is supported (📷: Google) The system accelerates complex model architectures (📷: Google)
↑ Back to top
Originally published by
Hackster News ↗
· rebuilt here from its own full-text RSS feed · all rights
remain with the publisher, please read and support them there.