DeepJ documentation
From tensors to neural networks.
Understand the shared APIs, choose a model type, and follow its training and persistence contracts.
These guides document DeepJ 0.13.0-alpha.
Training guides
Train your model.
Start with the model training guide. To share training work across multiple machines, use the optional distributed module.
Training a model
Training APIs by model type, batching, losses, optimizers, and evaluation mode, including language-model training.
Read guideDistributed training
Train across multiple machines with CPU or Metal workers. Learn to set up workers, divide the data, synchronize gradients, and restore checkpoints.
Read guideCore guides
One shared library.
Tensors and precision
Shapes, views, broadcasting, dtypes, and storage.
Read guideAutomatic differentiation
Gradient recording, backward, mutation checks, and graph lifetime.
Read guideNetworks and layers
MLPs, CNNs, recurrence, autoencoders, Transformer encoders, and composition.
Read guideTraining a model
Batching, differentiable losses, optimizers, and training/evaluation mode.
Read guideSaving and loading
Parameters, persistent buffers, model checkpoints, and caller-managed state.
Read guideCPU and Metal
Select a backend, understand device execution, and manage temporary tensors.
Read guideLanguage models
Specialist model tools.
Language models and chat
Decoder families, tokenization, Frisky, loading, and desktop chat.
Read guideIncremental generation
KV caches, explicit sessions, context windows, and rolling generation.
Read guideCommand line
Streaming chat, generation, settings, themes, and scripts.
Read guideReference and verification
Read the API. Check the behavior.
API reference
Generated classes and methods for DeepJ networks, layers, and tensors.
Read guideTests and coverage
Portable and full hardware-dependent build profiles.
Read guideCoding and regression standards
Numerical references, state restoration, performance, and memory qualification.
Read guide