You found it 🎮
↑ ↑ ↓ ↓ ← → ← → B A
Sameer approves.
⌘ ESC
👤
About
Background & story
⚡
Projects
Sentinel, RaftKV, Vektr
📄
Research
Quantization benchmark, published paper
🔀
Experience
Open source contributions
🛠️
Skills
Go, Java, Python, Redis, AWS...
💻
More Projects
NexusNews, GlobalPD, StreetMart...
✉️
Contact
Get in touch
⌥
GitHub Profile
github.com/sameer-sde
↗
◈
LinkedIn
sameer-ahmed-profile
↗
◉
LeetCode
SameerAhmedDev
↗
📋
Copy Email
ameersameer252@gmail.com
👋 Hire Me →
Hyderabad, India

SAMEER AHMED

Software Engineer.
$

Third-year CS student at Osmania University, Hyderabad. I build distributed systems, ML inference pipelines, and open source tools — from scratch, with real benchmarks. I read Stripe and Cloudflare engineering blogs for fun.

0
Max RPS
0
OSS Stars
3
Merged PRs
Sameer Ahmed
Sameer Ahmed
Software Engineer
About Me

Background & Story

I'm a third-year Computer Science student at Osmania University, Hyderabad — obsessed with building systems that are fast, correct, and resilient under pressure.

I don't reach for libraries when I can understand fundamentals by building them. Hand-rolled HNSW vector indexes. Atomic rate limiters. ML inference at 71K RPS. These aren't side projects — they're proof of depth.

I contribute to open source at production-grade repos like LangChain4j and linkedin/cruise-control, study from Stripe and Cloudflare blogs, and grind competitive programming.

Distributed SystemsML Inference Open SourceGo JavaPython RedisKubernetesAWS
LocationHyderabad, India
DegreeB.E. CSE · Osmania University
Year3rd Year (2024–2028)
Selected Work

Projects /03

⚡ Systems Engineering
001
Sentinel — Real-Time Fraud Detection
Go · Python · XGBoost · ONNX · AWS EC2 · Prometheus
71K
RPS
<6ms
p95 latency
0
errors / 7.8M req
0.87
PR-AUC
99%
cache hit
Exported XGBoost to ONNX served via Go HTTP server. Trained on 284K transactions achieving PR-AUC 0.87, 86% recall. Zero-downtime deploys via atomic.Pointer hot-swap and A/B traffic splitting with Prometheus metrics on AWS EC2.
Read the full case study
The Problem

Fraud detection sits directly in the transaction path — every millisecond of latency is friction for a legitimate customer, and every missed signal is a fraud loss. Most teams serve models in the same language they trained them in (Python), but Python's interpreter overhead makes it hard to sustain high, consistent throughput under load.

Approach

Trained an XGBoost classifier in Python on 284K credit-card transactions (0.17% fraud rate — a hard class-imbalance problem), then exported it to ONNX. A Go HTTP server loads the ONNX model and serves predictions, removing Python from the hot path entirely while keeping the ML tooling where it's strongest.

Key Engineering Decisions
LayerWhat it addsWin
Imbalance handlingscale_pos_weight vs SMOTE, comparedPR-AUC 0.87, recall +6%
Threshold tuningCost-based optimization (0.41 vs default 0.5)₹650 saved per 57K rows
ONNX exportCross-language model servingPython dropped from hot path
Batching1 goroutine owns the session, 32 max / 5ms wait5.67x avg batch size
LRU cacheFNV-1a hash, 2s TTL99% hit rate, ~500x latency drop
Hot-swapatomic.Pointer[modelBundle]Zero-downtime deploys
A/B routingTwo live model bundles, traffic-split by %Real canary deployments
Drift detectionWelford's online stats per featureCatches data drift in flight
Results
  • 71,483 RPS on cache-hot traffic, 53,636 RPS on mixed traffic
  • 5.46ms p95 latency under mixed load
  • Zero errors across 7.8M requests in k6 load testing
  • PR-AUC 0.87, 86% recall / 74% precision at the tuned threshold
Live Dashboard
Sentinel live dashboard with drift detection and A/B test active
Live traffic — RPS chart, drift detection firing (27 features flagged), A/B test active
Sentinel A/B test variant comparison
Real A/B split — Variant A vs Variant B live prediction counts, model config, load tester
What Makes This Different

Most student ML projects stop at "trained a model, got X% accuracy." Sentinel goes further into the serving problem — the part that actually matters in production: latency under load, safe deploys, live experimentation, and monitoring for silent failure modes like data drift.

View on GitHub ↗
⚡ Distributed Systems
002
RaftKV — Distributed Key-Value Store with Raft Consensus
Python
38.9
ops/sec
28.6ms
p99 latency
5.9ms
re-election
From-scratch Raft consensus (Ongaro & Ousterhout, 2014) — leader election, log replication with fast-backtrack conflict resolution, and majority-commit rules. Fault-injection tests simulate node crashes and network partitions; found and fixed a real lock-contention bug, cutting re-election stalls from 3,000+ms to 5.9ms. Zero external dependencies.
Read the full case study
The Problem

Distributed consensus is one of the genuinely hard, foundational problems in systems engineering — it's the reason MIT's graduate distributed systems course (6.824) uses building Raft as its flagship assignment. Three nodes need to agree on a replicated, ordered log and stay consistent even when nodes crash, restart, or the network partitions — with zero external dependencies, no consensus library to lean on.

Approach

Implemented Raft (Ongaro & Ousterhout, 2014) entirely in pure Python stdlib — the same algorithm behind etcd (which powers Kubernetes), CockroachDB, and Consul. Every piece — leader election, log replication, crash-safe persistence, and the fault-injection tests that verify all of it — was built from scratch, not delegated to a library.

Two Real Bugs Found & Fixed
BugRoot CauseFix
Stalled re-electionLock held across blocking network calls — node couldn't respond to incoming votes during its own election attemptRelease lock before making network calls: 3,000+ms → 5.9ms re-election, 7/8 → 8/8 success rate
Stale-read raceClient queried nodes in fixed order, ignoring last-known leader — could hit a follower mid-replication or a dead old leaderClient now prefers last-known leader first, falls back across cluster
Fault-Injection Testing
  • Leader crash mid-operation — new leader elected, zero data loss, writes continue
  • Network partition — minority side (incl. stale old leader) blocked from committing; majority keeps working
  • Crashed node restart — node correctly catches back up via replication after rejoining
Proof: Live Failover, Captured End-to-End

Real screenshots from an actual running 3-node cluster — not mockups. Together they show a healthy cluster, a write committing, the leader crashing mid-session, and the data still being there once a new leader takes over.

Healthy 3-node Raft cluster with n1 as leader
1. Healthy cluster — all 3 nodes online, n1 elected leader
A write committing across the Raft cluster
2. Write commits — SET replicates & commits on all 3 nodes at once
Automatic leader failover after a crash
3. Leader crashes — n3 auto-elected new leader at a higher term
Data integrity confirmed after failover
4. Data survived — GET still returns the value through the new leader
Results
  • 38.9 ops/sec write throughput, full consensus + replication path, p99 28.6ms
  • 2,195 ops/sec read throughput (served locally, no consensus round-trip)
  • 5.9ms avg leader re-election after crash (down from 3,000+ms)
  • Immediate replication on write (vs. waiting for heartbeat tick) doubled throughput: 19.6 → 38.9 ops/sec, p99 latency down 58%
Known Simplifications (Documented, Not Oversights)

Reads can hit any node, including followers, so a read can be slightly stale mid-replication — production Raft systems solve this with "read index" or lease-based reads. No log compaction/snapshotting yet — the log grows unbounded, a natural next extension.

GitHub ↗
🧠 AI · ML
003
Vektr — RAG Engine with Hand-Rolled Vector Search
Java · Python · Undertow · React
0.984
recall@10
35ms
cold start
<1ms
cached
Hand-rolled HNSW vector index (Malkov & Yashunin, 2018). Hybrid BM25 + dense retrieval with RRF fusion. HyDE query rewriting and atomic index persistence — loads in <15ms on restart.
Read the full case study
The Problem

Every modern RAG stack leans on a vector database — Pinecone, Weaviate, Qdrant — treating approximate nearest-neighbor search as a solved, opaque dependency. Vektr asks what's actually inside that black box by building the HNSW index (Malkov & Yashunin, 2018) — the same algorithm those products run — entirely from scratch, plus a hybrid retrieval layer on top of it.

Approach

A Java server hosts a hand-rolled HNSW graph (M=16, efConstruction=200) alongside a from-scratch BM25 inverted index. A Python microservice handles embedding. Queries run through both indexes in parallel — dense HNSW search and sparse BM25 keyword scoring — then Reciprocal Rank Fusion merges the two ranked lists without ever needing to normalize their differently-scaled scores.

Key Engineering Decisions
ComponentWhat it doesWhy it matters
HNSW IndexHand-rolled multi-layer graph, greedy descent + beam searchrecall@10 = 0.984 on 1,000 vectors
BM25 IndexInverted index, k1=1.5, b=0.75Catches exact keyword matches dense retrieval misses
Reciprocal Rank Fusion1/(60+rank_dense) + 1/(60+rank_bm25)Combines dense + sparse without score normalization
QueryCacheLRU + ReadWriteLock, 10K entriesCache hits return in <1ms
HyDE rewritingEmbeds a hypothetical LLM answer instead of the raw queryCloses the question-space vs answer-space embedding gap
Index persistenceAtomic write-to-tmp + rename (LevelDB/RocksDB pattern)Index loads from disk in <15ms on restart
Live Dashboard
Vektr live semantic search results with RRF scores
Live search — real query "difference between BERT and GPT" returning ranked results from 4 distinct source documents with RRF scores, 100ms latency
Vektr HNSW layer distribution chart
HNSW graph structure — real layer distribution from the live index (80 nodes/95% at Layer 0, 4 nodes/5% at Layer 1), matching the paper's expected exponential decay
Vektr live search dashboard showing real-time metrics and results
Full dashboard — search UI, ingest panel, and index metrics from the actual running system
Results
  • recall@10 = 0.984 on 1,000 vectors, 50 queries
  • 35ms cold search latency, <1ms cached
  • ~28ms warm batch embedding (batch of 3), ~4ms single warm embed
  • Tested live against 31 Wikipedia articles / 84 vectors — a query like "difference between BERT and GPT" correctly pulls results from 4 distinct source documents via RRF
What Makes This Different

Most RAG projects wire together existing vector DB SDKs. Vektr instead demonstrates the algorithm underneath them — hybrid retrieval, query rewriting, and durable persistence — built and benchmarked from first principles rather than configured from a managed service.

GitHub ↗
Published Work

Research & Publications

001
Quantization Trade-offs for LLM Inference on Apple Silicon
MLX · llama.cpp · Python · Matplotlib · LaTeX
360
inference runs
17–64%
MLX faster
100%
8-bit accuracy
3
models tested
Designed and ran a controlled empirical benchmark of LLM inference on Apple Silicon — MLX vs. llama.cpp, 4-bit vs. 8-bit quantization — across 3 open-weight models. Found MLX consistently faster at matched quantization, that 8-bit was lossless in testing while 4-bit showed a measurable accuracy cost in code and arithmetic tasks, and that llama.cpp memory usage is driven by context-window size, not quantization level, verified via direct inspection of runtime model metadata. Published as a citable paper with a permanent DOI, alongside full code and raw data.
Read the full case study
The Problem

Deploying LLMs locally requires quantization to fit consumer hardware, but nearly every published benchmark of these trade-offs targets NVIDIA GPUs — leaving Apple Silicon developers guessing which framework and quantization level to actually use.

Approach

Built two automated Python harnesses: one measuring generation speed and peak memory across 180 runs (3 models × 2 frameworks × 2 quantization levels × 5 prompts × 3 repeats), and one measuring task accuracy across another 180 runs (15 questions per configuration — math, factual recall, and code graded by actually executing the generated function against real test cases).

Bugs Found & Fixed Along the Way
BugRoot CauseFix
Inflated llama.cpp memory readingsmmap-based model loading counted reclaimable file pages as active memoryDisabled mmap (--no-mmap) for true resident-memory measurement
Missing GGUF speed data (90 rows)llama-cli writes stats directly to the terminal, bypassing Python's subprocess captureAdded --simple-io flag to route output through stdout
Key Finding

Llama-3.2-3B and Phi-3.5-mini used ~10.5GB of memory at both 4-bit and 8-bit quantization — nearly identical, despite a 2x difference in weight precision. Verified by inspecting each model's runtime context-window value directly: Llama's default context (79,872 tokens) is 2.4x larger than Qwen2.5-3B's (32,768), which explains the memory gap far better than quantization does.

Results
4-bit inference speed comparison, MLX vs llama.cpp, across three models
Speed comparison — MLX consistently outperforms llama.cpp at 4-bit across all three models tested
Speed-accuracy tradeoff scatter plot across all 12 configurations
Speed vs. accuracy — every 8-bit configuration scored 100%, while 4-bit configs traded some accuracy for speed
llama.cpp memory usage by model, showing context-size dependence
Memory by model — Qwen2.5-3B uses a fraction of Llama/Phi's memory, driven entirely by context-window size
What Makes This Different

Most student ML work stops at "I benchmarked X." This is a full empirical research cycle — hypothesis, controlled experiment, real bugs diagnosed and fixed mid-study, a verified (not assumed) causal mechanism, and a published, citable, peer-reviewable artifact with a permanent DOI.

Read the Paper (DOI) ↗ View on GitHub ↗
Postmortems

Lessons Learned

RaftKV
Lock held across a blocking network call
The election-timer loop called into election logic while still holding the node's lock, which included sequential blocking RPC calls to every peer. This blocked the node from responding to incoming votes during its own election attempt, occasionally stalling re-election for 3,000+ms after a partition.
Fix: release the lock before making any network call. Re-election time: 3,000+ms → 5.9ms.
RaftKV
Stale-read race on the client
The client queried nodes in a fixed order, ignoring which node was the last known leader. Right after a write, a read could hit a follower that hadn't yet applied that entry, or hit a now-dead old leader with no fallback.
Fix: client now prefers the last-known leader first, then falls back across the cluster.
Sentinel
Default connection pool was the real bottleneck
Serving predictions at scale exposed that batching alone wasn't enough — with 32 requests batched per inference call, the wait window and downstream connection handling needed tuning together, not independently.
Fix: tuned batch window to 5ms with maxBatch=32. Result: 5.67x average batch size, p99 under 2ms warm.
Vektr
Dense retrieval alone missed exact keyword matches
Pure HNSW vector search performed well on semantic similarity but occasionally missed results that shared exact keywords with the query — a known weakness of dense-only retrieval.
Fix: added BM25 hybrid retrieval with Reciprocal Rank Fusion, combining dense and sparse signals without needing to normalize their differently-scaled scores.
Experience

Open Source & Work

2024
Present
Open Source Contributor — vLLM
PR #54832 ↗ · github.com/vllm-project · 90K+ Stars
Implemented per-modality LoRA tower/connector token-count logic for Phi-4-multimodal (audio + vision), resolving a multi-stage token compression edge case (NeMo conv subsampling, qformer, spatial patch merging). Added unit tests covering both modalities and edge cases.
PythonLoRAMultimodalTesting
2024
Present
Open Source Contributor — LangChain4j
PR #5341 ↗ · github.com/langchain4j · 12K+ Stars
Implemented deduplication of overlapping TextSegments in the RAG retrieval pipeline. Added suffix-prefix overlap detection with 9 unit tests and a configurable opt-out flag. PR #5341 merged.
JavaRAGLLMTesting
2024
Present
Open Source Contributor — linkedin/cruise-control
PR #2377 ↗ · github.com/linkedin · 3K+ Stars
Fixed missing EasyMock.verify() calls before reset() in unit tests. PR #2377 merged — all 6 affected tests pass.
JavaEasyMockKafka
2024
Present
Self-Directed Systems Engineer
Independent · Hyderabad, India
Studied Designing Data-Intensive Applications + Stripe/Cloudflare blogs. Built consistent hashing, LRU caching, HNSW vector search, and atomic concurrency from scratch outside coursework.
GoJavaPythonRedisAWSGCP
Tech Stack

Interactive Globe

Sameer Ahmed
FULL STACK SYSTEMS
drag to rotate · hover to explore
Stack

Skills

⚡ Languages
Go90%
Primary
Java85%
Primary
Python82%
Primary
JavaScript70%
Secondary
🏗️ Infrastructure
Distributed Systems88%
Expert
Redis / Kafka84%
Advanced
Docker / Kubernetes78%
Advanced
AWS / GCP75%
Proficient
🧠 ML & AI
ML Inference / ONNX80%
Advanced
XGBoost / scikit-learn75%
Proficient
Vector Search / RAG82%
Advanced
Claude / Anthropic API85%
Advanced
🛠️ Tools & Technologies
Prometheus k6 PostgreSQL gRPC Spring Boot FastAPI React Linux Git Kubernetes CI/CD Vite sentence-transformers Lua Azure
Background

Education

2024 — 2028
🎓 Currently Enrolled
Osmania University
B.E. Computer Science & Engineering
📍 Hyderabad, India
Distributed Systems Algorithms & DS Operating Systems Database Systems Computer Networks Software Engineering
3rdYear
CSEMajor
2028Graduation
2023
Orugallu Junior College
Class XII
85.5%
2021
St. Johns High School
Class X
🏆
PERFECT SCORE
10.0 / 10.0
All Work

More Projects

🧠 AI · React · Live Data
NexusNews — AI War Room Intelligence Dashboard
React 18 · Claude Sonnet 4 · NewsAPI · Recharts · Web Audio API · Vercel
Production-grade AI intelligence dashboard with 35+ pages — pulls live breaking news via NewsAPI, processes through Claude AI, and presents as a cinematic war room. Features DEFCON meter, geopolitical threat maps, AI scenario simulator, psychological world leader profiles, disinformation detector, voice navigation, 4 cinematic themes, and Cmd+K global search.
ReactClaude AINewsAPI 35+ PagesLive DataVoice Control
35+ pages · 20+ AI use cases
🔰 AI · Full Stack
GlobalPD — International Police Operations Platform
React 18 · Vite · Claude Sonnet 4 · Unsplash API · SVG
AI-powered police operations dashboard across 18 pages — case management, suspect profiling, wanted wall, evidence vault, undercover ops, AI crime analyst, world map with case pins, inter-agency encrypted chat, and role-based officer authentication.
ReactClaude AI18 Pages SVG NetworkRole Auth
Deadline Detective — AI Murder Mystery Game
React 18 · Claude Sonnet 4 · Canvas API · Web Speech API
1920s AI murder mystery game — interrogate AI suspects powered by Claude, inspect a clickable crime scene map, use a lie detector and fingerprint scanner. Includes 3 game modes (Detective, Killer, Daily Mystery), ghost witness, voice mode, leaderboard, 6 achievement badges, and vintage newspaper ending screen.
ReactClaude AICanvas API 3 Game ModesVoice
📱 PWA · Hyperlocal · 10 Languages
StreetMart — Hyperlocal Vegetable Marketplace
React 18 · PWA · Web Speech API · Google Maps API · UPI · Service Worker
Progressive Web App connecting Hyderabad residents with local street vegetable vendors. Features live vendor map, 10+ Indian language support (Hindi, Telugu, Tamil, Kannada, Malayalam...), voice search, group buying with live member list, bulk discounts, loyalty points, vendor dashboard with AI tips, UPI payments, offline support via service worker, and WhatsApp pre-ordering.
PWA10 LanguagesOffline Voice SearchMapsUPI
Installable · Works offline
View All on GitHub ↗
Writing

Blog Posts

001 · dev.to
How I Built a Real-Time Fraud Detection System That Handles 71,000 RPS at p95 <6ms
GoMLONNXAWS
Read on dev.to ↗
002 · dev.to
Building a Distributed Rate Limiter That Handles 18,769 req/s with Redis Lua Scripts
GoRedisDistributedLua
Read on dev.to ↗
003 · dev.to
I Built a Vector Search Engine from Scratch — Here's What I Learned
JavaHNSWRAGML
Read on dev.to ↗
004 · dev.to
I Built a Distributed Key-Value Store with Raft Consensus From Scratch — Here's What I Learned
PythonRaftDistributedSystems
Read on dev.to ↗
Let's Connect

GET IN TOUCH!

I respond to every message — usually within 24 hours.