Open Source
Explore the latest AI open-source projects from GitHub and HuggingFace.
Explore the latest AI open-source projects from GitHub and HuggingFace.
Tessera is a solo-built, from-scratch LLM stack published under Apache-2.0 (the repository's own LICENSE file carries a standard Apache-2.0 header, even though GitHub's automatic detector currently flags it as unrecognized). Its author, Henry (zengxiao-he), describes themself as a Stanford MSEE graduate working on agentic systems and inference optimization, and the project reads like a deliberate exercise in touching every layer of a real LLM pipeline — training, kernels, serving, and evaluation tooling — without any one piece being a toy.
The training side implements a decoder transformer with RMSNorm, RoPE, grouped-query attention and SwiGLU, plus knowledge-distillation losses (temperature-scaled KL divergence, optional hard cross-entropy, hidden-state matching) for shrinking a teacher model into a smaller student. Distributed training runs on an FSDP/ZeRO-3 implementation written from scratch — flat-parameter sharding with a sharded Adam optimizer — which the test suite checks is numerically identical to single-process training, including across two Gloo ranks, alongside atomic sharded checkpoints with resume-from-latest.
The kernel layer covers a Triton FlashAttention forward pass (online softmax, causal masking, GQA, autotuned tile sizes), a fused RMSNorm, a fused SwiGLU GEMM, and an int8 weight-only matmul that dequantizes inside the K-loop, plus raw CUDA C++ reimplementations of RMSNorm and attention with Nsight profiling notes for the lower-level memory work. On the serving side, Tessera pairs a block-paged KV cache with a ref-counted allocator for prefix sharing, a continuous-batching scheduler that recomposes the batch every step with admission control and preemption under memory pressure, and speculative decoding — the repo's own tests confirm self-speculation reproduces greedy decoding exactly. Post-training quantization covers int8 weight-only, AWQ, and FP8 (E4M3), and a Rust (tokio + axum) gateway calls into the Python engine over PyO3 for the HTTP front end.
What sets Tessera apart from a typical solo systems project is how much of it is tested as a property rather than a one-off script: incremental decode against a full forward pass, each Triton kernel against its torch reference (gated behind a GPU pytest marker), a parallel JAX/XLA reimplementation checked to match PyTorch to about 2e-4, and the sharded Adam optimizer checked step-for-step against torch.optim.Adam. A CI badge on the README backs the claim that this all runs and passes on a plain CPU/Apple-MPS box, with GPU-only tests marked separately for machines that have Triton and CUDA available.
Scale-wise, the project sits at 513 stars and 9 forks since it appeared on 2026-06-05, with a single visible contributor and zero open issues — consistent with a repository that was built and pushed essentially in one sitting rather than iterated on since. The benchmark numbers in the README (measured on an Apple M2 Pro over the torch/MPS reference path, not the fused Triton/CUDA kernels) are labeled by the author as "a floor," and the project's own status section lists what hasn't been built yet: a fused attention backward kernel, a fused paged-attention decode kernel, an FP8 tensor-core GEMM for Hopper, and pjit/shard_map training on the JAX side.
Tessera is not aimed at production-scale serving — the example teacher/student pair distills a 40M-parameter model into a 6M-parameter one, and none of the published numbers demonstrate behavior at real LLM scale. What it offers instead is a single, thoroughly tested reference implementation of how the pieces of a modern LLM training-to-serving pipeline actually fit together, useful to engineers who want to read working code for distillation, custom kernels, paged-KV serving and quantization side by side rather than piece it together from five separate repositories.