Projects

Highlighting my technical projects, including Chinchilla-Optimal Transformer pre-training and other systems work.

Systems and storage

Search engine internalsFall 2026 · Homebrew

indexly + Indexify

  • indexly is a from-scratch, disk-backed search engine in Rust, benchmarked on 8.84 million MS MARCO passages: 513.8 million token occurrences and 358 million postings across 1.6 million terms
  • An eight-worker producer–consumer indexing pipeline with bounded queues and Metal GPU radix sorting indexes 3.06 GB in 55.26 seconds on an Apple M4; the external multiway merge streams straight into compression
  • Document-gap encoding and Simple9 compression produce a 915 MiB index, about 31% of the source size
  • Exact BM25-ranked AND/OR retrieval using forward-only posting cursors, block-level binary search, rarest-first conjunctive alignment, and bounded-heap top-10 selection
  • Indexify is a Ratatui terminal app built on it for indexing and searching local PDF, Markdown and DOCX documents, with Aho–Corasick highlighting, atomic index snapshots, and a custom Homebrew tap

Rust · Metal · Ratatui · BM25 · Simple9

indexly on GitHub ↗Indexify on GitHub ↗

8.84MMS MARCO passages indexed in 55 s on an Apple M4
GPU query executionFall 2026

pg_flux: GPU-Accelerated PostgreSQL Extension

  • Co-developed a PostgreSQL 18.6 extension that offloads eligible integer GROUP BY queries (COUNT, SUM, MIN, MAX across multiple payload columns) to NVIDIA GPUs without modifying PostgreSQL core source
  • Integrated GPU execution through planner hooks, CustomPath, and CustomScan, consuming native child plans for scans, filters, and CPU joins
  • Implemented GFTR and GFUR aggregation pipelines using NVIDIA CUB stable radix sorting, run-length encoding, exclusive prefix scans, and block reductions
  • Benchmarked on 29,999,795 TPC-H SF5 lineitem rows across one million groups: 2.66× over serial native PostgreSQL (18.08 s → 6.80 s median), including scan/packing and CPU–GPU transfers; unchanged TPC-H Q13 runs 1.50× faster
  • Preserved SQL NULL and aggregate semantics, validated by 144 GPU fixture executions against a CPU oracle, and added EXPLAIN ANALYZE instrumentation for per-stage CUDA timings

C · C++17 · CUDA · CUB · PostgreSQL

Code on GitHub ↗

2.66×over serial PostgreSQL on a 30M-row TPC-H aggregation
Event loops and FFISummer 2026 · crates.io

fast_kv, on pollio + chaintable

  • fast_kv is a Redis-compatible in-memory key-value store in Rust speaking the RESP wire protocol (drop-in for redis-cli and standard clients), composed from two crates I published
  • A single-threaded, non-blocking TCP server with no threads and no async runtime; a hand-rolled RESP codec batches every complete command in a 16 KB read into a single write() syscall
  • pollio unifies Linux epoll and macOS kqueue behind a single safe Poller trait over unsafe libc FFI, with an allocation-free wait path batching up to 20K events per syscall
  • chaintable is a SwissTable-style hash map with exact O(1) uniform-random key sampling via a dense side index, Redis-style incremental rehashing, and SIMD group probing (NEON + SSE2)
  • Closed a 2× throughput gap to std's HashMap down to ~0.78× through measurement-driven layout, inlining and hashing work, verified with model-based fuzzing against a reference map
  • Ported cases from Redis's upstream Tcl test suite into Rust integration tests, and built a redis-benchmark harness for head-to-head measurement against Redis

Rust · epoll · kqueue · libc · RESP · SIMD

fast_kv on GitHub ↗pollio on crates.io ↗chaintable on crates.io ↗

ConcurrencySummer 2026

Parallel Chess

  • A horizontally scalable, fault-tolerant chess server: stateless Axum nodes with live game state sharded across N Valkey nodes by an FNV-1a hash of game ID, and durable history in MongoDB
  • Replaced per-move distributed locks with a versioned optimistic compare-and-set in Lua, halving per-move datastore operations from 6 to 3
  • Split move handling into a real-time plane (Valkey pub/sub) and a durable plane (Valkey Streams batched to MongoDB every 500ms)
  • Engineered node-failure recovery with heartbeats, peer monitoring, orphaned-game finalization and 60-minute reconnect windows, so no single server's death loses a game
  • Built a Rust load-testing harness that mirrors the engine in-process to assert board correctness on every move: zero consistency failures across millions of moves

Rust · Axum · Valkey · MongoDB

Code on GitHub ↗Read the write-up →

4,000concurrent games sustained on a single droplet

ML systems

Inference servingSpring 2026

PhotoPrism MLOps: Semantic Photo Search with Continuous Learning

  • Built an end-to-end semantic photo search engine on Kubernetes (Chameleon Cloud) using CLIP ViT-B/32 embeddings and Qdrant HNSW indexing, holding end-to-end search under 400ms with GPU-accelerated multimodal reranking
  • Architected a two-stage retrieve-then-rerank pipeline: frozen CLIP ANN retrieval for recall, then a Qwen2-VL-2B reranker scoring the top 10 (query, image) pairs for precision, falling back to raw ANN ordering when the GPU tier is unreachable so search never hard-fails
  • Built a continuous learning loop (POLAR) that retrains the reranker every 100 implicit clicks via LoRA adapters (r=8, 0.2% trainable params) under bfloat16 for ~50% less VRAM, and auto-deploys via Docker
  • Created and published Flickr30K-CFQ, a retrieval benchmark of 31,783 images × 5 query types (~159K training triples) that closes the gap between verbose-caption training data and real short search queries
  • Designed a horizontally scalable async upload pipeline using FOR UPDATE SKIP LOCKED for concurrent workers, with a single-flight retrain guard against thundering herds

Python · PyTorch · CLIP · Qwen2-VL-2B · LoRA (PEFT) · Qdrant · Kubernetes · Chameleon Cloud · MLflow · FastAPI · Prometheus

Code on GitHub ↗Dataset ↗Read the deep dive →

<400 msend to end, with GPU reranking active
Retrieval-augmented generationSummer 2026

Persona AI: RAG Chat Platform from YouTube Transcripts

  • Built and deployed a full-stack RAG platform that turns any YouTube creator's public captions into a chattable persona: an async ingestion worker fetches transcripts, filters out collabs and off-topic uploads by creator-presence score, then chunks, embeds, and upserts into a per-creator Qdrant collection
  • Grounded every reply in retrieved transcript chunks with source citations and anti-hallucination guardrails, backed by an LLM-synthesized persona profile that holds voice steady when retrieval is thin
  • Engineered layered context assembly under a ~10K-token budget (creator RAG, semantic cross-session user memory, recent turns) with a deterministic trim order and minimum-retention floors
  • Implemented durable user memory: a post-reply LLM pass extracts facts, dedups by embedding similarity, and evicts the oldest past a 200-fact cap
  • Shipped the whole stack with JWT, Redis-backed refresh tokens and Google OAuth on DigitalOcean App Platform and Vercel

React 19 · Express 5 · MongoDB · Redis · Qdrant · Docker

Code on GitHub ↗

Pre-training on H200sFall 2025

Chinchilla-Optimal Transformer Pre-training for Music

  • Designed and trained decoder-only Transformer models (NanoGPT) on the Lakh MIDI Dataset, scaling from 1M to 86M parameters with Chinchilla-optimal token budgeting (D ≈ 20N)
  • Optimized training throughput on NVIDIA H200 GPUs using BFloat16 mixed precision, Flash Attention, and torch.compile, improving training speed and sample efficiency over LSTM baselines
  • Achieved a test perplexity of 2.20 with 100% syntactically valid output, generating conditional and unconditional polyphonic music via Top-K sampling (K=600)

Python · PyTorch · CUDA · Flash Attention

Code on GitHub ↗

2.20test perplexity
Medical imagingSpring 2026

Low-Field to High-Field MRI Super-Resolution with Task-Adaptive Transformers

  • Independently designed a full medical imaging pipeline to enhance 64 mT MRI scans into 3 T like images using a transformer-based AMIR architecture
  • Built preprocessing and augmentation pipelines, including slice-to-volume reconstruction, spatial resampling, and synthetic low-field generation from external IXI datasets
  • Trained a 22M-parameter transformer model on ~200 paired subjects, achieving a mean test PSNR of 18.64 dB and max PSNR of 43.21 dB, SSIM of 0.544

Python · PyTorch · Nibabel · NumPy · SciPy · CUDA

Code on GitHub ↗

22Mparameters, trained on ~200 paired subjects

Open source

BenchmarkingPresent

libprocessing: perf suite for processing_render

  • Contributing to libprocessing, an experimental Rust/WebGPU library built on Bevy that brings Processing's core API to desktop, mobile, and web
  • Fixed cross-platform canvas resizing and Retina display scaling by correcting logical-versus-physical pixel handling across the GLFW windowing and Bevy rendering pipeline; merged into the main project
  • Building CPU and GPU benchmarking infrastructure for geometry generation and rendering throughput: deterministic benches for tessellation, mesh generation and command flushing, reporting p50 through p99
  • CI gates that fail on sustained regressions, not noise

Rust · Bevy · WebGPU · Criterion · CodSpeed

libprocessing on GitHub ↗

Database searchPresent

ParadeDB contributions and oxidex

  • Enhanced ParadeDB's PostgreSQL Custom Scan execution pipeline with a heap-filter fallback for unsupported Boolean predicates, preventing planner fallback to native Index Scan
  • Added citext indexing support to ParadeDB, enabling efficient case-insensitive search and better compatibility with PostgreSQL's native data types
  • oxidex is a BM25 search engine in Rust, inspired by Tantivy

Rust · PostgreSQL internals · Tantivy · BM25

ParadeDB on GitHub ↗

Real-time audioPresent

Corelink Audio Transport

  • Developed a multithreaded audio networking pipeline using lock-free queues, zero-copy buffers, and cache-friendly data layouts
  • Implemented ANIRA-based adaptive packet-loss concealment, reducing audio errors by 12% during packet loss

C++ · JUCE · ANIRA

Code on GitLab ↗

Earlier

Load balancing2024

Consistent Hashing Vizualizer

  • Built a custom load balancer implementing consistent hashing to distribute traffic across dynamic server nodes
  • Containerized the entire architecture (API Gateway, Nodes, Analytics) using Docker Compose for easy deployment
  • Implemented a management API to dynamically add/remove servers and visualize request rebalancing in real-time

Docker · Python · Node.js · Shell

Code on GitHub ↗