C++ machine learning library from Facebook AI Research with tape-based autograd, modular neural nets, and domain packages for speech, vision, and text research.
Overview
Flashlight is a C++ machine learning library aimed at research across image classification, object detection, and language modeling. It emphasizes a small core footprint, internal modifiability, and native C++ extension.
The codebase splits into a core tensor and autograd stack, flashlight/lib utilities, domain packages under flashlight/pkg, and sample applications under flashlight/app. Sequential module composition supports straightforward convnet-style networks and standard forward and backward passes.
Developers can install via vcpkg with CPU or CUDA backends, build from source with CMake, or use Docker. CUDA builds expect CUDA, cuDNN, and NCCL where applicable; CPU builds rely on BLAS libraries such as Intel MKL.
CMake targets such as flashlight::flashlight and domain packages export libraries for linking into custom C++ projects.
Key features
- Tape-based autograd on tensors
- Modular neural network layers
- Speech, vision, and text packages
- CUDA and CPU backend builds
- Distributed training support
- vcpkg and CMake installation
- Sample ASR and vision applications
- Python binding install path
Use cases
- C++ deep learning experiments
- Speech and language model research
- Image classification prototypes
- Linking ML into native applications