KM

Koustav Manna

webdev·blockchain·ai/ml
off
on

Thread 02 — AI / ML

Models that
learn & reason.

Machine learning and deep learning end to end — training neural nets, fine-tuning transformers, and building LLM systems with RAG and agents. From dataset to a monitored endpoint.

Deep LearningPyTorchNLPComputer VisionLLMsRAG
Frameworks
PyTorch · TF
Domains
CV · NLP · LLMs
Training
GPU · mixed precision
Serving
FastAPI · ONNX

The ML lifecycle

From data to deployment.

A model is only as good as the pipeline around it. I treat data, training, evaluation, and serving as one reproducible system — tracked, versioned, and measured.

  • Reproducible training (seeds + configs)
  • Experiment tracking with W&B / MLflow
  • Rigorous evaluation, not just accuracy
  • Transfer learning & fine-tuning
  • Quantization for fast inference
  • Monitored, versioned model serving
pipeline running
DataCollection, cleaning, versioning1/5
FeaturesTransforms + augmentation2/5
TrainGPU, schedulers, checkpoints3/5
EvaluateMetrics, validation, ablations4/5
ServeAPI, quantization, monitoring5/5

Toolkit

Deep Learning
PyTorchTensorFlowKerasJAXCUDA
Classical ML
scikit-learnXGBoostpandasNumPySciPy
LLMs & Agents
Hugging FaceTransformersLangChainLangGraphRAG
MLOps
FastAPIDockerONNXW&BMLflow

Implementation

A CNN, training in PyTorch.

train.py
Python
1class="syntax-comment"># CNN image classifier — training step (PyTorch)
2import torch
3import torch.nn as nn
4import torch.nn.functional as F
5 
6class SmallCNN(nn.Module):
7 def __init__(self, num_classes=10):
8 super().__init__()
9 self.conv1 = nn.Conv2d(3, 32, 3, padding=1)
10 self.conv2 = nn.Conv2d(32, 64, 3, padding=1)
11 self.pool = nn.MaxPool2d(2)
12 self.fc = nn.Linear(64 * 8 * 8, num_classes)
13 
14 def forward(self, x):
15 x = self.pool(F.relu(self.conv1(x)))
16 x = self.pool(F.relu(self.conv2(x)))
17 x = torch.flatten(x, 1)
18 return self.fc(x)
19 
20model = SmallCNN().to("cuda")
21optimizer = torch.optim.AdamW(model.parameters(), lr=3e-4)
22criterion = nn.CrossEntropyLoss()
23 
24for images, labels in train_loader:
25 images, labels = images.to("cuda"), labels.to("cuda")
26 optimizer.zero_grad()
27 loss = criterion(model(images), labels)
28 loss.backward()
29 optimizer.step()

Selected work

4 projects
01★ featured

Image Classifier

A CNN trained from scratch in PyTorch with augmentation and mixed-precision; ~96% top-1 on a 10-class set.

PyTorchCNNCUDAAlbumentations
02

Transformer Fine-Tune

Fine-tuned a transformer for sentiment with LoRA, served via a quantized ONNX endpoint for low-latency inference.

Hugging FaceLoRAONNXFastAPI
03

Document RAG Pipeline

Retrieval-augmented generation with hybrid search, cross-encoder re-ranking, and grounded, cited answers.

LangChainpgvectorBM25Rerank
04

Multi-Agent Research

LangGraph agents that decompose questions, delegate to sub-agents, and synthesize cited reports.

LangGraphOpenAITavilyPython

Architectures

CNNs

Convolutional nets for image classification and detection.

Transformers

Attention-based models for language and sequences.

Transfer Learning

Fine-tuning pretrained backbones on small data.

RAG & Agents

Grounding and tool-use on top of LLMs.