All Stories

Parameter-Efficient Fine-Tuning: Math and Mechanics of LoRA and QLoRA

Full-parameter fine-tuning of a 7B model needs about 112 GB of VRAM: fp16 weights (14 GB) plus gradients, fp32 Adam moments, and fp32 master weights add up to roughly 16...

Context Propagation in Go: Building Distributed Tracing Middleware

We spent a week hunting a checkout outage the tracing dashboards could not explain. The gateway started a span, then the trace went dark: payment logged an empty trace ID,...

Mixture-of-Experts (MoE) Architectures: Routing Math and Load Balancing

Dense scaling hits a hard wall: every parameter you add is a parameter you pay for on every token, in both VRAM and bandwidth. Mixture-of-Experts breaks that coupling by making...

ActiveRecord Eager Loading Pitfalls: Subqueries vs. IN Clauses

includes is the most convenient lie in ActiveRecord. You write one method call, and ActiveRecord decides for you whether to emit two queries joined by an IN clause (preload) or...

ActiveJob Scaling: Thread Pools, DB Pool Sizes, and PostgreSQL Contention

The incident is boring and predictable: someone bumps Sidekiq concurrency from 10 to 25, and within an hour pager duty is looking at ActiveRecord::ConnectionTimeoutError across every web and worker process....

Implementing Idempotent API Endpoints in Rails using Redis Lock and Request Signatures

A client POSTs a payment, the connection drops mid-response, and the client retries. If your endpoint is not idempotent, the second request charges the card twice. At roughly 3M mutating...