Tenstorrent Lessons
Interactive guides for Tenstorrent hardware and software. Use the hardware filter to find lessons for your system.
Your First Inference
Modern Setup with TT-Installer 2.0
The fastest way to get started with Tenstorrent! Use TT-Installer 2.0 for one-command installation of the full stack including drivers, firmware, TT-Metalium containers, and Python environment.
Hardware Detection
Scan for connected Tenstorrent devices and verify they're properly recognized by the system.
Verify Your Setup
Check that your Tenstorrent hardware, TT-NN, and optional TT-Metalium source are ready before running your first model. A diagnostic checkpoint — returns you here after any setup work.
Download Model and Run Inference
Download Qwen3-0.6B (the recommended model — no license gate, works on all hardware) from Hugging Face to run AI workloads on your Tenstorrent hardware. Optionally download Llama-3.1-8B-Instruct for n300+ hardware.
Interactive Chat with Direct API
Build a custom chat application using TT-Metalium's Generator API directly.
HTTP API Server with Direct API
Create a production-ready Flask API with the model loaded in memory.
Build TT-Metalium from Source
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.
Serving & APIs
Production Inference with TT-Inference-Server
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
Deploy with vLLM - OpenAI-compatible APIs, continuous batching, and enterprise features.
Image Generation with Stable Diffusion XL
Generate high-resolution 1024x1024 images using Stable Diffusion XL Base running natively on your Tenstorrent hardware!
Video Generation via Frame-by-Frame Diffusion
Create videos by generating frames with Stable Diffusion on Tenstorrent hardware. Demonstrates hardware scaling from n150 to T3000 - same code, faster performance!
Applications
Coding Assistant with Aider
Run a real AI coding assistant (Aider) against your local Tenstorrent vLLM server. One install, one command — then pair-program with your own on-device LLM. Also covers prompt engineering to customize behavior.
Native Video Animation with AnimateDiff
Run Stable Diffusion 1.4 video generation on Blackhole hardware using the TT-NN UNet. Phase 3 injects the full AnimateDiff MotionAdapter at 7 UNet points — no distillation, weights loaded straight from HuggingFace. Fast path: 7.7 s/frame on p300c/TT-QuietBox 2.
OpenClaw AI Assistant on TT-QuietBox 2
Deploy a local AI assistant with Tenstorrent expertise, memory search, and 70B reasoning powered by your TT-QuietBox 2 hardware
Generating Video on TT-QuietBox 2
Go from a fresh TT-QuietBox 2 to AI-generated video clips in one session — Wan2.2-T2V-A14B on 4× Blackhole chips with a GTK4 GUI and automated prompt generation
Local AI Agents on TT-QuietBox 2
Build real AI agents in pure Python — web research, codebase navigation, multi-agent pipelines, and stateful text adventures — all running locally on your TT-QuietBox 2's 32B/70B models
Custom Training
Understanding Custom Training
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
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
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
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
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
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
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
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.
Cookbook
Tenstorrent Cookbook Overview
Welcome to the Tenstorrent Cookbook! Build 5 complete projects that teach fundamental TT-Metalium techniques: Conway's Game of Life, Audio Signal Processing, Mandelbrot Fractals, Image Filters, and Particle Life. Each recipe is a standalone lesson with full source code and visual output.
Recipe 1: Conway's Game of Life
Build Conway's Game of Life using TT-NN parallel tile computing. Learn convolution operations, cellular automata, and visual output generation. Includes classic patterns: gliders, blinkers, and the famous Gosper Glider Gun!
Recipe 2: Audio Signal Processing
Build a real-time audio processing pipeline with TT-NN. Compute mel-spectrograms, detect beats, extract pitch, and apply creative effects. Foundation for speech recognition models like Whisper!
Recipe 3: Mandelbrot Fractal Explorer
Render beautiful fractals with interactive zoom! Demonstrates GPU-style parallel computation and complex number operations. Perfect for understanding embarrassingly parallel workloads on TT hardware.
Recipe 4: Custom Image Filters
Build a library of creative image filters using 2D convolution. From edge detection to artistic effects - learn the techniques used in ResNet50, MobileNetV2, and ViT models!
Recipe 5: Particle Life Simulator
Simulate emergent complexity from simple particle interactions! Features N² force calculations, multi-species dynamics, and multi-device acceleration for TT-QuietBox systems. Beautiful chaos from simple physics!
Compilers & Frameworks
Image Classification with TT-Forge
Compile a PyTorch MobileNetV2 model for Tenstorrent hardware using forge.compile() — no build required. The forge env is pre-installed: one command to activate, then classify images on real TT silicon.
JAX and PyTorch/XLA on Tenstorrent
Run JAX and PyTorch/XLA computations directly on TT hardware — no install needed. venv-forge ships pjrt_plugin_tt, JAX 0.7.1, and torch-xla pre-installed. Activate, import, and start dispatching tensors to silicon.
Introduction to TT-Lang
Write your first TT-Lang kernel: a concurrent compute + data-movement program that runs on the Tensix grid. Try it live in the browser via ttlang-sim-lite.
CS Fundamentals
Module 1: RISC-V & Computer Architecture
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
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
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
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
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
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
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
Learn matrix math on Tenstorrent by walking Lab 1/2/3 matmul progression: single-core tiles, multi-core work split, and multicast data reuse.
Advanced
Bounty Program: Model Bring-Up
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.
Exploring TT-Metalium
Discover what's possible with TT-Metalium! Run TT-NN operations immediately, explore the model zoo, and understand the architecture that powers Tenstorrent hardware — from first script to custom kernels.
Twenty-and-Ten Things You Can Do with ttsim
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.8.4). Escalates from first kernel to DSP prototyping to a cliffhanger only real hardware can resolve.
ttsim QEMU Bridge: Full-System Simulation
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
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.
Deployment
Deploy TT-VSCode-Toolkit to Koyeb
Deploy your own cloud-based VSCode IDE with the Tenstorrent extension pre-installed. Run on Koyeb with optional n300 hardware access.
Deploy Your Work to Koyeb
Deploy any Python application to Koyeb with Tenstorrent n300 hardware access. Learn production deployment patterns with vLLM and adapt for any application.
Llm From Scratch
Build an LLM from Scratch — Pick Your Altitude
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
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
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
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
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
Write the training loop from scratch — cross-entropy, AdamW, backprop — then train your model for real on Blackhole with ttml. Verified on p300c.