← All tags

#algorithms

Sinkhorn on a Router, Not Just Softmax

When a small model picks tools or experts, plain softmax hides imbalance. I walk through doubly-stochastic routing, the entropy regularizer, and what changed in offline eval.

ctx-compact: What I Learned Trying to Fit Long Conversations into a Token Budget as a ml researcher

My open-source experiment on compacting long chats: a dependency graph that worked on synthetic data, neighbour smoothing that worked on LoCoMo, and an honest negative result.

What the Weights Remember: I Read a Neural Network's Game from Its Weights, Then Hand-Wrote One That Beat Training

After reading a post on LLMs reading model weights, I trained two tiny game networks, read the game back with a forty-line script, and hand-wrote a five-neuron player that beat the trained one.

My Experiments with Voice Generation: Kokoro, Silero, Vosk and Lip Sync from Scratch

How neural TTS turns text into sound, mel spectrograms and iSTFT vocoders in code, a local English and Russian voice stack, and lip sync from a loudness envelope.

The Dark Art of Context Truncation & Dynamic Prompt Compaction in Production RAG

Truncation, packing, and query-conditioned compaction when production RAG outgrows the context window.

Cracking ML System Design Interviews: My Framework

A structured approach to ML system design questions, drawn from my experience interviewing at top tech companies and reaching LeetCode rank 234.

Hyper-Specific Infrastructure Bottlenecks

Why average capacity metrics miss the links that actually fail, and how to find strong vs weak bottlenecks.

Zillow Offers: An Algorithmic Cascading Failure, Read as an ML Post-Mortem

Covariate shift, concept drift, delayed labels and a feedback loop between offers and comps: Zillow's iBuyer collapse as a production ML failure, and the hard guardrails it lacked.

Positions Are Ids, Not Integers

Why insert-at-index loses the other person's sentence, and the merge rules plus Yjs setup that stopped doing it.

Keep the BERT Classifier and Route the Rest

Fine-tuned BERT stays for known intents. A threshold sends the long tail to a prompted model.

Indexing Dense Embeddings Without Fooling Yourself

TF-IDF still wins on exact tokens. Skip-gram and BERT vectors need a normalized index, an over-fetch, and a filter that the index itself does not apply.