LLM: Understanding Tokens

- 12 mins read

Overview

  • Understand why tokens are the currency of LLMs
  • Learn how tokenisers split words into tokens
  • Why tokens are different across LLM providers
  • How the costs of tokens are calculated
  • Understand token limits

Introduction

In this post, we look deeper into tokens, and how they relate to Large Language Models (LLMs). If you have read any API documentation or any other technical content relating to LLMs, you will have come across the term tokens. Tokens are fundamental to LLMs, and understanding them is vital when learning how LLMs work under the hood.

LLM: Understanding Log Probabilities

- 11 mins read

Overview

  • Learn what token log probabilities are.
  • Understand and use the logprobs parameter.
  • Learn the practical use cases for log probabilities.

Introduction

In this blog post, we will discuss what LLM log probabilities are, also known as logprobs. We will use the OpenAI API to retrieve the log probabilities of individual tokens output in response to user prompts. We will write some code to understand what we can do when we have this extra information returned from the API. And finally, see some practical use cases of log probabilities.

LLM: Understanding The Temperature Parameter

- 13 mins read

Overview

  • How tokens are the fundamental unit of LLMs.
  • Understand the token vocabulary and role it plays in LLMs.
  • Learn what the LLM temperature parameter is and how it works.
  • Understand why LLMs are non-deterministic.
  • The use cases where developers may adjust the temperature parameter.

Introduction

During inference, a user can pass in various parameters into an LLM to guide its behaviour and the output it returns. One of those parameters is the temperature parameter, when this parameter is set to a low or high value it controls the randomness of the LLMs output. In this post we will dive deeper into the temperature parameter and explain what it is, its purpose, and have a look at what happens when you set the temperature to different values during LLM inference.

How Kubernetes Creates a Pod

- 5 mins read

Overview

  • Learn the process Kubernetes goes through to create a Pod when you apply a manifest.

Introduction

In this blog post, we will discuss the process that Kubernetes goes through to create a Pod. Kubernetes is made up of a number of components, and we will see how these various components coordinate with each other to deploy various manifests. A Pod is a group of containers and is the smallest unit that Kubernetes administers. Kubernetes manages Pods, not containers. Pods live on nodes, nodes live on machines.

Overview

  • Package errgroup is a third party library available at golang.org/x/sync/errgroup.
  • See example usage of package errgroup to manage a group of goroutines that are working on tasks.
  • Use errgroup to implement a design pattern called the Scatter Gather Pattern.

Introduction

In this post, we will talk about Go’s errgroup package and use it to implement the Scatter Gather Pattern.

The package errgroup allows groups of goroutines working on subtasks of a common task to synchronize, propagate errors, and cancel context. This package is helpful because it takes care of the handling of tasks, managing, and returning errors. Without it, you may end up writing a lot of convoluted error handling code that makes your code harder to read and maintain.

Overview

  • Line profiler is a 3rd party library available on GitHub.
  • Line profiler package helps in identifying the cause of CPU-bound problems in Python code.
  • Gives you a data driven approach on where to allocate your time in order to fix performance issues.
  • Understand the output of line_profiler by working through a simple code example.

Introduction

Python has established itself as a top tier programming language. As of late 2025 according to the TIOBE index, the top 3 languages as a measure of programming language popularity, are consistently Python, C, and C++, often with Python in the lead. This popularity and increase in use of Python has been driven by fields such as machine learning, artificial intelligence and data engineering. As these fields continue to grow and so does their use of Python, the performance of code matters more than ever.

Merkle Trees and Data Verification

- 3 mins read

A Merkle tree is a binary tree where the nodes stores hashes of data, rather than the data itself. The leaf nodes store hashes of the data and the parent nodes are the results of concatenating the left and right children and then applying a hash function on the result.

To read more about Merkle trees go here.

In this post, I will talk about how data verification is performed in Merkle trees.

Server-Sent Events (SSE) With Go

- 3 mins read

Server-Sent Events (SSE) technology is best explained by this article on MDN:

The EventSource interface is used to receive Server-Sent Events. It connects to a server over HTTP and receives events in text/event-stream format without closing the connection.

The connection is persistent and communication is one-way, from the server to the client, the client cannot push data to the server. This is unlike WebSockets where communication is bi-directional.

Some unique characteristics of SSE compared to WebSockets or long polling are:

Secure Tunnels with WireGuard

- 2 mins read

Wireguard is a secure networking tunnel, it can be used for VPNs, connecting data centers together over the Internet, or any place where you need to connect two or more networks together in a secure way.

Wireguard is open source and it is designed to be much simpler to configure than other tools such as OpenVPN or IPSec.

Below, we are going to connect two computers together:

Machine A IP address 192.168.0.40
Machine B IP address 192.168.0.41

First, we need to install WireGuard on each machine:

Configuring Remote Connections with PostgreSQL

- 2 mins read

If you need to access your PostgreSQL database from another machine, you need to edit the configuration, to make the database listen to incoming connections from other hosts. Below are the steps on how to do this.

Note: Do not do this on your production database environment, It will open up a potential security flaw. This should be fine to do on your staging environment for testing purposes.

On the machine running PostgreSQL, locate configuration file postgres.conf: