Topic
machine learning
31 articles across 10 sub-topics
Sub-topic
16 articles

LLM Hallucinations: Causes, Detection, and Mitigation Strategies
TLDR: LLMs hallucinate because they are trained to predict the next plausible token — not the next true token. Understanding the three hallucination types (factual, faithfulness, open-domain) plus the five root causes lets you choose the right mitiga...

Reinforcement Learning: Agents, Environments, and Rewards in Practice
TLDR: Reinforcement Learning trains agents to make sequences of decisions by learning from rewards and penalties. Unlike supervised learning, RL learns through trial and error rather than labeled examples. Use it for sequential decision problems wher...
SFT for LLMs: A Practical Guide to Supervised Fine-Tuning
TLDR: Supervised fine-tuning (SFT) is the stage where a pretrained model learns task-specific response behavior from curated input-output examples. It is usually the first alignment step after pretraining and often the foundation for later RLHF. Good...
Why Embeddings Matter: Solving Key Issues in Data Representation
TLDR: Embeddings convert words (and images, users, products) into dense numerical vectors in a geometric space where semantic similarity = geometric proximity. "King - Man + Woman ≈ Queen" is not magic — it is the arithmetic property of well-trained ...
What are Logits in Machine Learning and Why They Matter
TLDR: Logits are the raw, unnormalized scores produced by the final layer of a neural network — before any probability transformation. Softmax converts them to probabilities. Temperature scales them before Softmax to control output randomness. 📖 T...
Unlocking the Power of ML, DL, and LLM Through Real-World Use Cases
TLDR: ML, Deep Learning, and LLMs are not competing technologies — they are a nested hierarchy. LLMs are a type of Deep Learning. Deep Learning is a subset of ML. Choosing the right layer depends on your data type, problem complexity, and available t...
Sub-topic
3 articles
Softmax Function Explained: From Raw Scores to Probabilities
TLDR: Softmax converts a vector of raw scores (logits) into a valid probability distribution by exponentiating each value and dividing by the total. Subtracting the max before exponentiating prevents floating-point overflow. Temperature scaling contr...
Fine-Tuning LLMs with LoRA and QLoRA: A Practical Deep-Dive
TLDR: LoRA freezes the base model and trains two tiny matrices per layer — 0.1 % of parameters, 70 % less GPU memory, near-identical quality. QLoRA adds 4-bit NF4 quantization of the frozen base, enabling 70B fine-tuning on 2× A100 80 GB instead of 8...

Transfer Learning Explained: Standing on the Shoulders of Pretrained Models
TLDR: You don't need millions of labeled images or months of GPU time to build a great model. Transfer learning lets you borrow a pretrained network's hard-won feature detectors, plug in a new output head, and fine-tune on your small dataset — often ...
Sub-topic
2 articles
Dot Product in Machine Learning: The Engine Behind Similarity, Attention, and Neural Networks
TLDR: The dot product multiplies corresponding elements of two vectors and sums the results. In machine learning it does three critical jobs: it scores semantic similarity between embeddings, computes every activation in a fully connected layer, and ...

Attention Mechanism Explained: How Transformers Learn to Focus
TLDR: Attention lets every token in a sequence ask "what else is relevant to me?" — dynamically weighting relationships across all positions simultaneously. It replaced the fixed-size hidden-state bottleneck of RNNs and is the engine behind every GPT...
Sub-topic
2 articles
RAG vs Fine-Tuning: When to Use Each (and When to Combine Them)
TLDR: RAG gives LLMs access to current knowledge at inference time; fine-tuning changes how they reason and write. Use RAG when your data changes. Use fine-tuning when you need consistent style, tone, or domain reasoning. Use both for production assi...
Build vs Buy: Deploying Your Own LLM vs Using ChatGPT, Gemini, and Claude APIs
TLDR: Use the API until you hit $10K/month or a hard data privacy requirement. Then add a semantic cache. Then evaluate hybrid routing. Self-hosting full model serving is only cost-effective at > 50M tokens/day with a dedicated MLOps team. The build ...
Sub-topic
2 articles

Sparse Mixture of Experts: How MoE LLMs Do More With Less Compute
TLDR: Mixture of Experts (MoE) replaces the single dense Feed-Forward Network (FFN) layer in each Transformer block with N independent expert FFNs plus a learned router. Only the top-K experts activate per token — so total parameters far exceed activ...

Dense LLM Architecture: How Every Parameter Works on Every Token
TLDR: In a dense LLM every single parameter is active for every token in every forward pass — no routing, no selection. A transformer block runs multi-head self-attention (Q, K, V) followed by a feed-forward network (FFN) with roughly 4× the hidden d...
Sub-topic
2 articles
Model Evaluation Metrics: Precision, Recall, F1-Score, AUC-ROC Explained
TLDR: 🎯 Accuracy is a lie when classes are imbalanced. Real ML evaluation uses precision (how many positives are actually positive), recall (how many actual positives we caught), F1 (their balance), and AUC-ROC (performance across all thresholds). T...
Model Evaluation Metrics: Precision, Recall, F1-Score, AUC-ROC Explained
TLDR: 🎯 Accuracy is a lie when classes are imbalanced. Real ML evaluation uses precision (how many positives are actually positive), recall (how many actual positives we caught), F1 (their balance), and AUC-ROC (performance across all thresholds). T...
Sub-topic
1 article

Fine-Tuning LLMs: The Complete Engineer's Guide to SFT, LoRA, and RLHF
TLDR: A pretrained LLM is a generalist. Fine-tuning makes it a specialist. Supervised Fine-Tuning (SFT) teaches it your domain's language through labeled examples. LoRA does the same with 99% fewer trainable parameters. RLHF shapes its behavior using...
Sub-topic
1 article
Model Evaluation Metrics: Precision, Recall, F1-Score, AUC-ROC Explained
TLDR: 🎯 Accuracy is a lie when classes are imbalanced. Real ML evaluation uses precision (how many positives are actually positive), recall (how many actual positives we caught), F1 (their balance), and AUC-ROC (performance across all thresholds). T...
Sub-topic
1 article
Feature Engineering: Transforming Raw Data into ML-Ready Features
TLDR: 🛠️ Feature engineering transforms messy real-world data into ML-compatible input. Bad features break even the best models — good features make simple algorithms shine. This guide covers scaling, encoding, imputation, and sklearn Pipeline to bu...
Sub-topic
1 article
Ensemble Methods: Random Forests, Gradient Boosting, and Stacking Explained
TLDR: 🌲 Ensemble methods combine multiple "weak" learners to create stronger predictors. Random Forest uses bootstrap sampling + feature randomization. Gradient Boosting sequentially corrects errors. Stacking uses a meta-learner on top. Often outper...
