Krishan Rajaratnam’s blog
  • About
Categories
All (12)
attention (1)
Canada (1)
classification (1)
docker (1)
ETF (1)
fastembed (1)
investing (1)
llm (1)
mlflow (1)
opencv (1)
python (1)
pytorch (5)
pytorchlightning (3)
qdrant (1)
rag (1)
ranx (1)
retirement (1)
retrieval (1)
search (1)
segmentationmodels (3)
statistics (2)
tensorboard (2)
tools (1)
torchmetrics (4)
torchvision (2)
transformer (1)
 

Hybrid search using Qdrant

retrieval
fastembed
qdrant
ranx
search
rag

Following Fastembed’s article on hybrid search available here we compare dense, sparse and hybrid retrieval on the HotPotQA dataset. The comparison is done by using the ranx library for evaluation.

Dec 31, 2025

alt text

Transformer Architecture

llm
transformer
attention

Give a brief review of the transformer (decoder only) architecture from the early days to recent improvements. The focus is on algebraic aspects with no code.

Aug 10, 2025

Modern ETF Investing

investing
ETF
Canada
retirement

A brief introduction to exchange traded fund (ETF) investing for Canadian investors.

May 20, 2024

Contours in OpenCV

opencv
python

A notebook containing handy tools for working with contours in OpenCV. This includes basic contour properties, such as length, area, and 3 different methods for calculating the contours orientation.

Sep 19, 2022
 

Multiclass Segmentation Metrics

pytorch
segmentationmodels
torchmetrics

Multiclass segmentation metrics with torchmetrics, highlighting the difference between micro, macro, and macro-imagewise metrics.

Sep 6, 2022

Pet Segmentation

pytorch
pytorchlightning
segmentationmodels
torchmetrics
torchvision
tensorboard

A workflow for image segmentation on the Oxford IIIT pet dataset using PyTorch, PyTorch Lightning, Segmentation Models PyTorch, Torchmetrics and Tensorboard. This notebook trains state of the art image segmentation models on the Oxford IIIT pet segmentation dataset, and shows how to use torchmetrics to measure their quality.

Aug 25, 2022

Multiclass Classification Metrics

pytorch
torchmetrics
classification

Multiclass classification metrics with torchmetrics, highlighting the difference between micro and macro metrics.

Aug 18, 2022

Pet Breed Classification

pytorch
pytorchlightning
torchmetrics
torchvision
tensorboard

An end-to-end workflow for image classification on the Oxford IIIT pet dataset using PyTorch, PyTorch Lightning, Torchmetrics and Tensorboard. This notebook trains state of the art image classification models on the Oxford IIIT pet dataset, and shows how to use torchmetrics to measure their quality.

Aug 17, 2022

Surface Defect Segmentation

pytorch
segmentationmodels
pytorchlightning
mlflow

An end-to-end workflow for image segmentation on the magnetic tile defect dataset using PyTorch, PyTorch Lightning, Segmentation models, and MLflow. This notebook trains state of the art image segmentation models on a highly imbalanced dataset, containing less than 1% of the target class.

Jun 30, 2022

How to build a Docker image with an Anaconda environment in Paperspace?

docker
tools

I’ll describe how to build a custom docker image containing an anaconda environment which can be run on Paperspace.

Jun 15, 2022

Principal component analysis

statistics

An expository article on principal componenent analysis (PCA), starting from the theory of random vectors and then gradually moving on to concrete implementation using numpy, and scikit-learn.

Mar 30, 2022

Standard probability distributions

statistics

An expository article on the elementary probability distributions, their properties, and common applications, with calculations done in scipy.

Jan 13, 2022
No matching items