# Aprender — Pure Rust ML Framework
[Introduction](./introduction.md)
# Reference
- [Mutation Testing](./advanced-testing/mutation-testing.md)
- [Popperian Falsification Testing](./advanced-testing/popperian-falsification.md)
- [Crate Map](./architecture/crate-map.md)
- [Monorepo Layout](./architecture/monorepo-layout.md)
- [Provable Contracts](./architecture/provable-contracts.md)
- [API Design](./best-practices/api-design.md)
- [Builder Pattern](./best-practices/builder-pattern.md)
- [Documentation Standards](./best-practices/documentation-standards.md)
- [Error Handling](./best-practices/error-handling.md)
- [Performance](./best-practices/performance.md)
- [Type Safety](./best-practices/type-safety.md)
# Part I: Foundations
- [Why Rust for Machine Learning](./chapters/ch01-why-rust.md)
- [Tensor Computation](./chapters/ch02-tensors.md)
- [The APR Model Format](./chapters/ch03-apr-format.md)
# Part II: Algorithms
- [Supervised Learning](./chapters/ch04-supervised.md)
- [Unsupervised Learning](./chapters/ch05-unsupervised.md)
- [Ensemble Methods](./chapters/ch06-ensembles.md)
- [Model Selection and Evaluation](./chapters/ch07-model-selection.md)
# Part III: Deep Learning & Inference
- [Transformer Architecture](./chapters/ch08-transformer.md)
- [Inference with aprender-serve](./chapters/ch09-inference.md)
- [Training with aprender-train](./chapters/ch10-training.md)
- [Model Formats and Conversion](./chapters/ch11-formats.md)
# Part IV: Production
- [Serving and Deployment](./chapters/ch12-serving.md)
- [Profiling and Optimization](./chapters/ch13-profiling.md)
- [Provable Contracts](./chapters/ch14-contracts.md)
- [Orchestration and Agents](./chapters/ch15-orchestrate.md)
# Part V: Advanced Topics
- [Time Series Analysis](./chapters/ch16-timeseries.md)
- [Bayesian Methods](./chapters/ch17-bayesian.md)
- [Graph Algorithms](./chapters/ch18-graphs.md)
- [Text Processing and Tokenization](./chapters/ch19-text.md)
- [RAG Pipelines](./chapters/ch20-rag.md)
- [Benchmark: aprender-serve vs Candle](./chapters/ch21-vs-candle.md)
- [Benchmark: aprender-serve vs llama.cpp](./chapters/ch22-vs-llamacpp.md)
- [Benchmark: Training — PyTorch vs unsloth vs cuBLAS vs WGPU](./chapters/ch23-training-benchmarks.md)
- [Switch From PyTorch](./chapters/ch24-switch-from-pytorch.md)
- [Switch From Ollama](./chapters/ch25-switch-from-ollama.md)
- [Switch From ndarray/nalgebra/linfa](./chapters/ch26-switch-from-ndarray.md)
- [Switch From unsloth](./chapters/ch27-switch-from-unsloth.md)
# Reference
- [apr chat](./cli-reference/apr-chat.md)
- [apr convert](./cli-reference/apr-convert.md)
- [apr finetune](./cli-reference/apr-finetune.md)
- [apr inspect](./cli-reference/apr-inspect.md)
- [apr pull](./cli-reference/apr-pull.md)
- [apr run](./cli-reference/apr-run.md)
- [apr serve](./cli-reference/apr-serve.md)
- [apr validate](./cli-reference/apr-validate.md)
- [Ant Colony Optimization for TSP](./examples/aco-tsp.md)
- [Case Study: ADMM Optimization](./examples/admm-optimization.md)
- [Case Study: Advanced Merge Strategies](./examples/advanced-merge.md)
- [Advanced NLP: Similarity, Entities, and Summarization](./examples/advanced-nlp.md)
- [Case Study: APR Model Cache](./examples/apr-cache.md)
- [APR Checkpoint Lifecycle](./examples/apr-checkpoint-lifecycle.md)
- [Case Study: APR CLI Commands Demo](./examples/apr-cli-commands.md)
- [Case Study: APR CLI Tool Demo](./examples/apr-cli-demo.md)
- [Case Study: APR Data Embedding](./examples/apr-embed.md)
- [The .apr Format: A Five Whys Deep Dive](./examples/apr-format-deep-dive.md)
- [Case Study: APR Model Inspection](./examples/apr-inspection.md)
- [Case Study: APR Loading Modes](./examples/apr-loading-modes.md)
- [Case Study: APR 100-Point Quality Scoring](./examples/apr-scoring.md)
- [Case Study: APR with JSON Metadata](./examples/apr-with-metadata.md)
- [Case Study: Audio Mel Spectrogram Processing](./examples/audio-mel-spectrogram.md)
- [Case Study: Automatic Differentiation for Neural Network Training](./examples/autograd-training.md)
- [Case Study: AutoML Clustering (TPE)](./examples/automl-clustering.md)
- [Case Study: Batch Optimization](./examples/batch-optimization.md)
- [Case Study: Batuta - Automated Migration to Aprender](./examples/batuta-integration.md)
- [Bayesian Blocks Histogram](./examples/bayesian-blocks-histogram.md)
- [Benchmark Comparison](./examples/bench-comparison.md)
- [Case Study: Beta-Binomial Bayesian Inference](./examples/beta-binomial-inference.md)
- [Case Study: Bundle Trace Demo](./examples/bundle-trace-demo.md)
- [Case Study: cbtop Profiling Pipeline Falsification (GH-420)](./examples/cbtop-profiling-falsification.md)
- [Case Study: Chat Templates for LLM Inference](./examples/chat-template.md)
- [Case Study: CITL Automated Program Repair](./examples/citl-automated-repair.md)
- [Case Study: Neural Network Classification](./examples/classification-training.md)
- [Code Analysis with Code2Vec and MPNN](./examples/code-analysis.md)
- [Case Study: Code-Aware EDA (Easy Data Augmentation)](./examples/code-eda.md)
- [Case Study: Code Feature Extraction for Defect Prediction](./examples/code-feature-extractor.md)
- [Case Study: Community Detection with Louvain](./examples/community-detection.md)
- [Case Study: Constrained Optimization](./examples/constrained-optimization.md)
- [Case Study: Content-Based Recommendation System](./examples/content-recommender.md)
- [Case Study: Continual Pre-Training (CPT)](./examples/continual-pretraining.md)
- [Case Study: Convex Optimization](./examples/convex-optimization.md)
- [Conv Layout Optimization Dogfood](./examples/conv-layout-dogfood.md)
- [Case Study: Create Test APR Files](./examples/create-test-apr.md)
- [Create Test Transformer APR](./examples/create-test-transformer-apr.md)
- [Case Study: Cross-Validation Implementation](./examples/cross-validation.md)
- [Case Study: CUDA and GPU Backends](./examples/cuda-backend.md)
- [Building Custom Error Classifiers](./examples/custom-error-classifier.md)
- [Case Study: Differentiable Adaptive Merging (DAM)](./examples/dam-merge.md)
- [Data Preprocessing with Scalers](./examples/data-preprocessing-scalers.md)
- [Data Quality Pipeline](./examples/data-quality-pipeline.md)
- [Case Study: DBSCAN Clustering Implementation](./examples/dbscan-clustering.md)
- [Decision Tree Regression - Housing Price Prediction](./examples/decision-tree-regression.md)
- [Case Study: Descriptive Statistics](./examples/descriptive-statistics.md)
- [Design by Contract](./examples/design-by-contract.md)
- [Case Study: Differential Evolution for Hyperparameter Optimization](./examples/differential-evolution.md)
- [Case Study: Dirichlet-Multinomial Bayesian Inference](./examples/dirichlet-multinomial-inference.md)
- [Case Study: Advanced Distillation Strategies](./examples/distillation-advanced.md)
- [Case Study: Direct Preference Optimization (DPO)](./examples/dpo-preference.md)
- [Case Study: Evaluation Harness](./examples/eval-harness.md)
- [Case Study: Evolutionary Merge Optimization](./examples/evolutionary-merge.md)
- [Examples Reference](./examples/examples-reference.md)
- [Model Explainability and Audit Trails](./examples/explainability-audit.md)
- [Case Study: Federation Gateway](./examples/federation-gateway.md)
- [Case Study: Federation Routing Policies](./examples/federation-routing.md)
- [Case Study: Gamma-Poisson Bayesian Inference](./examples/gamma-poisson-inference.md)
- [Case Study: Gradient Boosting Iris](./examples/gbm-iris.md)
- [Case Study: Gaussian Mixture Models (GMM) Implementation](./examples/gmm-clustering.md)
- [Case Study: Graph Neural Networks for Node Classification](./examples/gnn-node-classification.md)
- [Case Study: Comprehensive Graph Algorithms Demo](./examples/graph-algorithms-comprehensive.md)
- [Case Study: Social Network Analysis](./examples/graph-social-network.md)
- [Grid Search Hyperparameter Tuning](./examples/grid-search-tuning.md)
- [Case Study: Hex Forensics — Format-Aware Binary Inspection](./examples/hex-forensics.md)
- [Case Study: Hierarchical Clustering Implementation](./examples/hierarchical-clustering.md)
- [Case Study: Isolation Forest Implementation](./examples/isolation-forest-anomaly.md)
- [Case Study: KNN Iris](./examples/knn-iris.md)
- [Case Study: Local Outlier Factor (LOF) Implementation](./examples/lof-anomaly.md)
- [Logic Family Tree - Logic Programming Example](./examples/logic-family-tree.md)
- [Logistic Regression](./examples/logistic-regression.md)
- [Case Study: Lottery Ticket Pruning](./examples/lottery-ticket-pruning.md)
- [Case Study: Apriori Implementation](./examples/market-basket-apriori.md)
- [Memory Test Full - Comprehensive Memory Validation](./examples/mem-test-full.md)
- [Memory Test - Memory Validation Example](./examples/mem-test.md)
- [Case Study: Metaheuristics Optimization](./examples/metaheuristics-optimization.md)
- [Case Study: Mixture of Experts (MoE)](./examples/mixture-of-experts.md)
- [Case Study: Model Bundling and Memory Paging](./examples/model-bundling-paging.md)
- [Case Study: Model Serialization (.apr Format)](./examples/model-format.md)
- [Case Study: Model Merge Strategies (GH-245)](./examples/model-merge-strategies.md)
- [Case Study: Model Serialization with SafeTensors](./examples/model-serialization.md)
- [Case Study: Model Serving](./examples/model-serving.md)
- [Case Study: Model Zoo](./examples/model-zoo.md)
- [Case Study: Mixture of Experts Construction](./examples/moe-construction.md)
- [Case Study: Monte Carlo Financial Simulation](./examples/monte-carlo-simulation.md)
- [Case Study: Naive Bayes Iris](./examples/naive-bayes-iris.md)
- [Negative Binomial GLM for Overdispersed Count Data](./examples/negative-binomial-glm.md)
- [Case Study: Neural Network Training Pipeline](./examples/neural-network-training.md)
- [Case Study: Advanced NLP Features](./examples/nlp-advanced.md)
- [Case Study: Normal-InverseGamma Bayesian Inference](./examples/normal-inverse-gamma-inference.md)
- [Case Study: Online Learning and Dynamic Retraining](./examples/online-learning.md)
- [Case Study: PCA Iris](./examples/pca-iris.md)
- [Case Study: Per-Layer Merge Granularity](./examples/per-layer-merge.md)
- [Phi HuggingFace Import - Model Import Example](./examples/phi-hf-import.md)
- [Data Quality Pipeline for Fine-Tuning (GH-453)](./examples/pii-filtering.md)
- [Case Study: Pipeline Verification System](./examples/pipeline-verification.md)
- [Case Study: Poka-Yoke Validation (APR-POKA-001)](./examples/poka-yoke-validation.md)
- [Predator-Prey Ecosystem Optimization](./examples/predator-prey-optimization.md)
- [Case Study: Probar TUI Testing](./examples/probar-tui-testing.md)
- [Case Study: Magnitude Pruning](./examples/pruning-magnitude.md)
- [Case Study: PTX Parity Validation (GH-219)](./examples/ptx-parity-validation.md)
- [Publish Shell Safety Classifier](./examples/publish-shell-safety.md)
- [QA: apr chat Falsification Suite](./examples/qa-chat.md)
- [Case Study: QA Falsification Protocol (PMAT-098)](./examples/qa-falsification.md)
- [QA Infrastructure Falsification Tests](./examples/qa-falsify.md)
- [Qwen3.5 Hybrid Attention Architecture](./examples/qwen3.5-hybrid-attention.md)
- [Qwen APR Native - Native APR Format Inference](./examples/qwen-apr-native.md)
- [Qwen Chat - Interactive Chat Example](./examples/qwen-chat.md)
- [Qwen Inference — LLM Inference with realizar](./examples/qwen-inference.md)
- [Case Study: Qwen2.5-Coder QA Playbook Results (2026-01-30)](./examples/qwen-qa-playbook.md)
- [Random Forest Regression - Housing Price Prediction](./examples/random-forest-regression.md)
- [Case Study: Content-Based Recommendations](./examples/recommend-content.md)
- [Case Study: Reinforcement Learning on Verifiable Rewards (RLVR)](./examples/rlvr.md)
- [Case Study: Rosetta Stone — Universal Model Format Converter](./examples/rosetta-stone.md)
- [Case Study: Sharded SafeTensors Serving (GH-213)](./examples/sharded-safetensors-serve.md)
- [Case Study: Shell Completion Benchmarks](./examples/shell-completion-benchmarks.md)
- [Case Study: AI Shell Completion](./examples/shell-completion.md)
- [Case Study: Model Encryption Tiers (Plain → Compressed → At-Rest → Homomorphic)](./examples/shell-encryption-tiers.md)
- [Case Study: Publishing Shell Models to Hugging Face Hub](./examples/shell-hf-hub-publishing.md)
- [Developer's Guide to Shell History Models](./examples/shell-history-developer-guide.md)
- [Case Study: Homomorphic Encryption for Shell Models](./examples/shell-homomorphic-encryption.md)
- [Shell Model Format Verification](./examples/shell-model-format.md)
- [Shell Safety Classifier Inference](./examples/shell-safety-inference.md)
- [Shell Safety Classifier Training](./examples/shell-safety-training.md)
- [Showcase Benchmark](./examples/showcase-benchmark.md)
- [Case Study: Sovereign AI Offline Mode](./examples/sovereign-offline.md)
- [Case Study: Sovereign AI Stack Integration](./examples/sovereign-stack.md)
- [Case Study: Spectral Clustering Implementation](./examples/spectral-clustering.md)
- [Case Study: State Machine Playbooks](./examples/state-machine-playbooks.md)
- [Case Study: Linear SVM Iris](./examples/svm-iris.md)
- [Case Study: Synthetic Data Generation for ML](./examples/synthetic-data-generation.md)
- [Tabu Search for TSP](./examples/tabu-tsp.md)
- [Case Study: TensorLogic Neuro-Symbolic Reasoning](./examples/tensorlogic-reasoning.md)
- [Text Classification with TF-IDF](./examples/text-classification.md)
- [Text Preprocessing for NLP](./examples/text-preprocessing.md)
- [ARIMA Time Series Forecasting](./examples/time-series-forecasting.md)
- [Case Study: Tokenizer Surgery](./examples/tokenizer-surgery.md)
- [Case Study: Topic Modeling & Sentiment Analysis](./examples/topic-sentiment-analysis.md)
- [Case Study: Tracing Memory Paging with Renacer](./examples/tracing-memory-paging.md)
- [Case Study: Trueno Compute Integration](./examples/trueno-compute-integration.md)
- [Case Study: t-SNE Implementation](./examples/tsne-visualization.md)
- [Case Study: aprender-tsp Sub-Crate for Scientific TSP Research](./examples/tsp-solver-crate.md)
- [Case Study: Validated Tensors — Compile-Time Contract Enforcement](./examples/validated-tensors.md)
- [Whisper Transcribe - Audio Transcription Example](./examples/whisper-transcribe.md)
- [Case Study: XOR Neural Network](./examples/xor-neural-network.md)
- [Case Study: XOR Neural Network Training](./examples/xor-training.md)
- [First Inference](./getting-started/first-inference.md)
- [First Server](./getting-started/first-server.md)
- [First Training](./getting-started/first-training.md)
- [Installation](./getting-started/installation.md)
- [The RED-GREEN-REFACTOR Cycle](./methodology/red-green-refactor.md)
- [Test-First Philosophy](./methodology/test-first-philosophy.md)
- [What is EXTREME TDD?](./methodology/what-is-extreme-tdd.md)
- [Zero Tolerance Quality](./methodology/zero-tolerance.md)
- [Active Learning Theory](./ml-fundamentals/active-learning.md)
- [Advanced Optimizers Theory](./ml-fundamentals/advanced-optimizers.md)
- [Apriori Algorithm Theory](./ml-fundamentals/apriori.md)
- [Audio Processing Theory](./ml-fundamentals/audio-processing.md)
- [Automatic Differentiation Theory](./ml-fundamentals/automatic-differentiation.md)
- [AutoML: Automated Machine Learning](./ml-fundamentals/automl.md)
- [Bayesian Inference Theory](./ml-fundamentals/bayesian-inference.md)
- [Chaos Engineering for ML Systems](./ml-fundamentals/chaos-engineering.md)
- [Classification Metrics Theory](./ml-fundamentals/classification-metrics.md)
- [Compiler-in-the-Loop Learning](./ml-fundamentals/compiler-in-the-loop.md)
- [Cross-Validation Theory](./ml-fundamentals/cross-validation.md)
- [Decision Trees Theory](./ml-fundamentals/decision-trees.md)
- [Descriptive Statistics Theory](./ml-fundamentals/descriptive-statistics.md)
- [Ensemble Methods Theory](./ml-fundamentals/ensemble-methods.md)
- [Feature Scaling Theory](./ml-fundamentals/feature-scaling.md)
- [LoRA Fine-Tuning](./ml-fundamentals/fine-tuning.md)
- [Gradient Descent Theory](./ml-fundamentals/gradient-descent.md)
- [Graph Algorithms Theory](./ml-fundamentals/graph-algorithms.md)
- [Graph Components and Traversal Algorithms](./ml-fundamentals/graph-components-traversal.md)
- [Graph Link Prediction and Community Detection](./ml-fundamentals/graph-link-prediction.md)
- [Graph Neural Networks Theory](./ml-fundamentals/graph-neural-networks.md)
- [Graph Pathfinding Algorithms](./ml-fundamentals/graph-pathfinding.md)
- [K-Means Clustering Theory](./ml-fundamentals/kmeans-clustering.md)
- [K-Nearest Neighbors (kNN)](./ml-fundamentals/knn.md)
- [Linear Regression Theory](./ml-fundamentals/linear-regression.md)
- [Logistic Regression Theory](./ml-fundamentals/logistic-regression.md)
- [Lottery Ticket Hypothesis](./ml-fundamentals/lottery-ticket-hypothesis.md)
- [Metaheuristics Theory](./ml-fundamentals/metaheuristics.md)
- [Monte Carlo Simulation Theory](./ml-fundamentals/monte-carlo.md)
- [Naive Bayes](./ml-fundamentals/naive-bayes.md)
- [Neural Network Pruning Theory](./ml-fundamentals/neural-network-pruning.md)
- [Neuro-Symbolic Reasoning Theory](./ml-fundamentals/neuro-symbolic.md)
- [Online Learning Theory](./ml-fundamentals/online-learning.md)
- [Principal Component Analysis (PCA)](./ml-fundamentals/pca.md)
- [Probability Calibration Theory](./ml-fundamentals/probability-calibration.md)
- [Machine Learning Fundamentals - Author Guide](./ml-fundamentals/README.md)
- [Regression Metrics Theory](./ml-fundamentals/regression-metrics.md)
- [Regularization Theory](./ml-fundamentals/regularization.md)
- [Speech and Voice Processing Theory](./ml-fundamentals/speech-voice-processing.md)
- [Support Vector Machines (SVM)](./ml-fundamentals/svm.md)
- [Transfer Learning Theory](./ml-fundamentals/transfer-learning.md)
- [t-SNE Theory](./ml-fundamentals/tsne.md)
- [Weak Supervision Theory](./ml-fundamentals/weak-supervision.md)
- [WebAssembly for Machine Learning](./ml-fundamentals/webassembly-ml.md)
- [Jidoka (Autonomation)](./quality-gates/jidoka.md)
- [apr - APR Model Operations CLI](./tools/apr-cli.md)
- [APR Complete Specification](./tools/apr-spec.md)
- [aprender-mcp — Model Context Protocol Server](./tools/mcp-server.md)