ABAB Pedia

Adi Ganesh

Adi Ganesh is a technologist and researcher who was selected as a Thiel Fellow in 2014 and writes technical articles on mathematics and machine learning on his personal website.

Contents9 sections
Key facts

Early Life: Math Competitions

Adi Ganesh took part in math competitions when he was younger; in a 2025 blog post he wrote that he first encountered an inequality he really likes “in a past life when I used to do math competitions.”⁠[1]

Education: Mathematics and Computer Science at Stanford University

He recalled that in college he used a local LaTeX workflow to typeset lecture notes live in class.⁠[4]

Selected as a Thiel Fellow

He was a co-inventor of IntentSense, an intelligent bionic glove for partial hand amputees, and was interested in using machine learning and predictive analytics to personalize bionics and health care in general.⁠[3]

Taking CS168

In spring 2018 he took CS168, “The Modern Algorithmic Toolbox,” taught by Greg Valiant at Stanford University. He wrote that it was his favorite technical class at Stanford, describing it as a versatile grab-bag of ideas.⁠[6]

Co-teaching CS43

In the winter quarter of 2020, he co-taught Stanford University's CS43 course with two other instructors, under the name Adithya Ganesh.⁠[7][8][9]

As of November 2026: Research at OpenAI

Technical Writing

He publishes technical articles on mathematics and machine learning on his personal website. On December 23, 2016, he published “The Meissel-Lehmer algorithm,” which explains how the Meissel-Lehmer algorithm computes the prime-counting function π(x) more efficiently than sieving or Legendre’s formula and includes a Python implementation; he wrote that he took it up while working on Project Euler’s Problem 543, whose efficient solution requires a fast algorithm.⁠[10][11]

On December 15, 2018, he published “Pólya-Burnside enumeration in combinatorics,” which explains how Burnside’s lemma and cycle index polynomials from group theory count objects regarded as equivalent under symmetry, with examples such as flag colorings and bracelets. On January 1, 2019, he published “The principle of maximum entropy,” which introduces Shannon entropy, relative entropy (KL divergence) and the principle of maximum entropy, shows that the maximum-entropy distribution is uniform, Gaussian or exponential under different constraints, and applies the idea to dice and the Wallis experiment.⁠[12][13]

On July 13, 2019, he published “The modern algorithmic toolbox,” his notes based on the CS168 course, covering topics including consistent hashing, the Johnson-Lindenstrauss transform, singular value decomposition, tensor rank, spectral graph theory, reservoir sampling, sparse recovery and differential privacy.⁠[6]

On August 20, 2023, he published “GPT in words and code,” which walks through the components of the GPT-2 architecture: byte-pair encoding tokenization, word and positional embeddings, and the transformer block with attention, multi-head attention, the feed-forward network and LayerNorm. He argued that rewriting a model’s forward pass and matching a pre-trained model’s outputs is an effective way to learn how it works, recommended reimplementing picoGPT’s gpt2 function as an exercise, and published his own implementation on GitHub.⁠[14]

On November 4, 2023, he published “My local LaTeX workflow,” describing how he composes LaTeX documents on macOS: live auto-compilation with latexmk, vim-latex macros for faster typing, the Skim PDF viewer, tmux to run the editor and compiler side by side, and inkscape-figures to import vector graphics; he wrote that he is a longtime user of vim.⁠[4]

On November 7, 2023, he published “Speculative decoding for LLM inference,” which explains speculative decoding, in which a small draft model proposes tokens that a larger target model verifies to speed up large language model inference; it notes that at small batch sizes inference is limited by memory bandwidth, so checking several draft tokens costs about the same as generating one, and it closes with a proof that the method reproduces the target model’s output distribution.⁠[15]

On August 20, 2025, he published “Using geometry to prove an inequality,” which discusses an inequality for positive numbers a, b and c and presents an algebraic proof produced by GPT-5, a geometric proof that applies the triangle inequality to a quadrilateral, and a link to an interactive visualization that he asked GPT-5 to build.⁠[1]

Related Organizations, Websites, and Public Accounts

Thiel Fellowship: Official website: https://thielfellowship.org/ (opens in a new window).⁠[16]

Sources17 sources

  1. Using geometry to prove an inequality (opens in a new window)adiganesh.com↑
  2. Adi Ganesh's Blog (opens in a new window)adiganesh.com↑
  3. Meet The 20 Young Entrepreneurs Who Will Receive $100,000 From Peter Thiel (opens in a new window)inc42.com↑
  4. My local LaTeX workflow (opens in a new window)adiganesh.com↑
  5. Thiel 20 Under 20: 4 Indians Make The Cut (opens in a new window)homegrown.co.in↑
  6. The modern algorithmic toolbox (opens in a new window)adiganesh.com↑
  7. CS43 - Class Information (opens in a new window)stanford-lambda.gitlab.io↑
  8. acganesh/compendium: Stanford course notes in math / CS (opens in a new window)github.com↑
  9. acganesh (Adi Ganesh) (opens in a new window)github.com↑
  10. The Meissel-Lehmer algorithm (opens in a new window)adiganesh.com↑
  11. Adi Ganesh (opens in a new window)adiganesh.com↑
  12. Pólya-Burnside enumeration in combinatorics (opens in a new window)adiganesh.com↑
  13. The principle of maximum entropy (opens in a new window)adiganesh.com↑
  14. GPT in words and code (opens in a new window)adiganesh.com↑
  15. Speculative decoding for LLM inference (opens in a new window)adiganesh.com↑
  16. Thiel Fellowship (opens in a new window)thielfellowship.org↑
  17. OpenAI (opens in a new window)openai.com↑