Tenstorrent Lessons

Interactive guides for Tenstorrent hardware and software. Use the hardware filter to find lessons for your system.

Set Up

Serve Models

Go Deeper

Production Inference with TT-Inference-Server

n150n300T3000p100p150p300cGalaxy 20 min Validated

Deploy Llama-3.1-8B on any Tenstorrent hardware in minutes — n150, n300, T3000, p100, p300c, or TT-QuietBox 2. TT-Inference-Server automates Docker image selection, model download, and server startup with a single command. OpenAI-compatible API ready immediately.

Production Inference with vLLM

n150n300T3000p100p300c 30 min Validated

Deploy with vLLM - OpenAI-compatible APIs, continuous batching, and enterprise features.

Build TT-Metalium from Source

n150n300T3000p100p150p300cGalaxy 60 min Validated

Clone and build TT-Metalium from source. Required for Direct API (Generator API) lessons and for running TT-Metalium examples directly. TT-QuietBox 2 and pre-configured images do not ship with ~/tt-metal — start here if Check 3 in Verify Your Setup failed.

Bounty Program: Model Bring-Up

n150n300T3000p100p150Galaxy 10 min Draft

Learn how to contribute to the Tenstorrent Bounty Program by bringing up new models. Master TT-Metalium while becoming part of the open source ecosystem. Uses the successful Phi-3 contribution as a case study.

tt-installer by Hand

n150n300T3000p100p150p300cGalaxy 20 min Validated

The installer tt update runs for you, on its own terms: flags, container mode, the Tenstorrent package repository and signing key, and the tt-metalium containers. For specific versions, container-only installs and repairs.

Mix and Match Versions

n150n300T3000p100p150p300cGalaxy 10 min Validated

Where tt keeps its pinned tools, how they relate to a tt-metal you built, the cloud pod's venvs and a container, when each applies, and how to find the exact commits a release was tested with.

Twenty-and-Ten Things You Can Do with ttsim

n150n300T3000p100p150p300cGalaxySim 60 min Draft

32 things you can do with the ttsim hardware simulator — no Tenstorrent device required. Runs on any Linux machine, including WSL2 on Windows. Includes N300 and Blackhole two-chip mesh simulation (v1.10.1). Escalates from first kernel to DSP prototyping to a cliffhanger only real hardware can resolve.

ttsim QEMU Bridge: Full-System Simulation

Sim 20 min Draft

Architecture guide for the ttsim QEMU Bridge — a QEMU fork that presents a virtual Tenstorrent Wormhole PCI device to a Linux VM. Currently draft: two ttsim register stubs are missing before end-to-end ttnn.open_device() works via this path.

Monkeypatching TT-NN

n150n300T3000p100p150p300cGalaxy 25 min Validated

Change TT-NN / TT-Metalium behavior with the smallest possible trace and without forking tt-metal — add logging, work around a bug, tweak a default, or register a model, all while staying upgrade-safe. Built for TT-QuietBox 2, where ttnn is an installed package with no source tree — reached via the tt-metalium container, not a host-level install.

Connect Software

Custom Training

Understanding Custom Training

n150n300T3000p100p150p300cGalaxy 15 min Draft

Learn the fundamentals of custom training on Tenstorrent hardware. Understand the difference between fine-tuning and training from scratch, explore the tt-train framework, and discover when to use each approach for building specialized AI models.

Dataset Fundamentals

n150n300T3000p100p150p300cGalaxy 15 min Draft

Master dataset creation and validation for fine-tuning. Learn JSONL format, quality guidelines, tokenization concepts, and HuggingFace integration. Create high-quality training datasets that produce excellent model results.

Configuration Patterns

n150n300T3000p100p150p300cGalaxy 15 min Draft

Learn YAML-driven training configuration for tt-train: the model-config and training-config split, hyperparameters, device (mesh) configuration, checkpointing, and logging — grounded in the real nanogpt/nanollama configs train_nanogpt.py runs.

Fine-tuning Basics

n150n300T3000p100p150p300cGalaxy 25 min Validated

Run your first real tt-train job on Tenstorrent hardware: build a checkpoint with train_nanogpt.py, then continue training it with --resume — the load-weights-and-keep-going mechanic real fine-tuning uses. Real loss curves and generation samples captured on Blackhole p300c, with an honest account of what a 10M-parameter model actually outputs at this scale.

Multi-Device Training

n300T3000Galaxyp300c 15 min Validated

Verified multi-chip Data Parallel (DDP) training with tt-train — near-linear scaling to 4 Blackhole chips on a TT-QuietBox 2, the mesh graph descriptor fix that unlocks it, plus the documented pattern for n300, T3000, and Galaxy.

Experiment Tracking

n150n300T3000p100p150p300cGalaxy 15 min Draft

Master experiment tracking with file-based logging and Weights & Biases (WandB) integration. Compare hyperparameter variations, visualize training curves, and manage experiments professionally. Make data-driven training decisions.

Model Architecture Basics

n150n300T3000p100p150p300cGalaxy 20 min Draft

A concise tour of modern transformer components — RoPE, GQA, SwiGLU, RMSNorm — and how they map to tt-train's configuration fields. Build them by hand in the from-scratch arc.

Training from Scratch

n150n300T3000p100p150p300cGalaxy 30 min Validated

Configure, launch, monitor, checkpoint, and scale a from-scratch training job with ttml's train_nanogpt.py — the modern nanollama3_char config (RoPE/RMSNorm/SwiGLU/GQA), a real 3000-step loss curve on Blackhole p300c, and an honest look at what driving loss to 0.18 on a tiny corpus actually buys you.

Build on the Stack

Cookbook

CS Fundamentals

Module 1: RISC-V & Computer Architecture

n150n300T3000p100p150p300cGalaxy 30 min Draft

Von Neumann architecture, fetch-decode-execute cycle, and RISC-V fundamentals. Understand how 880 RISC-V processors work by mastering one.

Module 2: The Memory Hierarchy

n150n300T3000p100p150p300cGalaxySim 30 min Draft

Cache locality, bandwidth tradeoffs, and near-memory compute. Experience the memory hierarchy from registers to DRAM and understand why memory is the bottleneck in modern computing.

Module 3: Parallel Computing

n150n300T3000p100p150p300cGalaxySim 30 min Draft

Amdahl's Law, SPMD patterns, and data parallelism. Scale from 1 to 880 cores and understand when parallelism helps (and when it doesn't).

Module 4: Networks and Communication

n150n300T3000p100p150p300cGalaxySim 30 min Draft

Message passing, network topologies, and routing algorithms. Master the Network-on-Chip that connects 880 cores and understand distributed systems principles on a single chip.

Module 5: Synchronization

n150n300T3000p100p150p300cGalaxySim 30 min Draft

Race conditions, barriers, and coordination. Learn explicit synchronization on hardware without cache coherence and understand the challenges of concurrent programming at scale.

Module 6: Abstraction Layers

n150n300T3000p100p150p300cGalaxySim 30 min Draft

From Python to machine code. Understand the compilation pipeline, when abstractions help performance, and when they hurt. See the full stack from high-level frameworks to RISC-V silicon.

Module 7: Computational Complexity in Practice

n150n300T3000p100p150p300cGalaxySim 30 min Draft

Big-O meets real hardware. See why constants matter, how algorithm-hardware co-design achieves breakthrough performance, and why Flash Attention is "O(n)" in practice. The capstone that ties all modules together.

Module 8: Matrix Math and Matmul Labs

n150n300T3000p100p150p300cGalaxySim 45 min Draft

Learn matrix math on Tenstorrent by walking Lab 1/2/3 matmul progression: single-core tiles, multi-core work split, and multicast data reuse.

Applications

Llm From Scratch

Build an LLM from Scratch — Pick Your Altitude

n150n300T3000p100p150p300cGalaxySim 20 min Draft

Start an LLM from scratch, TT-native from line one. Meet the 32×32 tile, the reader→compute→writer pipeline, and the "pick your altitude" ladder — grounded for CUDA programmers.

Tokenizer & Data from Scratch

n150n300T3000p100p150p300cGalaxySim 30 min Draft

Build a BPE tokenizer and data pipeline from scratch, then see how a token sequence becomes tiled ttnn tensors on Tenstorrent hardware.

Embeddings & the Residual Stream

n150n300T3000p100p150p300cGalaxySim 30 min Draft

Build token embeddings and RoPE (rotary position embeddings), meet the residual stream, and write your first TT-Lang inception kernel live in the browser playground.

Attention from Scratch

n150n300T3000p100p150p300cGalaxySim 40 min Draft

Build grouped-query attention (GQA) with RoPE'd queries and keys, and author the TT-Lang attention/softmax inception kernel — the reader→compute→writer payoff.

The Transformer Block & the Model

n150n300T3000p100p150p300cGalaxySim 40 min Draft

Assemble SwiGLU, RMSNorm, and residuals into a full Llama-style transformer block, stack it into a nano model, and see TT-Lang kernels drop in as ttnn ops. Scale to 80M.

Train It & Run for Real

n150n300T3000p100p150p300cGalaxySim 45 min Draft

Write the training loop from scratch — cross-entropy, AdamW, backprop — then train your model for real on Blackhole with ttml. Verified on p300c.

Prove It's Right: Verifying a Model You Trained

n150n300T3000p100p150p300cGalaxySim 35 min Draft

"It loads" and "it generates fluent text" are not evidence of correctness. Five verification techniques — ln(vocab), held-out loss, resume continuity, ablation, independent reimplementation — with the measured numbers from a model that passed four checks and was still wrong.