whatisgithub

What is tessera?

zengxiao-he/tessera — explained in plain English

Analysis updated 2026-05-18

56PythonAudience · researcherComplexity · 5/5LicenseSetup · hard

In one sentence

Tessera is a from-scratch pipeline for distilling a small language model from a larger one and serving it efficiently with custom GPU kernels.

Mindmap

mindmap
  root((Tessera))
    What it does
      Knowledge distillation
      Distributed training
      Fast inference serving
    Tech stack
      Python
      PyTorch
      Rust
      Triton
      CUDA
      JAX
    Use cases
      Train a student model
      Serve many conversations
      Verify numerical correctness
    Audience
      ML researchers
      Systems engineers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Distill a large teacher model into a smaller, faster student model.

USE CASE 2

Train across multiple machines using a custom distributed parameter-splitting implementation.

USE CASE 3

Serve many simultaneous conversations efficiently using a paged key-value cache and continuous batching.

USE CASE 4

Speed up generation with speculative decoding that drafts and verifies multiple tokens at once.

What is it built with?

PythonPyTorchRustTritonCUDAJAX

How does it compare?

zengxiao-he/tesseraeadmin2/jarvis_aigreatvishal27-rc/ai-resume_analyzer
Stars565656
LanguagePythonPythonPython
Setup difficultyhardhardmoderate
Complexity5/54/52/5
Audienceresearcherdevelopervibe coder

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1day+

Custom Triton/CUDA kernels and multi-machine distributed training require a compatible GPU setup.

Apache 2.0: free to use, modify, and distribute, including commercially, with attribution and no warranty.

So what is it?

Tessera is a project that builds the full pipeline for training a small language model and then running it efficiently, all from scratch. The central idea is knowledge distillation: you start with a larger, more capable model (the teacher) and train a smaller model (the student) to reproduce its behavior. The result is a model that runs much faster and cheaper while trying to preserve as much of the teacher's quality as possible. On the training side, the project implements its own version of the distributed training technique that splits a model's parameters across multiple processors, along with the matching optimizer. This lets training run across multiple machines without needing a pre-built framework to manage the coordination. The README notes this implementation is verified to produce numerically identical results to single-machine training. The inference (serving) side of Tessera is where much of the complexity lives. It includes a paged key-value cache, which is a memory management technique borrowed from operating systems that lets the server handle many simultaneous conversations without wasting GPU memory. There is also a continuous batching scheduler that keeps the hardware busy by constantly recombining active requests, and speculative decoding, which speeds up generation by having the model draft several tokens at once and then verify them in a single pass. For raw speed, the project includes custom GPU kernels written in Triton and CUDA, which are low-level languages for programming graphics cards directly. These replace standard library functions for attention, normalization, and matrix multiplication with hand-tuned versions. On hardware without a compatible GPU, the code falls back to standard PyTorch operations automatically. The network-facing layer is written in Rust and connects to the Python engine, handling incoming HTTP requests and managing back-pressure when the system is near capacity. There is also a separate reimplementation of the model's core logic in JAX, used purely as an independent check that the PyTorch version produces correct numbers. The project is licensed under Apache 2.0.

Copy-paste prompts

Prompt 1
Explain how Tessera's paged key-value cache reduces GPU memory waste during inference.
Prompt 2
Walk me through setting up knowledge distillation from a teacher model to a student model in Tessera.
Prompt 3
How does continuous batching keep the GPU busy across many simultaneous requests?
Prompt 4
What does the JAX reimplementation in Tessera verify compared to the PyTorch version?

Frequently asked questions

What is tessera?

Tessera is a from-scratch pipeline for distilling a small language model from a larger one and serving it efficiently with custom GPU kernels.

What language is tessera written in?

Mainly Python. The stack also includes Python, PyTorch, Rust.

What license does tessera use?

Apache 2.0: free to use, modify, and distribute, including commercially, with attribution and no warranty.

How hard is tessera to set up?

Setup difficulty is rated hard, with roughly 1day+ to a first successful run.

Who is tessera for?

Mainly researcher.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.