Topic

AI & ML

Hand-picked tutorials, guides and examples on AI & ML — explained simply.

  • 131 articles
  • 485 min of reading
  • 4 sub-topics
  • 02 Dec, 2026 last updated

Showing 131 articles

Running LLMs LocallyNew 3 min read

What Is GGUF and Why Local LLMs Use It

GGUF is a single-file format for storing a language model so that llama.cpp and the tools built on it can load it quickly. One GGUF file holds the weights, the tokenizer and the configuration, and it usually stores the weights in a quantized form. That is why...

02 Dec, 2026 Jai Singh 5 0
Read article
Running LLMs LocallyNew 3 min read

LM Studio Local Server: An OpenAI-Compatible Endpoint

LM Studio can run a local server that speaks the OpenAI API format. Any code written for the OpenAI client library can talk to your own model by changing the base URL. The server listens on port 1234 by default, and you turn it on from the developer or server...

28 Nov, 2026 Jai Singh 10 0
Read article
Running LLMs LocallyNew 4 min read

LM Studio for Beginners: Download, Load and Chat

LM Studio is a desktop application for running local models through a graphical interface. You search for a model, download it, load it and chat, without touching a terminal. It suits people who prefer a visual tool, and it can also expose your model through a...

24 Nov, 2026 Jai Singh 11 0
Read article
Model Context ProtocolNew 3 min read

How to Connect an MCP Server to Claude Desktop

To connect a local MCP server to Claude Desktop, you add an entry to the mcpServers object in the app's JSON configuration file and restart the app. Claude Desktop then launches your server as a child process and talks to it over stdio. Find the configuration...

20 Nov, 2026 Jai Singh 18 0
Read article
Running LLMs LocallyNew 4 min read

Streaming Responses from the Ollama API

By default, Ollama streams its answer: instead of one big response it sends many small JSON objects, one per chunk of generated text, so users see words appear immediately. This post explains the format and shows how to read it in curl and Python. Why stream?...

20 Nov, 2026 Jai Singh 22 0
Read article
RAG & Vector SearchNew 4 min read

Fixed-Size Chunking with Overlap in Python

Fixed-size chunking cuts text into pieces of roughly equal length, with a little overlap between neighbours. It is the simplest strategy, it is easy to reason about, and for uniform plain text it is often good enough. This post builds one in Python, explains i...

20 Nov, 2026 Jai Singh 13 0
Read article
Model Context ProtocolNew 4 min read

How to Test an MCP Server with the MCP Inspector

The MCP Inspector is the official visual tool for testing MCP servers. You point it at a server, and it acts as a client so you can list tools, call them with your own arguments, read resources, fetch prompts and view the JSON-RPC messages. Testing with the In...

16 Nov, 2026 Jai Singh 14 0
Read article
Running LLMs LocallyNew 4 min read

Using the Ollama REST API with curl

Ollama exposes a simple REST API on http://localhost:11434 . The two endpoints you will use most are /api/generate for single prompts and /api/chat for conversations. Both accept JSON and can be tested straight from curl, with no SDK needed. /api/generate: one...

16 Nov, 2026 Jai Singh 16 0
Read article
PyTorchNew 4 min read

Broadcasting in PyTorch With Clear Rules

Broadcasting is how PyTorch performs element-wise operations on tensors of different shapes without copying data. The smaller tensor is virtually stretched to match the larger one. It is powerful and compact, but it can also hide bugs, so you need to know the...

08 Nov, 2026 Jai Singh 16 0
Read article
AI Coding AgentsNew 4 min read

Write Your First CLAUDE.md in Ten Minutes

You can write a good first CLAUDE.md in ten minutes: let the tool draft one, delete everything the agent could discover itself, add the three or four facts it keeps getting wrong, and test it on a real task. The result should fit on one screen. Short beats com...

08 Nov, 2026 Jai Singh 21 0
Read article
RAG & Vector SearchNew 4 min read

How to Choose an Embedding Model for RAG

Choose an embedding model by testing candidates on your own questions and documents, then weigh quality against cost, speed, vector size and hosting. Public leaderboards are a good way to shortlist models, but they are an average over other people's data. Your...

07 Nov, 2026 Jai Singh 23 0
Read article
Model Context Protocol 4 min read

Build Your First MCP Server in Python with FastMCP

The official MCP Python SDK includes a high-level class called FastMCP that turns ordinary Python functions into MCP tools with a decorator. In this tutorial you will install the SDK, write a small server with two tools, run it and test it with the MCP Inspect...

03 Nov, 2026 Jai Singh 23 0
Read article
PyTorch 4 min read

Indexing and Slicing PyTorch Tensors

PyTorch tensors support the same indexing syntax as NumPy: integers pick a position, slices pick a range, boolean masks pick elements that satisfy a condition, and lists or tensors of integers pick arbitrary positions. Mastering these lets you pull out batches...

31 Oct, 2026 Jai Singh 38 0
Read article
Fine-Tuning & Small Models 3 min read

What Fine-Tuning Can and Cannot Teach a Model

Fine-tuning reliably teaches a model how to respond : format, tone, task framing and narrow skills. It is much less reliable at teaching what is true , especially large amounts of new or changing facts. Knowing this boundary saves you from the most common disa...

26 Oct, 2026 Jai Singh 29 0
Read article
LLM APIs & Prompting 3 min read

Anatomy of a Messages API Request

A Messages API request has three required fields: model , max_tokens and messages . Everything else is optional tuning. Knowing what each field does helps you debug unexpected output, control cost and avoid 400 errors. The full picture import anthropic client...

26 Oct, 2026 Jai Singh 26 0
Read article
PyTorch 4 min read

PyTorch Tensors: Creating Them Five Ways

A tensor is PyTorch's n-dimensional array: a scalar is 0-D, a vector 1-D, a matrix 2-D, and a batch of images is usually 4-D. You can create tensors from existing Python data, filled with constants, with random numbers, from numeric ranges, or by copying the s...

23 Oct, 2026 Jai Singh 31 0
Read article
PyTorch 4 min read

How to Install PyTorch and Check Your Setup

The easiest way to install PyTorch is inside a virtual environment, using the command generated by the selector on the official pytorch.org "Get Started" page. That page matches your operating system, package manager and compute platform (CPU or a specific CUD...

18 Oct, 2026 Jai Singh 36 0
Read article
LLM APIs & Prompting 3 min read

Your First Claude API Call in Python

To call Claude from Python, install the anthropic package, put your API key in the ANTHROPIC_API_KEY environment variable, and call client.messages.create() with a model, a token limit and a list of messages. This post takes you from an empty folder to a worki...

18 Oct, 2026 Jai Singh 38 0
Read article
LLM APIs & Prompting 4 min read

What Is an LLM API and How Do You Call One?

An LLM API is a web service that accepts text (and sometimes images or files) and returns text generated by a large language model. You send an HTTPS request with your prompt, the provider runs the model on its own servers, and you receive the model's answer i...

18 Oct, 2026 Jai Singh 27 0
Read article
Running LLMs Locally 3 min read

What Is Running LLMs Locally and Why Do It

Running an LLM locally means the model file sits on your own computer or server and the text generation happens on your own CPU or GPU. No prompt leaves your network, and you do not pay per token. You trade the convenience and top quality of hosted APIs for co...

18 Oct, 2026 Jai Singh 30 0
Read article
Agent Frameworks 4 min read

What Are Agent Frameworks and Do You Need One?

An agent framework is a library that handles the repetitive parts of building an LLM agent: running the tool-calling loop, tracking conversation state, validating tool arguments, streaming output and tracing what happened. You do not need one to build an agent...

18 Oct, 2026 Jai Singh 30 0
Read article