Tuesday, September 27

Flashlight Meta AI Open Sources: fast and flexible machine learning toolkit in C++

Although deep learning and machine learning frameworks work well, customizing their underlying components has always been difficult. Low-level internals can be mistakenly obfuscated, closed-source, or hand-tuned for specific purposes, making it difficult and time-consuming to find the appropriate code to modify.

To fuel groundbreaking research, FAIR has developed Flashlight, a new open-source C++-based machine learning (ML) toolkit that enables teams to quickly and efficiently modify ML and deep frameworks to better suit their needs.

The flashlight was built from the ground up to be fully user adjustable. It is easy to use as it includes the fundamentals of a study environment. Due to its basic design and lack of language bindings, rebuilding the entire Flashlight library and its training pipelines takes only seconds whenever its core components are changed.

Since current C++ allows for first-class parallelism and out-of-the-box speed, Flashlight has extremely low structure overhead. Domain-specific low-level languages ​​and libraries can be easily integrated into Flashlight, thanks to its easy bridges.

Flashlight is based on a simple stack of modular, easy-to-understand abstractions. For this reason, the team first installed the ArrayFire tensor library, which enables dynamic tensor shapes and types and removes the requirement for strict compile-time specifications and C++ templates. As a bonus, ArrayFire’s efficient just-in-time compiler helps optimize operations on the fly.

Flashlight extends these fundamentals by providing specialized memory managers and application programming interfaces (APIs) for distributed and mixed-precision training. Flashlight combines modular abstractions for working with large-scale data and training with fast, lightweight autograd. This deep learning standard automatically computes derivatives of chain operations common in deep neural networks. Whether you focus on deep learning or any other field of study, you will find these components useful.

Lightweight domain applications in Flashlight’s unique codebase facilitate study in areas as diverse as speech recognition, language modeling, image classification, and segmentation. Thanks to its smart layout, Flashlight can facilitate multimodal research by eliminating the need to join numerous independent domain-specific libraries. This just requires a single incremental rebuild instead of making changes and rebuilding for each upstream domain-specific infrastructure.

Flashlight allows researchers to work in C++ without having to configure external devices or bindings and without the need for adapters to handle threading, memory mapping, or low-level hardware interoperability. This facilitates the integration of high performance code written in parallel.

The team hopes their work will encourage the AI ​​community to optimize deep and ML frameworks for available hardware and explore performance limits.

This Article is written as a research summary article by Marktechpost Staff based on the research paper 'FLASHLIGHT: ENABLING INNOVATION IN TOOLS FOR MACHINE LEARNING'. All Credit For This Research Goes To Researchers on This Project. Check out the paper and github link.

Please Don't Forget To Join Our ML Subreddit

Tanushree Shenwai is an intern consultant at MarktechPost. She is currently pursuing her B.Tech from Indian Institute of Technology (IIT), Bhubaneswar. She is a Data Science enthusiast and has a keen interest in the scope of application of Artificial Intelligence in various fields. She is passionate about exploring new technological advancements and applying them to real life.