Decorator JITs - Python as a DSL
Eli Bendersky's website
by Eli Bendersky
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
Visit website
Reverse mode Automatic Differentiation
Eli Bendersky's website
by Eli Bendersky
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
Visit website
Summary of reading: October - December 2024
Eli Bendersky's website
by Eli Bendersky
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
Visit website
Implementing Raft: Part 5 - Exactly-once delivery
Eli Bendersky's website
by Eli Bendersky
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
Visit website
GoMLX: ML in Go without Python
Eli Bendersky's website
by Eli Bendersky
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
Visit website
ML in Go with a Python sidecar
Eli Bendersky's website
by Eli Bendersky
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
Visit website
Ranging over functions in Go 1.23
Eli Bendersky's website
by Eli Bendersky
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
Visit website
Bloch sphere
Eli Bendersky's website
by Eli Bendersky
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
Visit website
Calculating the norm of a complex number
Eli Bendersky's website
by Eli Bendersky
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
Visit website
Implementing Raft: Part 4 - Key/Value Database
Eli Bendersky's website
by Eli Bendersky
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
Visit website

Follow Eli Bendersky's website on FeedSpot

Continue with Google
Continue with Apple
OR