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

Showing 19 modules
Core API → 1 class

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.

Configuration → 0 classes

Global arithmetic precision typedef (real_t in Config/precision.hpp) defaulting to float (FP32) or double (FP64) via -DJACOBIT_REAL_DOUBLE.

Types → 1 class

Portable IEEE 754 binary16 half-precision type (real_fp16_t in Type/real_fp16_t.hpp) usable with or without CUDA.

Maths → 5 classes

Contiguous tensor containers (Tensor1D, PayloadTensor1D, Tensor2D, Tensor3D) and thread-local RealStorage checkpoint width guards.

Utilities → 6 classes

Zero-dependency JSON DOM (JSONObject, JSONArray, JSONVariant), tabular Cursor, indexed Map<T,Q>, String, and tagged Variant.

File & matrix I/O → 3 classes

File reader/writer, constant-memory streaming corpus reader (File::SeparatorReader) with byte-offset checkpointing, and generic MatrixBase<T>.

Bitmap I/O → 2 classes

Native BMP, JPEG, and PNG readers/writers, spatial/color transforms, and direct planar [C, H, W] Tensor1D/2D/3D conversions.

Audio I/O → 2 classes

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.

Audio processing → 1 class

Low-level RIFF/WAVE waveform tensor extractor and channel deinterleaver (AudioProcessor.hpp).

Text & tokenizers → 3 classes

Byte-Level BPE & SentencePiece Unigram tokenizers (Hugging Face tokenizer.json compatible), BERT WordPiece, scaling-law ModelAdvisor, and BatchPayloadArena.

Model base → 3 classes

Base Model interface (context window tracking, RAM/VRAM breakdown, gradient accumulation, multi-GPU config, checkpoints) plus GGUF v3 & ONNX readers/writers.

Layers, Activations & Losses → 4 classes

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.

Optimizers & LR schedules → 2 classes

10 optimizers (AdamW, Adam, SGD, RMSprop, Adagrad, Adadelta, Adamax, NAG, Rprop, AdamWithRegularization), global L2 gradient clipping, decoupled weight decay, and 11 learning-rate schedulers.

Training models → 3 classes

Trainable neural models: TrainingDecoderOnlyModel, TrainingEncoderDecoderModel, TrainingModel, TrainingRnnModel, and CUDA subclasses.

Model builders → 2 classes

Fluent builders for all training and inference model families: TrainingDecoderOnlyModelBuilder, TrainingEncoderDecoderModelBuilder, TrainingModelBuilder, TrainingRnnModelBuilder, and Inference*ModelBuilder.

Inference models → 2 classes

Forward-only inference models with zero gradient or optimizer memory overhead and O(1)-step KV-cache decoding: InferenceDecoderOnlyModel, InferenceEncoderDecoderModel, InferenceModel, InferenceRnnModel.

Corpus, chat & checkpoints → 3 classes

Multi-turn ChatConversation/ChatOptions/ChatFormat, resumable streaming packers (LmPacker, QaPacker, ChatPacker, corpus::Cursor), and TrainingProgressMonitor.

CUDA backends → 2 classes

Single- and multi-GPU CUDA execution engines (DecoderOnlyCudaBackend, EncoderDecoderCudaBackend, SequentialCudaBackend), CUDA Graph capture, cuBLAS GEMMs, REPLICATE/LAYER_SPLIT/HYBRID policies, and automatic failover.

Server → 2 classes

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

MetricCountNotes
Header files206C++20 headers under src/
Classes & structs305Grouped across 19 logical modules
Declared members7,233Constructors, methods, operators, typedefs, fields
Free functions & typedefs323Namespace helpers, CUDA kernels, precision aliases