All Blogs

How Does Attention Work? The Math Behind Q, K, and V Step by Step

How Does Attention Work? The Math Behind Q, K, and V Step by Step

Attention is computed as softmax(Q x K^T / sqrt(d_k)) x V. We will learn the math behind Query, Key, and Value with a step-by-step numeric example.

What is Harness Engineering?

What is Harness Engineering?

Harness Engineering is building the layer of code around an AI model that manages its inputs, outputs, tools, memory, errors, and evaluation for production.

What is Byte Pair Encoding (BPE) in LLMs?

What is Byte Pair Encoding (BPE) in LLMs?

BPE (Byte Pair Encoding) is the tokenization algorithm used by most LLMs. It keeps merging the most frequent pair of characters to build common subwords.

What is Paged Attention in LLMs and How Does It Work?

What is Paged Attention in LLMs and How Does It Work?

Paged Attention breaks the KV Cache memory into small fixed-size blocks called pages, which removes memory waste and lets LLMs serve many more users at once.

KV Cache in LLMs

KV Cache in LLMs

KV Cache is a memory where an LLM saves the Key and Value of the tokens it has already processed, so that it does not compute them again for every new token.

What is Causal Masking in Attention and Why Do LLMs Need It?

What is Causal Masking in Attention and Why Do LLMs Need It?

Causal Masking in Attention blocks future tokens so that each token can look only at itself and the tokens before it. LLMs need it to predict the next token.

Linear Regression vs Logistic Regression

Linear Regression vs Logistic Regression

Linear Regression predicts a continuous value, like a price, whereas Logistic Regression predicts a category, like yes or no. Let's learn when to use which one.

Supervised vs Unsupervised Learning

Supervised vs Unsupervised Learning

Supervised Learning learns from labeled data, like learning with a teacher, whereas Unsupervised Learning finds patterns in unlabeled data, without a teacher.

Android Push Notification Flow using FCM

Android Push Notification Flow using FCM

In the FCM flow, the app gets a token from FCM and sends it to our backend. The backend then asks FCM to deliver the notification to that token.