# JBit / Jacobit C++20 Machine Learning Framework > Header-oriented C++20 framework for building, training, and serving dense, convolutional, recurrent, and transformer neural networks (decoder-only & encoder-decoder), BBPE/Unigram tokenizers, streaming corpus pre-training, multi-GPU CUDA, bitmap/audio I/O, ONNX/GGUF export, and an OpenAI-compatible HTTP server. Full Markdown corpus for one-shot LLM/RAG ingestion: https://jbit.dev/docs/llms-full.txt ## Core Guides - [Introduction, CMake Configurator & Model Simulator](https://jbit.dev/docs/index.html): Architecture overview, interactive CMake generator, model chooser wizard, and Decoder-Only parameter/VRAM simulator. - [Examples (20 Complete C++20 Programs)](https://jbit.dev/docs/examples.html): Filterable runnable C++20 examples covering dense stacks, CNNs, LSTMs, tokenizers, pre-training, chat fine-tuning, multi-GPU CUDA, HTTP serving, images/audio, and ONNX/GGUF. - [Best Practices & LR Curve Visualiser](https://jbit.dev/docs/best-practices.html): 37 engineering & scaling-law guidelines plus interactive learning-rate schedule visualiser. ## Modular API Reference (19 Modules) - [API Reference Directory](https://jbit.dev/docs/api/index.html): Complete index of 305 classes and 7,233 members across 206 headers. - [Core API](https://jbit.dev/docs/api/core-api.html): 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](https://jbit.dev/docs/api/configuration.html): Global arithmetic precision typedef (real_t in Config/precision.hpp) defaulting to float (FP32) or double (FP64) via -DJACOBIT_REAL_DOUBLE. - [Types](https://jbit.dev/docs/api/types.html): Portable IEEE 754 binary16 half-precision type (real_fp16_t in Type/real_fp16_t.hpp) usable with or without CUDA. - [Maths](https://jbit.dev/docs/api/maths.html): Contiguous tensor containers (Tensor1D, PayloadTensor1D, Tensor2D, Tensor3D) and thread-local RealStorage checkpoint width guards. - [Utilities](https://jbit.dev/docs/api/utilities.html): Zero-dependency JSON DOM (JSONObject, JSONArray, JSONVariant), tabular Cursor, indexed Map, String, and tagged Variant. - [File & matrix I/O](https://jbit.dev/docs/api/file-matrix-io.html): File reader/writer, constant-memory streaming corpus reader (File::SeparatorReader) with byte-offset checkpointing, and generic MatrixBase. - [Bitmap I/O](https://jbit.dev/docs/api/bitmap-io.html): Native BMP, JPEG, and PNG readers/writers, spatial/color transforms, and direct planar [C, H, W] Tensor1D/2D/3D conversions. - [Audio I/O](https://jbit.dev/docs/api/audio-io.html): 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](https://jbit.dev/docs/api/audio-processing.html): Low-level RIFF/WAVE waveform tensor extractor and channel deinterleaver (AudioProcessor.hpp). - [Text & tokenizers](https://jbit.dev/docs/api/text-tokenizers.html): Byte-Level BPE & SentencePiece Unigram tokenizers (Hugging Face tokenizer.json compatible), BERT WordPiece, scaling-law ModelAdvisor, and BatchPayloadArena. - [Model base](https://jbit.dev/docs/api/model-base.html): Base Model interface (context window tracking, RAM/VRAM breakdown, gradient accumulation, multi-GPU config, checkpoints) plus GGUF v3 & ONNX readers/writers. - [Layers, Activations & Losses](https://jbit.dev/docs/api/layers-activations-losses.html): 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](https://jbit.dev/docs/api/optimizers-schedules.html): 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](https://jbit.dev/docs/api/training-models.html): Trainable neural models: TrainingDecoderOnlyModel, TrainingEncoderDecoderModel, TrainingModel, TrainingRnnModel, and CUDA subclasses. - [Model builders](https://jbit.dev/docs/api/model-builders.html): Fluent builders for all training and inference model families: TrainingDecoderOnlyModelBuilder, TrainingEncoderDecoderModelBuilder, TrainingModelBuilder, TrainingRnnModelBuilder, and Inference*ModelBuilder. - [Inference models](https://jbit.dev/docs/api/inference-models.html): 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](https://jbit.dev/docs/api/corpus-chat-checkpoints.html): Multi-turn ChatConversation/ChatOptions/ChatFormat, resumable streaming packers (LmPacker, QaPacker, ChatPacker, corpus::Cursor), and TrainingProgressMonitor. - [CUDA backends](https://jbit.dev/docs/api/cuda-backends.html): Single- and multi-GPU CUDA execution engines (DecoderOnlyCudaBackend, EncoderDecoderCudaBackend, SequentialCudaBackend), CUDA Graph capture, cuBLAS GEMMs, REPLICATE/LAYER_SPLIT/HYBRID policies, and automatic failover. - [Server](https://jbit.dev/docs/api/server.html): 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.