Özer Cem KELAHMETKELAHMET
Learning

Learning

Every way a model learns: supervised, unsupervised, semi-supervised, self-supervised and contrastive learning, reinforcement learning, RLHF, DPO, RLAIF, RL with verifiable rewards, fine-tuning, active, continual and imitation learning, with simulations you can run.

Download Markdown

November 2026 9

Unsupervised learning12 minNewUnsupervised learning explained: clustering, PCA, density estimation and anomaly detectionHow unsupervised learning finds structure without labels: k-means, HDBSCAN, PCA, Gaussian mixtures and isolation forests, with worked numbers and runnable code.Read Supervised learning14 minNewSupervised learning explained: losses, generalisation and honest evaluation, step by stepHow supervised learning works: regression and classification losses, why models generalise or overfit, and how to evaluate them honestly with scikit-learn 1.9.Read Semi-supervised learning12 minNewSemi-supervised learning explained: pseudo-labels, consistency training and label propagationHow semi-supervised learning turns a few labels and lots of unlabelled data into a better model: self-training, FixMatch and label propagation, with code.Read Self-supervised learning12 minNewSelf-supervised learning explained: masked and next-token prediction behind foundation modelsHow self-supervised learning creates labels from raw data: next-token and masked prediction, perplexity, scaling rules and a tiny PyTorch model you can run.Read Contrastive learning12 minNewContrastive learning explained: InfoNCE, SimCLR and CLIP with worked numbers and PyTorch codeHow contrastive learning trains embeddings by pulling matching pairs together and pushing others apart: the InfoNCE loss, temperature, SimCLR, CLIP and code.Read Concepts12 minNewLoRA in depth: rank, alpha, rsLoRA scaling, DoRA and smarter initialisationHow LoRA adapters work mathematically, what rank and alpha really control, why rsLoRA changes the scale, and when DoRA or PiSSA initialisation is worth using.Read Concepts13 minNewGRPO loss variants explained: advantages, length bias, DAPO, Dr. GRPO and soft clippingHow GRPO computes group-relative advantages, why its original loss is biased by response length, and how DAPO, Dr. GRPO and SAPO change the maths in practice.Read Concepts12 minNewHow DPO works: deriving the loss, reading the implicit reward and choosing a variantHow Direct Preference Optimization works: where the loss comes from, what beta does, how to read DPO metrics, and when IPO, SimPO or robust DPO help.Read Trends14 minNewWhat RL on expert-built tasks teaches Nemotron 3.5 Super, one LoRA adapter at a timeA new paper trains five rank-32 LoRA adapters on Nemotron 3.5 Super with CISPO and no SFT. We explain the method, the 12 benchmark gains and the failure modes.Read

01Simulations 39

Interactive simulations of learning methods: change the labels, rewards or preferences and watch the model learn step by step.

Learning methodsIntermediate5 minNewReal computationYour inputStep by stepActive learning with uncertainty sampling: least confidence, margin and entropy comparedA model trained on six iris flowers scores 24 unlabelled ones. Compare least confidence, margin and entropy, and see which flowers each sends to a human.Open simulation Learning methodsAdvanced5 minNewReal computationYour inputStep by stepPPO's clipped objective step by step: probability ratios, clipping and the approximate KLRun several epochs of PPO on one batch of sixteen actions and watch clipping switch gradients off, the ratio stall near 1 ± ε and the KL stay small.Open simulation Learning methodsIntermediate4 minNewReal computationYour inputStep by stepPseudo-labelling with a confidence threshold: how FixMatch turns unlabelled data into labelsForty unlabelled digits, a model trained on thirty labels and one threshold. See how many pseudo-labels pass, how many are wrong and what loss they add.Open simulation Classical MLIntermediate4 minNewReal computationYour inputStep by stepLogistic regression: train the S-curve step by step on your own dataTrain logistic regression with gradient descent in your browser: every row's probability, log loss and gradient computed live, on example or your own data.Open simulation Classical MLBeginner4 minNewReal computationYour inputStep by stepPrecision, recall and the threshold: tune a classifier on your own scoresMove a classifier's decision threshold and watch the confusion matrix, precision, recall, false positive rate and F-score change live, on your own data.Open simulation Classical MLBeginner5 minNewReal computationYour inputStep by stepGaussian naive Bayes on iris flowers: bell curves per class, priors and the posteriorFit Gaussian naive Bayes to forty iris flowers, one bell curve per class and feature, then move a new flower and the prior to see how the posterior is built.Open simulation Classical MLBeginner8 minReal computationCode labk-means clustering, step by stepWatch k-means group unlabeled points: assign each point to its nearest centre, move each centre to the mean, repeat until nothing changes.Open simulation Classical MLBeginner8 minReal computationYour inputCode labLinear regression: your points, gradient descent and the loss surfaceClick to place points and watch gradient descent fit a line or curve, with the loss surface, the exact least-squares answer, R² and MSE, MAE or Huber.Open simulation Classical MLBeginner8 minReal computationYour inputCode labDecision trees: how CART chooses every splitWatch a decision tree split your points with Gini impurity or entropy, change depth and leaf size, and see when it starts carving out noise.Open simulation Classical MLIntermediate8 minReal computationYour inputCode labPCA: principal components from the covariance matrixSee principal component analysis compute the covariance matrix, its eigenvectors and the variance each component keeps, and project your points onto PC1.Open simulation Classical MLIntermediate10 minReal computationCode labQ-learning: an agent learns a maze from rewards aloneAn agent learns a maze from rewards alone: Q-values, the discount factor, exploration and a slippery floor.Open simulation Classical MLIntermediate10 minReal computationCode labGradient boosting: each tree fixes what the ensemble still gets wrongAdd small trees one by one, each fitted to the residuals: learning rate, depth, subsampling and the moment to stop.Open simulation Classical MLIntermediate12 minReal computationCode labRecommender systems: matrix factorisation of a ratings tableLearn a short vector for every user and film from the ratings that exist and predict the rest: factors, regularisation and sparsity.Open simulation Classical MLIntermediate12 minReal computationCode labTime-series forecasting: baselines, Holt-Winters and an honest backtestForecast a weekly-seasonal series five ways and backtest them on the last weeks: MASE, Holt-Winters smoothing and forecast intervals.Open simulation Classical MLAdvanced12 minReal computationCode labConformal prediction: intervals with a guaranteed coverageWrap any model in intervals that cover the truth 90% of the time: split conformal, calibration size and adaptive scores.Open simulation TrainingIntermediate15 minReal computationCode labA real training run, live: loss curves, checkpoints and a confusion matrixTrain a real neural network on 1,797 handwritten digits in your browser and watch it like a production run: loss, learning rate, checkpoints, errors.Open simulation TrainingBeginner8 minReal computationCode labOverfitting and regularisation: when a model learns the noiseFit polynomials of growing degree to noisy points and watch training error fall while test error rises, then fix it with more data or an L2 penalty.Open simulation TrainingBeginner12 minReal computationCode labNeural network playground: watch every neuron learnBuild a small neural network, train it on four 2D datasets and see what every neuron learns, with live weights, loss and decision boundary.Open simulation TrainingIntermediate10 minReal computationCode labInitialisation, batch normalisation and dropout in a deep networkPush a real batch through up to 40 layers and watch activations vanish or explode with bad initialisation, and stay healthy with He init or batch norm.Open simulation TrainingIntermediate10 minReal computationCode labLearning-rate schedules: warmup, cosine, step and one-cycleCompare eight learning-rate schedules and see their effect on a real noisy optimisation: warmup, cosine, step decay, one-cycle, linear and inverse square root.Open simulation TrainingAdvanced12 minReal computationYour inputCode labBayesian optimisation: find the best setting in as few tries as possibleA Gaussian process learns an expensive function from a few tries and an acquisition function picks the next: EI, UCB and length scales.Open simulation Neural network basicsBeginner6 minReal computationCode labOne neuron: w·x + b and an activationMove the weights and bias of a single neuron and watch its decision line turn and shift, with every number of w·x + b computed live.Open simulation Neural network basicsBeginner6 minReal computationCode labActivation functions: ReLU, GELU, sigmoid, tanh and moreTwelve activation functions side by side with their slopes: step, sigmoid, tanh, ReLU, Leaky ReLU, ELU, SELU, GELU, Swish, softplus and Mish.Open simulation Neural network basicsBeginner6 minReal computationCode labLoss functions: MSE, cross-entropy, Huber, focal and hingeEight loss functions and their gradients: MSE, MAE, Huber, log-cosh, binary and categorical cross-entropy, focal loss and hinge, all interactive.Open simulation Neural network basicsBeginner6 minReal computationCode labConvolution: how a CNN sees edgesSlide a 3×3 kernel over a handwritten digit and build the feature map pixel by pixel: edge, blur and sharpen filters, editable weights.Open simulation Neural network basicsIntermediate10 minReal computationCode labBackpropagation, one number at a timeStep through the forward pass, loss, backward pass and weight update of a tiny network, with every value and gradient shown on the graph.Open simulation Neural network basicsIntermediate10 minReal computationCode labGradient descent and its variants: SGD, momentum, Nesterov, RMSProp, AdamSix optimisers race on the same loss surface: SGD, momentum, Nesterov, AdaGrad, RMSProp and Adam, with paths, contours and loss per step.Open simulation Neural network basicsIntermediate12 minReal computationCode labCLIP: contrastive learning of images and captions in one spaceTrain an image encoder and a text encoder so each picture lands beside its own caption: InfoNCE, temperature and in-batch negatives.Open simulation Neural network basicsAdvanced14 minReal computationCode labDiffusion models: add noise step by step, then learn to remove itNoise 260 points into a Gaussian cloud and denoise them back: schedules, DDPM against DDIM, and the step where a perfect model starts to memorise.Open simulation Training from scratchIntermediate12 minReal computationYour inputCode labPre-training data: deduplicate, filter by quality and mix the sourcesClean a 3,000-document corpus live: remove exact and near duplicates, filter by quality and language, then weight the sources into a training mixture.Open simulation Training from scratchIntermediate10 minReal computationYour inputCode labTrain a tokenizer: byte-pair merges and the vocabulary-size trade-offLearn byte-pair merges live, tokenize your own text with them and see how vocabulary size trades sequence length against embedding parameters.Open simulation Training from scratchIntermediate10 minReal computationYour inputCode labSize the model: parameters, FLOPs, KV cache and training memorySet layers, width, heads and vocabulary and get the parameter count, training FLOPs per token, KV cache and memory per GPU, from the standard formulas.Open simulation Training from scratchAdvanced12 minReal computationYour inputCode labScaling laws: how to split a compute budget between parameters and tokensSpend one compute budget on a bigger model or on more tokens, with the Chinchilla loss law, and see why serving costs push models to train past it.Open simulation Training from scratchAdvanced10 minReal computationYour inputCode labNumeric precision: fp32, bf16, fp16 and fp8 in training, bit by bitType a number and see it stored in fp32, bf16, fp16 and fp8, then watch small gradients vanish in fp16 and come back with loss scaling.Open simulation Training from scratchAdvanced15 minReal computationYour inputCode labParallelism planner: fit a run on GPUs with data, tensor and pipeline parallelismSplit a 1B to 405B model across up to 4,096 GPUs with data, tensor and pipeline parallelism and ZeRO, and see memory per GPU and the pipeline bubble.Open simulation Training from scratchIntermediate12 minReal computationYour inputCode labA training run, live: warmup, gradient clipping, loss spikes and checkpointsTrain a real network in your browser with AdamW and warmup, inject a bad batch, watch clipping absorb it and roll back to a checkpoint.Open simulation Training from scratchAdvanced12 minReal computationYour inputCode labPost-training: supervised fine-tuning, then preference optimisation with DPOFine-tune a toy policy on demonstrations, then align it with DPO on preference pairs, and see how mislabelled preferences teach the wrong lesson.Open simulation Training from scratchIntermediate10 minReal computationYour inputCode labEvaluation: confidence intervals, leaked test data and pass@kSee how much a benchmark score moves between runs, when a two-point gap is real, how leaked test items inflate a score and how pass@k works.Open simulation Training from scratchAdvanced14 minReal computationCode labGRPO: reinforcement learning from groups of answersSample a group of answers, score them and reinforce the better ones: group-relative advantages, clipping, the KL penalty and reward hacking.Open simulation
Type to search.
    ↑↓ navigate↵ open