Machine Learning Engineer·Pune, India
Shrirang Mahajan*
I work on ML systems: making models train and run fast on the hardware you actually have. I write GPU kernels, build inference servers, pretrain small LLMs, and ship computer vision to production, from Jetson edge devices to multi-GPU clusters.
Currently Machine Learning Engineer II at Skylark Labs, where I'm the sole ML engineer. Co-author of CFAMs (arXiv, 2026).
Models that keep learning after deployment.
- 2026›
Continual Field-Adaptive Models (CFAMs) for Post-Deployment Physical AI
- Ran the continual-learning experiments and benchmarks and wrote that section of the paper: models learn new skills after deployment without catastrophic forgetting.
- Backward transfer of −0.5 pp vs −11.4 pp for LoRA, meaning accuracy on earlier tasks barely drops while new ones are learned.
arXivCo-author (4th of 10)Continual Learning
Computer vision in production.
As the sole ML engineer on a small team, I build and deploy the models, and make them fast enough to run on the hardware we have.
- 01
Kepler: video analytics at scale
Built the entire stack of the CCTV and drone analytics (fire and smoke, PPE, ANPR, weapons, intrusion, crowd counting, face recognition), served over gRPC on Triton, Jetson, ONNX and CPU. Scales from 4 cameras on a Jetson AGX Orin to 40 on an A5000 cluster at 400 ms P99.NVIDIA TritonTensorRTJetsongRPC - 02
Aircraft tracking at a live airfield
Owned end to end as the sole engineer. Tracked 1,400+ takeoffs and landings with the aircraft in frame 90% of the time at 23 FPS (up from 14 with TensorRT FP16 and threaded rendering), using YOLO, visual odometry, SIFT/RANSAC pose correction and predictive PTZ control.YOLOVisual OdometryPTZ Control - 03
Inference performance on the edge
A TensorRT gRPC inference server on Jetson AGX Orin, cutting per-frame time 2.7× (65 → 24 ms), mostly by rewriting preprocessing. Elsewhere, doubled throughput with TensorRT on Triton and cut retrieval latency 88% (971 → 113 ms).TensorRTJetson AGX OrinQdrant
Built from scratch, then measured.
Side projects where I build the layer underneath myself, then benchmark it against the real thing: a serving engine against vLLM, an attention kernel against cuDNN.
- 01›
Inference from Scratch
An LLM inference server built from scratch, one technique at a time: KV cache, batching, then a continuous-batching engine with admission control. Benchmarked against vLLM (788 vs 9,370 tok/s), with the main sources of the 12× gap identified: batch capacity (PagedAttention), fused kernels and CUDA graphs.PyTorchFastAPIvLLMContinuous BatchingLLM Inference - 03›
TinyGPT
A 95M-parameter GPT (RoPE, GQA, RMSNorm) pretrained from scratch on one 8 GB RTX 3070 Ti, using mixed precision, gradient accumulation and fused kernels to fit. Instruction-tuned on Alpaca and served in your browser through ONNX and WebGPU.PyTorchStreamlitHuggingFaceMixed-Precision Training - 04›
Kiosk
A live news search and recommendation app, self-hosted on a Raspberry Pi 5: 106 sources, 100K+ articles, hybrid BM25 + dense retrieval with a cross-encoder rerank. Moving BM25 into Qdrant cut the engine's memory 64% so it fits the Pi, where the feed is served in 70 ms p50.QdrantFastAPIPostgreSQLRedisReact
My 95M-parameter LLM, running on your device.
The model I pretrained from scratch on 2.1B tokens of OpenWebText using a single RTX 3070 Ti, then instruction-tuned on Stanford Alpaca. Click to download the ONNX weights (~536 MB) — inference then runs locally via WebGPU (or WASM fallback). Fluent English, often wrong facts — it's small.
A note — at 95M parameters, TinyGPT speaks English fluently but isn't reliable on facts. It will write a coherent sentence about anything, and confidently make things up. Treat it as a coherence demo, not a knowledge model.
Click to download the model and run it locally.
Essays, with illustrations.
Long-form posts on pre-training LLMs on consumer hardware, writing CUDA kernels, and how attention works inside.
- Mar2026
Pre-training a 95M Parameter LLM on a Consumer GPU
15 min readLLM · PyTorch · Pre-training - Jan2026
Writing CUDA Kernels from Scratch: A Beginner's Guide
10 min readCUDA · GPU Programming · Matrix Multiplication - Mar2025
Attention and the versions of it: Layer by Layer
20 min readAttention Mechanism · Transformers · Self-Attention - Apr2025
Llama 2 Explained
8 min readLlama · Meta AI · Llama2
A short résumé.
One layer deeper
than I strictly need.
Three habits I try to keep when I build ML systems.
Build the layer underneath, once.
Most of the time I use models, libraries and servers that other people built, and that's how it should be. But I understand a tool best after I've built a small version of what's under it. TinyGPT taught me what pretraining costs on 8 GB of VRAM. When I wanted to know what happens under
.cuda(), I wrote Tensorax. When I wanted to know why vLLM is fast, I built a serving engine without its tricks and measured the difference.Measure against the real thing.
A number with no baseline says very little. I compare my work against the strongest system I can find, such as cuDNN for my attention kernel and vLLM for my serving engine, and I report the gap even when it's 12×. Working out where the gap comes from is the part I learn the most from.
The right hard path.
I use AI to learn faster. I do not use it to write code I can't read. When I pretrained TinyGPT on a single 8 GB GPU, I learned attention internals, mixed precision and gradient accumulation by working through them myself. A shortcut that skips the part where you get better isn't really a shortcut.
Ask about this site.
A hosted LLM grounded in this site's content — every project, role, blog post, and skill on this page is in its context. It can also fetch fresh GitHub data and send you to the right page when you ask for it. Much better informed about me than TinyGPT above — though, like any language model, still capable of getting things wrong.
I know this entire site. Ask me about Shrirang's work, or pick a prompt below.
Answers are generated by a third-party language model and can be wrong. What you type is sent to that provider for processing — please don't enter anything confidential or personal. How this data is handled.
Thanks for scrolling. If something here resonated — a project, an essay, a problem you're trying to solve — I'd love to hear from you.
— Shrirang