Machine Learning Engineer · LLM Training & Inference Infrastructure
I make LLM training and inference cheaper and more reliable: I measure why large runs fail, hang and spike,
fix it in the kernels, compilers and libraries underneath, and report how sure each answer is.
Nine pull requests open upstream, all under review as of November 2026. Every code fix ships with new tests.
| Project | Pull request | What it does |
|---|---|---|
| Triton | #11117 | A chained fp32 division feeding a reduction emitted 4,128 div.full.f32 instead of about 64, because layout resolution picked a fully replicated layout. The fix breaks ties toward the least-replicated layout; MLIR lit test included. Root-cause write-up: triton-10987-layout-fix |
| DeepSpeed | #9124 | Fixes HybridEngineRollout KV caches under autocast when keys and values differ in dtype |
| #9122 | Warns when save_checkpoint writes into a tag that already has files |
|
| #9123 | Avoids port collisions in three CPU unit tests under parallel CI | |
| Liger-Kernel | #1657 | cross_entropy=True rebound torch.nn.functional.cross_entropy process-wide and broke unrelated 3-D and soft-target calls (#1639, confirmed on B300 by another user). Scopes the patch to transformers' loss_utils and falls back to PyTorch for unsupported calls |
| TransformerEngine | #3901 | Drops the gradient of zero-probability rows in the moe_permute_with_probs backward pass |
| #3900 | Docs: fixes the CUDA include-directory environment variable name in the install guide | |
| FlashInfer | #9748 | Opt-in check that checkpoint_cu_starts is given in checkpoint units for GDN prefill |
| torchao | #5142 | Docs: fixes the remaining documentation build warnings |
vLLM: diagnosed the Aria garbage-output bug at tensor-parallel size > 1 (#49122) as a double all-reduce of shared-expert output and verified a fix on CPU. Upstream resolved it by moving Aria to the Transformers backend (#59767), so my PR #49366 was closed. My MiniCPM-SALA model port (#48999) was also closed; the validation work is in vLLM-HybridAttn.
| Project | Question | Result |
|---|---|---|
| LLM Training Reliability survival analysis · PyTorch DDP |
How often do large training runs fail, and how often should they checkpoint? | OPT-175B logbook: 50 unplanned interruptions in 56 days on 992 GPUs. Per-job hazards are Weibull with shape about 0.5–0.6, so a per-GPU-hour MTBF is the wrong planning unit. A tuned Daly schedule beats OPT's 80-minute schedule by 0.97 points of goodput at a 10 s checkpoint cost and 2.9 points at 10 min, with bootstrap CIs |
| spikewatch e-processes · conformal p-values |
Can a loss-spike alarm guarantee its false-alarm rate? | On 1.7M steps of AI2 OLMo telemetry: 54 of 71 held-out spikes caught at a 4.7% pooled false-alarm rate, where the common 7σ rule hits 74–97%. The pre-registered target was not met (one series at 5.6%, 13% flagged before onset), and the repo says so |
| Scaling laws with honest uncertainty bootstrap · multiverse analysis |
How many tokens per parameter is compute-optimal, and how sure can we be? | 23 for Pythia (95% CI 6–94), 21 for Chinchilla (15–28). The usual i.i.d. checkpoint bootstrap covers the true value only 64% of the time; resampling whole model sizes covers it 94% |
The pattern across these: write a NumPy or float64 reference first, make it the correctness oracle, gate the kernel against it, and keep the suite runnable on CPU-only CI.
| Project | Result |
|---|---|
| INT4 KV-cache quantization in CUDA, Triton and Pallas CUDA · Triton · JAX/Pallas · H100 |
Llama-2-7B keys compressed 3.56× for +0.29% perplexity, inside a quality gate set before measuring; 0.40 ms decode attention on H100; 154 tests. Found that compiled Pallas kernels race on GPU, so that path is refused by design |
| Certified sparse attention PyTorch · Transformers · 2× H100 |
Detects, without labels, when sparse KV-cache compression silently degrades output (AUC 0.71–0.75 at 7B on Qwen2.5 and Mistral) and turns it into an anytime-valid bound. Hypotheses pre-registered with kill criteria; 88 tests |
| losscolumn Triton · CUDA · NCCL · Blackwell |
A benchmarking standard where every result first prints where the method loses. Block-sparse FlashAttention kernel, NCCL/gloo collective harness at world sizes 2–8. Found a factor-of-world-size error in an all_gather bandwidth formula; 770 tests |
| PagedKV-Fusion CUDA · INT8 paged attention |
KV-cache eviction 1.71 ms → 0.56 ms at 16K blocks (~3×); INT8 paged decode attention at ~50% of FP16 KV memory |
| GPU stall attribution Kineto · CUPTI · fault injection |
Names which of nine causes left a training GPU idle, scored against injected faults as a confusion matrix (0.99 accuracy on synthetic traces; the hardware sweep has not been run yet). 230 tests |
- Real-Time Feature Store — a production-readiness audit that surfaced five real concurrency bugs, each reproduced and given a regression test. Parquet read-modify-write lost 174/200 records under 8 concurrent writers; the online store applied last-write-wins by arrival order instead of
event_time. - Agentic Verification Triage System — regression-failure triage: parses logs into failure signatures, clusters related failures, drafts prioritized bugs, and runs a critic pass to suppress false positives.
- KubeInfer — Helm chart for multi-replica vLLM on Kubernetes: session-affinity routing for KV reuse, queue-depth autoscaling on
vllm:num_requests_waitingrather than CPU, NetworkPolicy, RBAC, 12 Prometheus alert rules. - LLM-HDL-Bench — 46-module SystemVerilog benchmark that requires agreement from two independent tools (Yosys + Icarus) before a result counts. Reports 46/46 after one human edge-case fix and 45/46 with that fix reverted.
Because "seems better" and "is better" are different claims.
- Quasi-Experimental Causal Platform — staggered rollouts: naive TWFE difference-in-differences shows +15.6% GMV but fails the parallel-trends test; cohort-robust estimates with not-yet-treated controls give about +7.2%.
- A/B Test Guardrail Metrics — SRM gating, pre-registered metrics, Holm correction validated against the statsmodels reference, applied to three public experiments.
- Toxic Content Prevalence & Intervention Impact — weighted difference-in-differences on 45.6M Reddit comments. Reports the label-noise sensitivity that exceeds the point estimate rather than burying it.
- Causal Inference Toolkit — DiD, Synthetic Control and BSTS behind one API with ground-truth validation and placebo tests. Surfaces 69% cross-method disagreement instead of averaging incompatible answers.
Every metric on this page comes from a committed artifact in the public repository it links to. Where something is unmeasured or missed its target, the repo says so, and pending work is labeled as pending rather than done.
AI Engineer, Developer Tooling & Semiconductor Automation at SwanTech AI
M.S. Applied Data Science, University of San Diego · GPA 3.9
Open to Machine Learning Engineer, ML Infrastructure and Applied Scientist roles · apatil@sandiego.edu · LinkedIn

