API reference
Organized into 19 lightweight module pages so every class, enum, and function signature loads instantaneously, indexes cleanly in search engines, and fits comfortably inside AI agent context windows.
All 19 API Modules
Top-level static facade (Jacobit.hpp) for launching the OpenAI-compatible HTTP server, creating model builders, loading images/audio into tensors, training BBPE/Unigram tokenizers, and importing/exporting ONNX and GGUF.
Global arithmetic precision typedef (real_t in Config/precision.hpp) defaulting to float (FP32) or double (FP64) via -DJACOBIT_REAL_DOUBLE.
Portable IEEE 754 binary16 half-precision type (real_fp16_t in Type/real_fp16_t.hpp) usable with or without CUDA.
Contiguous tensor containers (Tensor1D, PayloadTensor1D, Tensor2D, Tensor3D) and thread-local RealStorage checkpoint width guards.
Zero-dependency JSON DOM (JSONObject, JSONArray, JSONVariant), tabular Cursor, indexed Map<T,Q>, String, and tagged Variant.
File reader/writer, constant-memory streaming corpus reader (File::SeparatorReader) with byte-offset checkpointing, and generic MatrixBase<T>.
Native BMP, JPEG, and PNG readers/writers, spatial/color transforms, and direct planar [C, H, W] Tensor1D/2D/3D conversions.
WAV (PCM/Float/ADPCM/u-Law/A-Law), MP3, and AAC audio I/O with FFT/STFT, Log-Mel spectrograms, MFCCs, and Griffin-Lim inversion.
Low-level RIFF/WAVE waveform tensor extractor and channel deinterleaver (AudioProcessor.hpp).
Byte-Level BPE & SentencePiece Unigram tokenizers (Hugging Face tokenizer.json compatible), BERT WordPiece, scaling-law ModelAdvisor, and BatchPayloadArena.
Base Model interface (context window tracking, RAM/VRAM breakdown, gradient accumulation, multi-GPU config, checkpoints) plus GGUF v3 & ONNX readers/writers.
Core layers (Dense, Dropout), Transformer layers (MaskedRoPEMultiHeadSelfAttention, FlashAttention, Pre-LN DecoderOnlyBlock, YaRN, XPos, ALiBi), Conv1D/2D/3D, LSTM/GRU/BidirectionalRnn, 9 activations, and 19 loss functions.
10 optimizers (AdamW, Adam, SGD, RMSprop, Adagrad, Adadelta, Adamax, NAG, Rprop, AdamWithRegularization), global L2 gradient clipping, decoupled weight decay, and 11 learning-rate schedulers.
Trainable neural models: TrainingDecoderOnlyModel, TrainingEncoderDecoderModel, TrainingModel, TrainingRnnModel, and CUDA subclasses.
Fluent builders for all training and inference model families: TrainingDecoderOnlyModelBuilder, TrainingEncoderDecoderModelBuilder, TrainingModelBuilder, TrainingRnnModelBuilder, and Inference*ModelBuilder.
Forward-only inference models with zero gradient or optimizer memory overhead and O(1)-step KV-cache decoding: InferenceDecoderOnlyModel, InferenceEncoderDecoderModel, InferenceModel, InferenceRnnModel.
Multi-turn ChatConversation/ChatOptions/ChatFormat, resumable streaming packers (LmPacker, QaPacker, ChatPacker, corpus::Cursor), and TrainingProgressMonitor.
Single- and multi-GPU CUDA execution engines (DecoderOnlyCudaBackend, EncoderDecoderCudaBackend, SequentialCudaBackend), CUDA Graph capture, cuBLAS GEMMs, REPLICATE/LAYER_SPLIT/HYBRID policies, and automatic failover.
Embedded multi-threaded HTTP server (JBitServer in Server/JBitServer.hpp) implementing OpenAI-compatible /v1/chat/completions, /v1/completions, /v1/models, and /health with SSE token streaming.
Header Coverage
| Metric | Count | Notes |
|---|---|---|
| Header files | 206 | C++20 headers under src/ |
| Classes & structs | 305 | Grouped across 19 logical modules |
| Declared members | 7,233 | Constructors, methods, operators, typedefs, fields |
| Free functions & typedefs | 323 | Namespace helpers, CUDA kernels, precision aliases |