Hi, I'm Shrut.

Machine learning engineer implementing papers, running ablations, analyzing results. I identify the bottlenecks in inference systems and make them faster and more reliable in production. Just an ordinary person with insatiable curiosity.

Speech & TTS · Inference engineering · LLMs · Generative AI research

About

I started my career at Space Applications Centre, ISRO in 2024. Before that, ML models were a black box to me. Working on lunar crater detection introduced me to computer vision and showed me, for the first time, what machine learning could do in the real world. That was the turning point that drew me towards AI/ML.

From there, I started going deeper and learning from first principles. The further I got, the more I fell for the fundamental mechanisms behind deep learning architectures. I enjoy understanding how things work, where they break, and why.

Most of my projects have been independent efforts, with me taking them from the initial idea through to a working system.

Outside AI, I am curious about maths, finance and tech. I cook kadhi pakora and occasionally find myself getting cooked. Sometimes I enjoy meta-observing my surroundings and ruminating on how people think and behave, myself included.

Always buried under a backlog of papers to read.

Projects

01

Speech-to-speech latency profile & CosyVoice2 streaming fix

Stage-by-stage latency profile of a cascaded ASR → LLM → TTS pipeline, benchmarked against a duplex model, plus a streaming fix inside CosyVoice2.

Python · PyTorch · CosyVoice2 · vLLM · Modal

Speech Inference Open source

CosyVoice2 time-to-first-audio

Before
~1.7s
After
~1.1s

A harness that profiles a cascaded ASR → LLM → TTS pipeline stage by stage with audio streamed in real time, benchmarked against Moshi, a fully duplex model. Streaming cut TTFA 4.4× over batch (11,892ms → 2,717ms p50); Moshi answered 19× faster still at 145ms p50. Inside CosyVoice2 I isolated the streaming bottleneck and recovered the LM's per-token rate from 23.6ms to 16.1ms, cutting TTFA 1,701ms → 1,173ms and total synthesis time 1.4×.

Talking to an AI feels slow because of the pause before it starts replying. I measured exactly where every millisecond of that pause goes, compared the usual build against a newer design that listens and speaks at once, then went into a popular open-source voice model and made it start speaking about 30% sooner. The fix is now with the original authors for review.

Repository ↗
Upstream PR #1954 ↗

02

Indic speech system evaluation

An ASR → LLM voice pipeline evaluated across five Indic languages and two acoustic conditions, scoring entities separately from words.

Python · PyTorch · ASR · Evaluation

Speech Evaluation

Normalized WER, by ASR and condition

0.20 0.10 0 0.115 0.079 0.199 0.098 clean 0 dB babble SraVaani 1.0 Saaras v4

An ASR → LLM pipeline measured across five languages, two acoustic conditions, and a control run where the LLM reads the correct transcript. Word error rate turned out to understate the damage. 11.5% of words were wrong on clean audio, but 43.5% of the entities were, and entities are what the answer depends on. Swapping the ASR took response accuracy at 0 dB from 73.6% to 82.4%, level with the clean baseline.

Speech systems are usually graded on how many words they get wrong. That turns out to be the wrong thing to measure. The system got about 89% of words right while mangling almost half the names, postcodes and numbers, which are the only parts the answer actually needs. Measuring those separately showed where it really broke, and replacing one component fixed it.

Repository ↗
Evaluation report ↗

03

Microscaling quantization benchmark

Per-tensor INT, block-INT and MXINT implemented and benchmarked across seven vision-language models on VQAv2 and TextVQA.

Python · PyTorch · MX formats · VQA / TextVQA

Quantization Inference

VQAv2 at 4 bits, against BF16

Eagle 8B Qwen 2B InternVL 1B Phi-4 SmolVLM 2.2B Molmo 7B Gemma 4B 0 40 80 per-tensor INT4 block-INT4 MXINT4 BF16

Implemented per-tensor INT, block-INT and MXINT (MXINT2/4/8) and benchmarked all of them across seven vision-language models on VQAv2 and TextVQA. At 4 bits, per-tensor quantization leaves every one of the seven under 1%, emitting garbage strings rather than wrong answers. Move the same 4 bits to a scale per 32 weights and block-INT4 holds 93–99% of its BF16 VQAv2 score. The bit width was never the problem. It was where the scale came from.

Shrinking a model makes it cheaper and faster to run, but it can also make it much worse at its job. I tested seven models across several shrinking methods: the obvious method falls apart completely at 4 bits, while a newer one keeps nearly all of the original quality at the same size.

Repository ↗
Blog post ↗

04

Attention to LLM

An LLM built from scratch in PyTorch: tokenizer, attention variants, RoPE, MoE, LoRA tuning and DPO alignment.

Python · PyTorch · LoRA · DPO

Transformers From scratch

What's in it

causal attention RoPE mixture of experts pretrain SFT LoRA DPO

An LLM built from scratch in PyTorch: tokenizer, causal multi-head attention, grouped-query attention, RoPE, GeLU FFN, PreNorm vs PostNorm. Controlled experiments on RoPE vs absolute positional embeddings for context-length generalization, and on gradient-norm dynamics across norm placement. Dense and Mixture-of-Experts variants with and without load-balancing loss, analyzing expert routing and convergence. Then LoRA instruction tuning and DPO for alignment.

I rebuilt a language model from the ground up, with no library doing the hard parts for me, then ran experiments on the design decisions inside it. That's why I can usually tell what's actually wrong when one of these models misbehaves, instead of guessing.

Repository ↗

05

Generative AI from scratch

VAE, VQ-VAE, VQ-VAE-2, CLIP and a DALL·E-1-style autoregressive text-to-image model, each implemented from the papers.

Python · PyTorch

Generative From scratch

What's in it

VAE VQ-VAE VQ-VAE-2 CLIP autoregressive prior decoded image

VAE, VQ-VAE, VQ-VAE-2, CLIP and a DALL·E-1-style autoregressive text-to-image model, each implemented end to end from the papers with experiments, failure analysis and metrics.

The main families of image-generating models, built one at a time from the original research papers — including the runs that failed, and what the failures turned out to mean.

Repository ↗

Experiments

Experience

Machine Learning Engineer I

Janitri Innovations
Dec 2024 – Oct 2026

Joined as an intern and became the sole ML contributor. HealthTech: maternal and fetal monitoring.

  • Owned Janitri's production multi-turn RAG customer-support chatbot end to end, taking it from a one-week proof of concept to a production-ready FastAPI service on AWS EC2 in about two months, built on LangGraph, Chroma and Gemini via Vertex AI.
  • Designed explicit query routing between direct answers, knowledge-base retrieval and human escalation, choosing graph-based routing after local tests exposed unreliable retrieval decisions from LLM-driven tool calling.
  • Built production failure handling with structured-output validation, retries, context truncation and fallback responses, holding conversation context in a rolling 30-message history window.
  • Built an offline evaluation harness on synthetic domain queries with manually annotated retrieval ground truth, and used RAGAS to check generated answers for hallucination, reaching a faithfulness score of 0.98. Maintained a regression benchmark assembled from production failures and edge cases, re-run after every prompt or pipeline change.
  • Benchmarked hybrid retrieval using Reciprocal Rank Fusion against semantic-only retrieval; switching to semantic-only lifted recall from 73% to 88% and MRR from 0.45 to 0.95.
  • Instrumented production traces with per-step input/output logs, latency and token-usage telemetry in Langfuse.
  • Fixed incomplete product recommendations using catalogue-guided product identification and product-name filtering alongside semantic retrieval, improving retrieval recall from 88% to 94% on the same manually annotated benchmark with the retrieved-chunk count held constant.
  • Shipped an on-device CTG interpretation engine for real-time fetal-distress alerting, extracting clinical parameters from live FHR traces during labour.
  • Modeled fetal hypoxia detection, outperforming standard clinical guidelines with a 15% gain in specificity at 90% sensitivity.
  • Addressed subject-wise physiological variability in wearable stress detection (PPG, EDA, temperature, accelerometer) with a subject-specific baseline calibration strategy, taking F1 from 73% to 85% at 0.96 PR-AUC.
  • Filed two patents, for high-risk pregnancy detection and fetal hypoxia detection.
  • Co-authored the “Remote Digital Monitoring in Pregnancy” chapter for a book on AI in pregnancy.

Computer Vision Research Intern

SAC, ISRO
Jan 2024 – May 2024

Automating lunar crater mapping for planetary scientists.

  • Template-matching detection cut false positives from 18% to 7.4%, shipped as a standalone desktop application scientists could run themselves.
  • U-Net segmentation model for crater masks at 0.76 IoU and 0.81 Dice.
  • Built the geospatial dataset: 20,000+ craters mapped from Chandrayaan-2 imagery of the Apollo 11 and 12 landing sites in ArcGIS.

Education

BE in Computer Engineering

G. H. Patel College of Engineering and Technology
2020 – 2024

Skills

Core

Python PyTorch Hugging Face

Speech & inference

Streaming TTS ASR Latency profiling Quantization vLLM

Architectures

LLMs Transformer internals CNN U-Net VAE / VQ-VAE GAN Multilayer Perceptron

LLM systems

RAG & agentic pipelines Vector embeddings ChromaDB LangGraph Guardrails Fine-Tuning and Alignment

Evaluation & observability

Eval harnesses Ragas Langfuse / LangSmith CometML

Classical ML & CV

OpenCV Scikit-learn Random Forest PCA Pandas

Infra

FastAPI Modal Docker Git AWS EC2 GCP / Vertex AI

Writing