Home

Sam Mausberg

GPU systems, compilers, and mathematics.

I built FindTensor, an experimental LLM compiler and runtime. Previously, I researched GPU architecture with Tor Aamodt at UBC.

FindTensor

Rust · C++20 · Python · CUDA

An experimental LLM compiler and runtime, designed to search GPU kernels, batching, and cache policy together. I worked on it from February to September 2026.

CAIRN

Python · C++20 · CUDA · Lean 4

An experimental systems language for CPUs and NVIDIA GPUs, designed to be written by AI agents. It compiles to C++20 and CUDA, and its compiler refuses GPU kernels with shared-memory races, or with barriers that some thread does not reach, before they run.

Claude Code agents wrote most of the compiler, runtime, tests and documentation to my design.

B200 kernels

CUDA C++ · CuTe DSL · Triton

Optimized Blackwell kernels for normalization, FP8 projections, attention backward, and convolution with gating.

Official B200 evaluations on nine problems. The six listed cover 94 workloads, with up to 2.94× geometric-mean speedup per problem over NVIDIA’s agent-optimized scoring baseline.

KernelIndex

TypeScript · Next.js · PostgreSQL

A GPU kernel index that matches an exact workload to compatible implementations and their published benchmarks.

One catalog serves the website, REST API, command-line client, and immutable bulk exports.

Execution environments in CUB

NVIDIA CCCL · Merged · #11587, #11589, #11590

The two-phase DeviceMergeSort, DeviceMerge and DeviceMemcpy::Batched overloads now take an execution environment, so they accept custom streams and tuning like the single-phase calls. Callers that pass a stream keep working.

Merged between September 29 and October 1, 2026, with environment and tuning tests for each overload.

Unrouted experts in SM12x MoE

FlashInfer · Merged · #5451

vLLM writes expert id -1 into padded routing slots under CUDA graphs. The b12x fused-MoE kernels used that id as an index, which on SM120 caused an illegal memory access or silently corrupted output. Negative ids now mark unrouted slots, and fully padded tokens return exact zeros.

Merged September 30, 2026, and shipped in v0.7.1. An NVIDIA maintainer reran the 35 regression cases on an RTX 5090 and showed that 23 of them fail without the fix. NVIDIA’s #5977 extends the same rule to the FP8/MXFP8 backends.

SM120 sparse MLA

FlashInfer · Coauthored · #4802

Dispatch diagnostics and a configuration-query API incorporated upstream with coauthor credit.

Merged September 3, 2026, carrying my code from #4551. It supersedes my #4683 and credits my analysis of the autotuner sweep, which it removes.

FP8 KV calibration

FlashInfer · Reported & fixed · #4984

Reported and reproduced ignored calibration scales in ragged FP8-KV prefill.

Fixed upstream by another contributor; merged September 9, 2026, with credit for my report and reproducer (#4979).

Systems studies

Command A+ on two H100s

Profiled Command A+ W4A4 inference on two H100s across 91 runs, from 512 to 128K context.

1.79× KV capacity over vLLM’s default allocation, and 4–34% more end-to-end output throughput at each context’s largest batch. At 8K context and batch 10, a 2,048-token prefill chunk cuts p99 inter-token latency from 754 ms to 222 ms and costs 18% of single-request prefill throughput.

H100 serving estimator

Estimates GPU time per request from 91 vLLM runs on two H100s, with held-out evaluation and a separate verifier.

6.5% median error on 14 held-out runs (8.6% for a token-rate baseline); the baseline wins on the unseen configuration.

Tensor parallel reference

A decoder block split across 1, 2, and 4 local CPU processes, with numerical checks and exact communication accounting.

192/192 clean executions · 96/96 injected faults contained.

SmolLM2 conformance

Separate full-sequence and KV-cache implementations of SmolLM2-135M, checked layer by layer on CPU.

48 cases · 1,440 layer comparisons · 7/7 injected faults localized.

Research

Learning-guided sampling

Preprint v2 · October 14, 2026

For a specified finite class, one-sided safe guidance can cost linearly many queries where pointwise guidance needs only logarithmically many.

Known finite classes on n-bit strings. The safe-guide results assume bounded stopped reciprocal capacity.

The Work a Verifier Needs

Preprint v1 · October 4, 2026

A certified output head reproduces the engine’s greedy token, including BF16 rounding and tie rules, while recomputing about 1.8 vocabulary entries per decision.

Qwen3.5-4B in SGLang on one GH200. Against tuned stock configurations, throughput rises 1.3–4.6% at one request; with 2 to 8 concurrent requests, the fastest configuration is 1.0–3.0% slower.

Memory return in quantum machines

Preprint v1 · October 4, 2026

Returning a quantum memory’s reduced state does not mean it can supply fresh independent randomness.

Closed machines with exact or approximate return of the memory’s reduced state.

Comparison, coherence and the stability of constructor entropy

Manuscript · October 2026

For entropy-preserving tasks, possibility is equivalent to a uniform work bound along a vanishing-noise family. A stationary quantum model realizes the resulting entropy order.

The result uses modified task clauses and an explicit quantum completion.

Distribution-independent SQ learning does not imply low dimension complexity

Preprint v5 · October 8, 2026

An exponential separation between distribution-independent SQ learning and ordinary, exact probabilistic, and expected-error dimension. It was obtained independently of Patel (2026), who posted a separation first; a qualitative separation also follows from earlier results.

The learner runs in time polynomial in the size of the explicit table. It is not claimed to be polynomial in the input length. Lean checks supporting lemmas only.

An I/O Lower Bound for Exact Attention

Preprint v3 · October 6, 2026

Exact softmax attention requires Ω(nd + n²/M) memory transfers in the stated real-arithmetic model, with a stronger bound for score-polynomial exponential arguments.

Bounded deterministic programs using +, −, ×, ÷ and exp; n ≥ 2, d ≥ 2 and an M-word cache with M ≥ d². The unrestricted bound is tight for fixed d.

Near-Linear Attention in Three Dimensions

Preprint v2 · October 6, 2026

A randomized algorithm computes three-dimensional softmax attention in near-linear word-RAM time, giving optimal exponent α(3) = 1.

Logarithmic-bit rational coordinates bounded by n¹⁰, scalar values in [−1, 1], and simultaneous additive error at most n⁻¹⁰.

Exact Sampling from Neural Networks: Depth, Attention, and Decoding

Preprint v1.0 · October 8, 2026

Exact autoregressive sampling with an appendable attention index has polylogarithmic context cost under fixed-rank key geometry.

Each layer's keys share one affine space of fixed dimension, with positive RMSNorm stabilizers. Expected work includes key and value creation, insertion and every precision refinement; the polynomial degree grows with rank.

Learning Low-Logit-Rank Distributions from Conditional Samples

Preprint v1 · October 8, 2026

At every fixed logit rank, chosen-prefix next-bit samples suffice to learn an accurate standalone generator in polynomial time.

Fully supported T-bit distributions whose centered next-bit logits have magnitude at most T and rank at most d at every history cut. The learner may query any prefix.

Witness-CL

Manuscript · September 10, 2026

Executable memory for SQL agents: relations learned from correct queries are reused only after a later task corroborates them.

Transfer and retention gains are not yet shown; the larger pilot is unfinished.

StateCut

Manuscript · revised September 7, 2026

Bounds that use exact row counts let a cached summary certify some attention results without reading the rows. A refinement forest and transactional writes carry accepted results into later decoder state.

On captured model runs, no complete attention call is certified. There is no pretrained speedup and no proof of equivalence to a deployed attention backend.

Contracted Moment Kernels

Manuscript · revised September 7, 2026

Exact boundary tests and coupled moment bounds certify some attention outputs from moment summaries in constructed cases.

No coordinate passes on the trained Qwen trace, and every measured complete GPU path is slower than fused dense attention.

Lean formalizations

Supporting results and constructions for Erdős problems 20, 61, 119, and 885, formalized in Lean 4 and mathlib.

Partial results and unfinished proof developments; the main conjectures remain open.

About

I study mathematics at UBC, currently on leave to work on GPU systems.

Favourite books & reading list