jitNN 0.1.0-SNAPSHOT API
Package
Description
The jitNN API:
Tensor (n-dimensional arrays, lazy on TornadoVM
devices), reverse-mode differentiation (Tensor.backward(), Grad),
the functional operators of F, linear algebra (Linalg),
Fourier transforms (Fft), sparse matrices (SparseMatrix),
mixed precision (Autocast) and user-defined operators
(CustomOp).Datasets: MNIST and CIFAR-10 readers, a byte-level text corpus, and synthetic data, held in memory as
a
Dataset.Several devices: collectives (all-reduce, broadcast, reduce-scatter, all-gather) among ranks,
staged through the host (
HostCollective) or run by NCCL on NVIDIA GPUs
(NcclCollective), and ProcessGroup, which
runs one rank per device.A Deep Java Library engine named
jitNN: DJL's NDArrays, blocks, Trainer and
Predictor run on jitNN (JitnnEngine).The execution engine, which records operators in a per-thread trace and, at a sync point, compiles
the trace into one TornadoVM task graph, cached by structure and replayed, or runs it on the host
with the double-precision reference.
The GGUF reader (llama.cpp's model format):
GgufFile gives a file's
metadata and its tensors, memory-mapped without a copy, in their quantised blocks or as F32, F16
and BF16.Checkpoints: named tensors and values (
StateDict) saved and loaded in
Hugging Face's safetensors format (SafeTensors).Classical machine learning after scikit-learn, run on the device: k-means, k-nearest neighbours,
PCA, linear and logistic regression, linear SVM, naive Bayes, decision trees, random forests,
gradient boosting and t-SNE.
Neural-network modules after PyTorch's
torch.nn: Module and
Sequential, linear and convolution layers, pooling, normalisation,
attention, embeddings, recurrent layers (LSTM, GRU), graph convolution, activations, and data-parallel
training (DataParallel).Complete models: ResNet, MobileNetV2, GPT-2, a Llama-style decoder, BERT, a VAE, DCGAN, U-Net and
character RNNs, and the embedding models word2vec, doc2vec and GloVe.
Optimisers with PyTorch's semantics (SGD, Adam and AdamW, AdaGrad, RMSProp, AdaDelta, AdaMax,
NAdam, LAMB, LARS), learning-rate schedules (
LRScheduler) and dynamic
loss scaling for FP16 training (GradScaler).Vocabularies and training examples for the embedding models in
ai.beestream.jitnn.nn.models.The ONNX importer:
OnnxSession loads an ONNX file and runs it on
jitNN's operators.The TensorFlow importer:
TfModel loads SavedModels and frozen GraphDefs,
translating them into ONNX graphs that the ONNX importer runs on jitNN.