chinmay18.com

AI Software Engineer · Reliance Jio · Frisco, Texas

Chinmay
Shrivastava

I build high-performance backend and ML infrastructure, and I validate it against references instead of trusting it.

At Reliance Jio I lead backend architecture for a production 4G/5G analytics platform on an air-gapped Kubernetes/OpenShift cluster, where a typed-intent compiler cut P50 latency from 20 s to 1 s. Outside work: thirty-two changes merged upstream, six into PyTorch core, five into Apache Arrow, three into DuckDB, three into Meta's bpfilter, three into vLLM, three into the sherpa-onnx speech toolkit, two into LLVM, and the rest into llama.cpp's CUDA backend, bpftrace, Wasmtime's Cranelift, simdutf, OpenTelemetry C++, Milvus's Knowhere vector search engine and the unordered_dense hash map, plus systems projects with committed benchmarks.

Evidence ledger

Numbers that come with their sources

Each entry names what was measured, on what, and where the result lives. Caveats stay attached to the number.

upstream
32
Changes merged into vLLM, llama.cpp, PyTorch core, sherpa-onnx, DuckDB, Meta's bpfilter, bpftrace, Wasmtime (Cranelift), LLVM, Apache Arrow (nanoarrow and arrow-rs), simdutf, OpenTelemetry C++, Milvus Knowhere and unordered_dense
vllm-project/vllm #67098, #67571, #67812 · ggml-org/llama.cpp #31345 · pytorch/pytorch #158985, #173183, #203097, #203228, #201639, #202968 · k2-fsa/sherpa-onnx #4282, #4283, #4305 · duckdb/duckdb #27979, #27973, #27707 · facebook/bpfilter #364, #369, #597 · bpftrace/bpftrace #5444 · bytecodealliance/wasmtime #15220 · llvm/llvm-project #240903, #240904 · apache/arrow-nanoarrow #1011, #993 · apache/arrow-rs #12122, #12213, #12113 · simdutf/simdutf #1086 · open-telemetry/opentelemetry-cpp #4725 · zilliztech/knowhere #1975 · martinus/unordered_dense #387
measured
48ms
P95 steady-state sync drift between three browsers, Mustard Watch Party
3 Chrome clients · ~300 ms simulated RTT · 240 s · player-reported, single committed run · docs/measurements
measured
1.04–1.76×
Fused RMSNorm→FP8 kernel vs the torch.compile composite
A100 · FP16 · kernel time · six shapes · 4.9–7.2× vs eager · benchmarks/results/2026-08-25…
measured
2.7–6.7×
Training-step speedup after autotuning vs PyTorch-default FP32 eager
ResNet-50 2.71× · ResNet-18 3.84× · 6-layer Transformer 6.65× (2.55× vs TF32 eager) · A100 · benchmarks/results/2026-08-25…
production
20 s → 1 s
P50 latency after a typed-intent compiler took 59% of analytics queries off the LLM path
Reliance Jio 4G/5G analytics platform · wrong answers 17% → 4% · employer figures, 2025–26
adoption
7,301
All-time downloads of the medical-prescription OCR model on Hugging Face
chinmays18/medical-prescription-ocr · 121 in the last 30 days · 11,461 all-time dataset downloads · huggingface.co · fetched 2026-11-29

Single-author benchmarks, one machine per quoted number; none has been independently reproduced. The old figures that used to live here (97% KV-cache reduction, 4.06× speedup, 858 FPS) had no committed source and were retired.

Selected work

Three systems, each with a measured claim and its limits

The diagrams below are the same ones used in my GitHub profile README; the numbers they show are committed in each repository.

Distributed systems · live at mustard.watch

Mustard Watch Party

Video synchronization for watch parties, with a model-checked control protocol.

Clients connect over WebSockets, estimate a clock offset from the socket acknowledgment (NTP-style) and correct drift with predictive rate control; room state lives in Redis behind atomic Lua scripts. The 48 ms P95 is steady-state, player-reported drift across three Chrome clients at roughly 300 ms simulated RTT over a 240-second run. A separate audio-output measurement showed the player API understates true skew by about 45 ms at P95, so the number is quoted as player-reported, never as physical sync.

TLA+/TLC model checking exposed a stale-epoch bug after store resets, which led to ordered epochs; idempotency keys plus atomic updates give at-most-once application of control commands under duplication and reordering. The multi-instance path is exercised in a three-instance lab and nightly CI; production currently runs one backend instance. The Go and Rust relays are conformance studies rather than the production backend. At 10,000 local connections the Rust relay used 14.5 KB per connection against 40 KB for Go; the tail-latency comparison was inconclusive.

48 msP95 drift · scenario S2 (~300 ms RTT) · 3 clients · 240 s
14.5 vs 40 KBmemory per connection, Rust vs Go · 10k conns
TLA+at-most-once control application, model-checked
Diagram: three Chrome clients estimate a clock offset over the socket acknowledgement and correct drift with predictive rate control; room state lives in Redis behind atomic Lua scripts. Chart of steady-state P95 drift across the five scenarios of the servo impairment matrix (S0, S2, S3, S5, S6): 49, 48, 79, 29 and 86 ms, two later runs (S8, S9) being committed but not charted; relay memory 14.5 KB for Rust versus 40 KB for Go per connection. Diagram: three Chrome clients estimate a clock offset over the socket acknowledgement and correct drift with predictive rate control; room state lives in Redis behind atomic Lua scripts. Chart of steady-state P95 drift across the five scenarios of the servo impairment matrix (S0, S2, S3, S5, S6): 49, 48, 79, 29 and 86 ms, two later runs (S8, S9) being committed but not charted; relay memory 14.5 KB for Rust versus 40 KB for Go per connection.

GPU kernels · PyTorch custom ops

Fused LayerNorm / RMSNorm CUDA operators

Residual-add fusion, FP8 outputs and a deterministic backward, with no graph breaks under torch.compile.

The eager composite runs residual-add, normalization and an FP8 cast as three kernels with HBM round-trips; the fused version does all three in one. Parameter gradients use fixed-order reductions instead of atomic accumulation, which is where the determinism comes from. The modules register through torch.library.custom_op, so compiled graphs stay whole.

For dynamic RMSNorm→FP8 in FP16 on an A100 I measured 4.9–7.2× over the eager composite and 1.04–1.76× over the compiled composite across six shapes. Those are kernel-time comparisons, not end-to-end model speedups, and the compiled-composite win does not transfer to the H100, where the repository documents 0.70–1.20× and makes no claim. The non-FP8 fused-add ops sit at parity with compiled PyTorch.

4.9–7.2×vs eager PyTorch · A100 · FP16 · kernel time
1.04–1.76×vs torch.compile composite · A100 only
289tests · CI compiles sm80/sm90
Diagram: the eager composite runs residual-add, normalization and an FP8 cast as three kernels with HBM round-trips; the fused version does all three in one kernel. Chart: dynamic RMSNorm to FP8 kernel time is 4.9 to 7.2 times faster than the eager composite and 1.04 to 1.76 times faster than the compiled composite across six shapes on an A100 in FP16. Diagram: the eager composite runs residual-add, normalization and an FP8 cast as three kernels with HBM round-trips; the fused version does all three in one kernel. Chart: dynamic RMSNorm to FP8 kernel time is 4.9 to 7.2 times faster than the eager composite and 1.04 to 1.76 times faster than the compiled composite across six shapes on an A100 in FP16.

Performance tooling · on PyPI as pytorch-autotune 2.0

PyTorch AutoTune

Times candidate training configurations on the target model and keeps the fastest.

The tuner benchmarks precision, compile mode, memory format and fused-optimizer combinations on the target model and batch, under a time budget. A winner has to beat the incumbent by more than 3%, the search never returns a configuration slower than the baseline, and the report records every trial together with compilation cost and the number of training steps to break even.

Against PyTorch-default FP32 eager on an A100 the tuned stack reached 2.71× on ResNet-50, 3.84× on ResNet-18 and 6.65× on a 6-layer Transformer; against plain torch.compile it was 2.0–6.1×. With TF32 matmuls enabled in the baseline, the Transformer gain falls to 2.55×. Rebuilding the winners in a fresh training loop reproduced the committed numbers within 1.5%. Earlier versions advertised a 4.06× T4 result and an energy figure; both were retracted in the changelog because nothing committed supported them.

2.7–6.7×vs PyTorch-default FP32 eager · A100
2.0–6.1×vs plain torch.compile
≤1.5%drift when re-measured from scratch
Diagram: the baseline is measured first, candidate configurations across precision, compile mode, memory format and fused optimizer run real training steps under a budget, the winner must beat the incumbent by more than 3 percent, and the report records every trial. Chart: 2.71 times on ResNet-50, 3.84 times on ResNet-18 and 6.65 times on a six-layer Transformer versus the PyTorch-default FP32 eager baseline; the Transformer gain is 2.55 times against an eager baseline with TF32 matmuls enabled. Diagram: the baseline is measured first, candidate configurations across precision, compile mode, memory format and fused optimizer run real training steps under a budget, the winner must beat the incumbent by more than 3 percent, and the report records every trial. Chart: 2.71 times on ResNet-50, 3.84 times on ResNet-18 and 6.65 times on a six-layer Transformer versus the PyTorch-default FP32 eager baseline; the Transformer gain is 2.55 times against an eager baseline with TF32 matmuls enabled.

Upstream record

Pull requests to projects I do not own

Status as of 2026-11-26; merged changes only, each linked to its landing commit. Not listed: four other PyTorch proposals and five Metaflow proposals that were closed without landing, one Stripe fix superseded by the maintainers' own, and a torchtune documentation PR (#2889) closed in October 2026 when that project was wound down.

Upstream pull requests, status as of 2026-11-26
ProjectChangeRefStatusWhen
vLLM With the ARC eviction policy, the CPU KV-cache offload tier evicted a running request's first chunks before its last ones, so the chunks it kept could never be hit, since lookup needs a contiguous prefix from chunk 0. ARC now evicts a running request's chunks tail first, as LRU does. After 16 concurrent 2,048-token prompts on an RTX 4090, resident but unreachable chunks fell from 252 to 0, and replaying the prompts hit 8,016 cached tokens instead of 4,096, the same as LRU. Landing commit. #67098 merged Nov 2026
vLLM With draft-model speculative decoding, the engine's startup dummy run took each request's draft slots out of the token budget but kept the request count, so the engine failed to start with an assertion error when the budget was small, for example Qwen3-1.7B with a Qwen3-0.6B draft at --max-num-batched-tokens 256 and the default max_num_seqs. The dummy run now caps its requests so each keeps its query tokens plus its draft slots, as warmup already did. Landing commit. #67571 merged Nov 2026
vLLM In chunk_scaled_dot_kkt, the vendored flash-linear-attention kernel behind Triton GDN prefill, scaling k by beta inside the K loop made Triton's pipeliner give k's shared-memory buffer one slot too few, so on Hopper the autotune configs with BK < K and num_warps >= 4 gave different results from run to run. beta is now applied after the loop, as upstream FLA does: all 27 configs give the same result on every run at K=128 and K=256, within 2.8e-7 of a float32 reference, and the autotuned kernel is 4–6 % faster on an H100. Landing commit. #67812 merged Nov 2026
llama.cpp On CUDA, MUL_MAT_ID ignored the precision a model requests with ggml_prec_set_acc: the per-expert copy of the node kept op = GGML_OP_NONE, so each expert's cuBLAS, MMVF and MMQ calls saw the precision as undefined. IQ1_M experts, which above a batch of 8 fall back to dequantize + cuBLAS with an fp16 result on most GPUs, overflowed to inf above 65504 even with BF16 or F32 requested. The per-expert node now carries GGML_OP_MUL_MAT: on an NVIDIA A10 those cases are finite and match the CPU, default precision is unchanged, and test-backend-ops passes 20274/20274. Landing commit. #31345 merged Nov 2026
PyTorch core Enable the existing dynamic-shape support for foreach operations by default under torch.compile, with a test update. Landing commit. #158985 merged Jul 2025
PyTorch core Expose rearrange through the torch.func public API, with tests and documentation. Landing commit. #173183 merged May 2026
PyTorch core The cuDNN CTC loss read strided log_probs as if contiguous and returned a gradient buffer that cuDNN leaves unwritten past each sequence's length; it now copies the input contiguously and zero-initializes the gradient, with tests against the native kernel. Landing commit. #203097 merged Nov 2026
PyTorch core Sparse CSR add, addmm, mm and sampled_addmm with out= wrote their result contiguously into a strided out.values() view, so it landed in the wrong elements and overwrote the storage between them. They now run on a contiguous clone and copy the result back through the view, and resizing such a view to another shape raises instead of restriding it. This applies the fix the sparse maintainer posted on the issue, with two corrections and regression tests; the full test_sparse_csr.py passes on an RTX 4090. Landing commit. #203228 merged Nov 2026
PyTorch core Each conditional node in a CUDA graph re-routes allocations to the graph's memory pool and took a pool reference it never released, so the pool leaked and could never be freed. The reference is now released right after each re-route, so the graph keeps only the one from capture start. Tests check the pool's use count, the pinned-host pool and expandable segments, and fail without the fix (RTX 4090). Landing commit. #201639 merged Nov 2026
PyTorch core With torch.use_deterministic_algorithms(True), CUDA sparse-dense matmuls (mm, addmm, matmul, mv, addmv, batched CSR bmm, hspmm) still used cuSPARSE algorithms documented as nondeterministic, and deterministic mode neither switched them nor raised. Following the sparse maintainer's sketch, deterministic mode now selects cuSPARSE's bit-wise reproducible algorithms (CSR_ALG3 from cuSPARSE 12.7, otherwise COO_ALG2 on a COO view), and on ROCm these calls raise the nondeterministic-algorithm error, since hipSPARSE documents no deterministic SpMM. On an H100 a repro went from 26 nondeterministic cases to 0; the cost, in deterministic mode only, is up to 17.9× for CSR mm on a matrix with one very dense row. Landing commit. #202968 merged Nov 2026
sherpa-onnx Streaming NeMo FastConformer CTC models subsample audio by 8, but endpointing and timestamps assumed 4, so trailing silence counted at half its length: the 1.2 s endpoint rule fired after about 2.4 s, often after the next utterance had started, which then lost its first word, and token timestamps were halved. The recognizer now takes the factor from the model's metadata. On 40 streams of five LibriSpeech utterances with a reset at each endpoint, test-clean WER fell from 4.80% to 3.22% and wrong first words after an endpoint from 29.6% to 4.4%; the new test fails without the fix. Landing commit. #4282 merged Nov 2026
sherpa-onnx Streaming NeMo models floored their log-mel features with log(max(x, FLT_EPSILON)), which clips most mel bins of quiet audio (three in four at -60 dBFS), while the offline path already used NeMo's additive guard log(x + 2^-24). The streaming NeMo CTC and transducer recognizers now use the additive guard too. On 200 LibriSpeech test-clean utterances scaled to -60 dBFS, WER fell from 9.29% to 6.05% (CTC) and from 8.92% to 5.39% (transducer), with no change at the original level; the new tests fail without the fix. Landing commit. #4283 merged Nov 2026
sherpa-onnx After an endpoint, streaming CTC models (except T-one) and NeMo transducer models reset their encoder states. A new per-stream option, keep_encoder_states, keeps them; the default still resets. On 40 streams of five LibriSpeech test-clean utterances separated by noise, keeping the encoder of the int8 NeMo streaming transducer lowered the share of utterances whose first word is wrong after an endpoint from 6.9% to 3.8%. Landing commit. #4305 merged Nov 2026
Meta bpfilter IPv4 Type-of-Service matcher: command-line parsing, BPF code generation and unit tests. #364 merged Jan 2026
Meta bpfilter IPv6 Traffic Class matcher with endianness-safe byte loads, plus tests. #369 merged Jan 2026
PyTorch Ignite Seven type-hint modernizations across the metrics module (Union[...] to X | Y) from a good-first-issue sweep; not included in the merged counts above. #3484–#3490 merged Jan 2026
DuckDB A CASE or IF that passed a hash join's dictionary column through for some chunks only made the operator cache throw an INTERNAL error that invalidated the database, because the cache assumed a global dictionary never changes; the cache now demotes such a column to flat. Landing commit. #27979 merged Nov 2026
DuckDB SELECT DISTINCT over an unnested struct covered only the columns as written, not the expanded fields, so rows collapsed wrongly; the binder now regenerates the targets after binding. Landing commit. #27973 merged Nov 2026
DuckDB The deprecated materialized C API left a result half-initialized on an untyped SQLNULL column, so later accessors read a missing null mask and segfaulted on SELECT NULL, 42; translation now handles SQLNULL. Landing commit. #27707 merged Nov 2026
Meta bpfilter meta.probability above 50 % matched every packet: a sign-extended 32-bit immediate in a 64-bit BPF compare; switched to 32-bit jumps and extended the end-to-end test. Landing commit. #597 merged Oct 2026
bpftrace print() and clear() walked a map one key at a time, 2N+1 syscalls for a map with N elements. They now read maps with BPF_MAP_LOOKUP_BATCH and clear them with BPF_MAP_LOOKUP_AND_DELETE_BATCH, up to 1,024 elements per call; on a 1M-element hash map, reading the map and clearing it are both more than 4.5× faster (kernel 6.8). Landing commit. #5444 merged Nov 2026
Wasmtime (Cranelift) On x64, a brif, select, trapz/trapnz or icmp eq/ne against zero on the result of a 32- or 64-bit iadd, isub, bor or bxor emitted a separate test; it now uses the flags the operation already sets. Only zero/nonzero conditions are folded, since OF and CF differ from those of a test; precise-output and run tests cover it. Across 25 Sightglass modules, code size went down 0.12 % and the execution-time geomean was unchanged. Landing commit. #15220 merged Nov 2026
LLVM Tests only (NFC), no codegen change: coverage for i16 × i16 → i32 partial reductions on x86 targets without VNNI, ahead of lowering them to PMADDWD. Adds sign-extend-only and mismatched-extend CodeGen cases, a new test for <4 x i16> inputs with a <4 x i32> accumulator, and loop-vectorizer cost-model tests for s16 × s16 on SSE2, AVX1, AVX2 and AVX512BW with a negative u16 × u16 case. Landing commit. #240903 merged Nov 2026
LLVM Without VNNI, a signed i16 × i16 → i32 partial reduction was expanded and only partly folded back into PMADDWD; it now lowers to add(acc, pmaddwd(a, b)). For v4i32 / v8i32 / v16i32 accumulators that takes SSE2 from 11 / 16 / 36 instructions to 2 / 4 / 8 and AVX2 from 6 / 10 / 20 to 2 / 2 / 4. Partial reductions whose <4 x i16> inputs the type legalizer could not widen are now expanded, so VNNI targets no longer crash on them, and the cost model reports PMADDWD, so the loop vectorizer forms these reductions on x86-64-v3/v4. Landing commit. #240904 merged Nov 2026
Knowhere (Milvus) Sealed SINDI sparse indexes can now reorder documents with BP_kmeans before building, behind an opt-in build parameter (sindi_doc_reorder=bp_kmeans), so a search scores fewer postings. Results, filters and iterators still return row ids, the order is stored in a new 4 B/doc section that is checked on load, and with the option off the index files are byte-identical. On one search thread (Xeon Gold 6342, u8), top-10 QPS rose 18.4 % on FiQA, 52.4 % on TREC-COVID and 33.6 % on Quora, with NDCG@10 changing by at most 0.0007; NQ, whose corpus is already grouped by Wikipedia article, got 26.5 % slower, so the option is off by default. Landing commit. #1975 merged Nov 2026
Apache Arrow nanoarrow The ArrowArrayView getters read values, offsets and binary views through typed pointers, which is a misaligned load when a buffer from the C Data interface isn't aligned; they now read through byte-copy helpers. On new tests that read buffers misaligned by 1 to 7 bytes, UBSan reported 56 misaligned loads before the change and none after, and clang generates the same code as before. Landing commit. #1011 merged Nov 2026
Apache Arrow nanoarrow The testing JSON comparison ignored metadata on nested and dictionary child fields; it now recurses into them, with a gtest. Landing commit. #993 merged Oct 2026
Apache Arrow Rust The Parquet Arrow writer counted every row, nulls included, when deciding whether to build a dictionary cache, so mostly-null or all-null dictionary columns allocated a cache they never used; it now counts the selected non-null values across the whole write. An all-null 131,072-row column with 65,536 dictionary values now retains 168 bytes instead of 524,456. Landing commit. #12122 merged Nov 2026
Apache Arrow Rust Benchmarks for Parquet definition and repetition level encoding and for nested writer cases (short lists with nulls, maps), the baseline for encoding levels a group at a time. Landing commit. #12213 merged Nov 2026
Apache Arrow Rust Sparse-dictionary row encoding in arrow-row gathered dictionary values with a dynamic extend per row; typed gathers for string and binary values cut mean time by about 21–24 % on the 8,192-row string-dictionary benchmark (32K–4M dictionary values). Landing commit. #12113 merged Nov 2026
simdutf On ARM64, detect_encodings checked UTF-8, UTF-16LE and UTF-32LE in three separate passes; it now checks them in one pass, as the x86 kernels do. Encodings the length rules out are skipped, failed ones are dropped every 1,024 bytes, and the scan stops once none is left. Against master on an Apple M2 Pro and a Cortex-X925 (46 inputs), 40 got faster (up to 7.6×), 5 tied and one 99-byte input ran at 0.94–0.95×; invalid inputs exit about 100–500× sooner. Landing commit. #1086 merged Nov 2026
OpenTelemetry C++ SocketAddr read a sockaddr_in through a misaligned cast; it now stores a sockaddr_storage, with a regression test that fails on the original header even without sanitizers. Landing commit. #4725 merged Oct 2026
unordered_dense clear() writes the whole index, so it costs as much as the largest size the table ever had. An opt-in clear(clear_mode::sparse) now empties each entry by its own probe walk below one entry per 16 groups: 16 entries left after a 4M-entry peak clear in about 95 ns instead of about 820 µs (Ryzen 9 7950X). Plain clear() is unchanged, since it must still work after keys were moved out. Landing commit. #387 merged Nov 2026

Also published: ChatGPT Spark on the Chrome Web Store. The full list of shipped tools is on the projects page.

Experience

Where the work happened

Nov 2025 → present
Frisco, Texas

AI Software Engineer

Reliance Jio Infocomm USA

  • Lead backend architecture for a production 4G/5G analytics platform; designed the typed-intent compiler that answers 59% of queries without an LLM (P50 latency 20 s → 1 s, wrong answers 17% → 4%; employer figures).
  • Deployed the backend and AI platform across a 13-node, air-gapped, IPv6-only Kubernetes/OpenShift cluster with AMD GPUs, integrating ClickHouse, Airflow, FastAPI and self-hosted vLLM for analytics and inference.
  • Built a root-cause engine over 240 telemetry fields and 80 RF diagnostic rules. Deterministic rule evaluation runs first and bounded multi-agent reasoning second; each answer carries a confidence score, and the engine abstains when evidence is thin.
Sep 2024 → Oct 2025
Boston, Massachusetts

Software Developer

Venture Development Center, UMass Boston

  • Ran a cloud-hosted multi-tenant platform with monitoring, alerting and incident-response tooling (99.9% uptime; employer figure).
  • Built a real-time telemetry dashboard with React and server-sent events (about 60% faster after profiling) and integrated a retrieval-augmented pipeline (85% answer accuracy on the internal evaluation set at 15% lower per-query cost; employer figures).
Jan 2022 → Jul 2023
India

Software Engineer Intern

Landmark Ventures

  • Built a React/Redux property-analysis dashboard with Chart.js that the whole team adopted; deal evaluation became about 3× faster (team-reported).
  • Cut weekly reporting from 8 hours to 1 by automating a pandas pipeline, and trained the team on Git workflows.
2023 → 2025
2019 → 2023

Education and credentials

MS in Computer Science, University of Massachusetts Boston · B.Tech in Computer Science, Lakshmi Narain College of Technology

Toolbox

What I reach for

Languages

  • C++
  • C
  • Python
  • CUDA
  • Rust
  • Go
  • TypeScript
  • SQL
  • Java

Backend & data

  • FastAPI
  • NestJS
  • WebSockets/SSE
  • ClickHouse
  • PostgreSQL/PostGIS
  • Redis
  • Airflow
  • REST APIs

Infrastructure

  • Linux
  • Docker
  • Kubernetes/OpenShift
  • AWS
  • CI/CD
  • Cloudflare · Vercel · Render

ML & performance

  • PyTorch
  • torch.compile
  • vLLM
  • ROCm
  • Hugging Face
  • NVIDIA Nsight
  • kernel fusion
  • benchmark design

Correctness

  • TLA+/TLC
  • reference-based tests
  • regression gates
  • protocol-conformance checks

Contact

Hiring for ML infrastructure or backend?

Based in Frisco, Texas, and open to ML infrastructure and backend roles anywhere in the US. Willing to relocate.

phone
857-339-9199