██████╗ ██╗ ██╗ █████╗ ██╗ ██╗ █████╗ ██╗ █████╗
██╔══██╗██║ ██║██╔══██╗██║ ██║██╔══██╗██║ ██╔══██╗
██║ ██║███████║███████║██║ ██║███████║██║ ███████║
██║ ██║██╔══██║██╔══██║╚██╗ ██╔╝██╔══██║██║ ██╔══██║
██████╔╝██║ ██║██║ ██║ ╚████╔╝ ██║ ██║███████╗██║ ██║
╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
ML Engineer · Researcher · Open-Source Contributor · 3rd Year @ RNSIT · CGPA 9.4
From applied ML down to model internals and kernels, and the backend systems that ship it.
dhavala = {
"range": ["applied ML", "model internals", "GPU kernels", "backend systems"],
"contributing_to": "ml-explore/mlx-lm (Apple): 2 merged PRs on MoE and attention correctness",
"researching": "Graph-structured process reward models for LLM reasoning",
"obsessed_with": ["MoE routing", "efficient inference", "RL", "interpretability"],
"belief": "Don't trust a speedup until you've measured what it costs.",
"mode": "First principles. Build it from the smallest unit up.",
}"Most people use deep learning. I want to understand it well enough to break it."
Python · MLX · Mixture-of-Experts · Attention · RoPE
Silent correctness bugs are the worst kind: nothing crashes, the model just computes the wrong thing. Both of mine were that.
- #1959 ERNIE 4.5 MoE router fix: the port dropped the expert-routing correction bias, so tokens were silently sent to different experts than the reference model. Traced it against the HF/Baidu implementation, restored the bias, and added parity tests. (issue #1947)
- #1990 afm7 RoPE offset fix: KV-reuse layers applied the wrong rotary position offset for left-padded batches, so batched outputs drifted from single-sequence outputs. (issue #1989)
- Built an agentic query system over 50k+ company records on AWS EC2 · analysts query conversationally instead of manually, cutting research effort by 40%
- Designed an ML-based company scoring pipeline on real-time web data · 20% faster task completion, still in daily use
- 1st Place / 25 Teams internal hackathon · discovery microservice shipped to production in 2 weeks, real users by week 4
- Stack: FastAPI · LangGraph · Flask · Pinecone · Docker · AWS
TypeScript · Node.js · Express · PostgreSQL · Docker · Railway
A hosted MCP server that lets an AI assistant diagnose stuck e-commerce orders across payments, inventory and fulfillment, without being allowed to do anything dangerous.
- Deterministic rules engine over 8 tables, exposed as 6 MCP tools
- Every action gated by type and value, previewed with an HMAC-signed token over a hashed diff, and applied atomically with its audit record
- Idempotency proven under concurrency: 150 parallel trials, zero failures · 40/40 tests · one-command isolated Postgres test path
- → Clarity
Python · Gemini API · Live API · Multi-Agent Systems
A deterministic simulation of 1,000 stateful AI agents running at once, seeded from real Indian demographic data, with market adoption emerging through a Bass diffusion model. A live control plane lets you intervene mid-simulation. Live demo round at the Google DeepMind × Cerebral Valley Hackathon (26 teams from 4,000 participants). → Threshold
PPO · ViT · Hierarchical Attention · UCF-Crime
Problem: Surveillance footage runs for hours. Finding where a crime starts means scanning every frame, which is slow and expensive.
Approach: Treat it as a search problem. A PPO agent navigates a low-resolution segment map of the video with a hard budget of 20% of segments. On each segment it visits, HAFED (a two-scale Vision Transformer adapted from SASHA, IISc NeurIPS 2025) zooms into the full high-resolution clip. FGlobal then propagates what it learned to similar unvisited segments, so the agent gets smarter without spending budget.
RAW VIDEO
↓ segment @ 1fps low-res
ViT EMBEDDINGS → Global Segment Map
↓
PPO AGENT (budget: 20% of segments)
↓ on selected segment:
HAFED: frame-level + segment-level attention @ 30fps
↓
FGlobal: propagates knowledge to similar segments
↓
CRIME ONSET TIMESTAMP + audit trail of the search path
Result: 4.1x faster than brute-force scanning · AUC 0.79 → 0.8231 from FGlobal · 92% onset accuracy within ±10s · Shipped as a Flask web app
Interpretability · AI Safety · CoT Resampling
Question: When a model says it's worried about getting caught, does that worry actually drive its behavior?
Approach: Built a commitment game where cheating is verifiable from the transcript, then removed the "worry" sentences from the chain of thought by resampling and measured what changed.
Result: Auditing cut cheating from 26.5% to 12.5% (n=89), but removing the worry changed nothing. The worry looks like narration, not cause. Code and notebook are public. → detect-strategic-worry
PyTorch · Transformers · FLOPs Accounting
Problem: A Transformer spends the same compute on an easy input as on a hard one.
Approach: Lightweight classifier heads at intermediate layers; the model exits once confidence crosses a threshold. All heads trained jointly with weighted cross-entropy. An automated sweep measures accuracy vs FLOPs across 7 thresholds against the full-depth baseline.
Result: Every speedup comes with its accuracy cost attached · Fully reproducible via seeded RNGs and YAML configs
ML & Research
Low-Level
Backend & Systems
Google Developer Groups · Technical Lead (May 2025 – Present) Technical curriculum for 200+ students · Spoke on Docker in production (multi-stage builds, distroless non-root images) · Mentored 3 teams to production deployment
Currently researching Graph-PRM: scoring the graph structure of an LLM's reasoning instead of judging steps one by one
Persona Labs · Startup selected from 150+ ideas for incubation at the RNSIT Incubation Center
Endorsed by Zackery Beckham, Co-Founder, Caprae Capital Partners
