
Eli Bendersky's website
4,167 FOLLOWERS
This blog began in 2003 as a personal online journal; in the past few years it became mostly an outlet for technical, programming-related posts. It's my way to document things I find interesting for my future self.
Eli Bendersky's website
1w ago
Spend enough time looking at Python programs and packages for machine learning, and you'll notice that the "JIT decorator" pattern is pretty popular. For example, this JAX snippet:
import jax.numpy as jnp
import jax
@jax.jit
def add(a, b):
return jnp.add(a, b)
# Use "add" as a ..read more
Eli Bendersky's website
1M ago
Automatic Differentiation (AD) is an important algorithm for calculating the derivatives of arbitrary functions that can be expressed by a computer program. One of my favorite CS papers is "Automatic differentiation in machine learning: a survey" by Baydin, Perlmutter, Radul and Siskind (ADIMLAS from here on). While this post attempts ..read more
Eli Bendersky's website
1M ago
"Dr. Euler's Fabulous Formula" by Paul J. Nahin - a kind of sequel to the previous book I read by this author ("An imaginary tale"). Here he collected all the interesting mathematical explorations that didn't make the cut for that book. I found this one to be much closer to a ..read more
Eli Bendersky's website
1M ago
This is Part 5 in a series of posts describing the Raft distributed consensus algorithm and its complete implementation in Go. Here is a list of posts in the series:
Part 0: Introduction
Part 1: Elections
Part 2: Commands and log replication
Part 3: Persistence and optimizations
Part 4: Key ..read more
Eli Bendersky's website
2M ago
In the previous post I talked about running ML inference in Go through a Python sidecar process. In this post, let's see how we can accomplish the same tasks without using Python at all.
How ML models are implemented
Let's start with a brief overview of how ML models are ..read more
Eli Bendersky's website
3M ago
Machine learning models are rapidly becoming more capable; how can we make use of these powerful new tools in our Go applications?
For top-of-the-line commercial LLMs like ChatGPT, Gemini or Claude, the models are exposed as language agnostic REST APIs. We can hand-craft HTTP requests or use client libraries (SDKs ..read more
Eli Bendersky's website
3M ago
Go 1.23 shipped with a new major feature: ranging over functions (also known as "iterators"), per this proposal. This feature is nicely covered in the official Go blog post from August.
This article is a rewrite of my older post that described this feature when it was still in ..read more
Eli Bendersky's website
3M ago
When learning the basics of quantum computing, the Bloch sphere comes early on as a visualization technique of quantum states. It shows the state of a single qubit as a point on this sphere:
This post explains how the Bloch sphere works and also why it works.
Mapping 4 dimensions ..read more
Eli Bendersky's website
4M ago
In this quick post I'll dispel a common confusion in the basic math of complex numbers. It's often useful to calculate the norm-square (also known as absolute square) of a complex number z. This norm-square is denoted |z|^2. One could naively expect that:
\[|z|^2=zz\]
However, that's false ..read more
Eli Bendersky's website
4M ago
This is Part 4 in a series of posts describing the Raft distributed consensus algorithm and its complete implementation in Go. Here is a list of posts in the series:
Part 0: Introduction
Part 1: Elections
Part 2: Commands and log replication
Part 3: Persistence and optimizations
Part 4: Key ..read more