Lamp is a deep learning library for Scala with native CPU and GPU backend.
Lamp is inspired by pytorch. The foundation of lamp is a JNI binding to ATen, the C++ tensor backend of torch (see here). As a consequence lamp uses fast CPU and GPU code and stores its data in off-heap memory.
Lamp provides CPU or GPU backed n-dimensional arrays and implements generic automatic reverse mode differentiation (also known as autograd, see e.g. this paper). Lamp may be used for scientific computing similarly to numpy, or to build neural networks.
It provides neural networks components:
- fully connected, 1D and 2D convolutional, embedding, RNN, GRU, LSTM, GCN, self-attention (transformer) layers
- various nonlinearities
- batch normalization and weight normalization
- optimizers: SgdW, AdamW (see here), RAdam, Yogi
- training loop and data loaders on top of cats-effect
- checkpointing, ONNX export, NPY and CSV import