whatisgithub

What is examples?

karpathy/examples — explained in plain English

Analysis updated 2026-07-17 · repo last pushed 2018-05-15

138PythonAudience · researcherComplexity · 3/5DormantSetup · moderate

In one sentence

A curated collection of runnable PyTorch code examples for vision, text, and reinforcement learning tasks, built as a hands-on cookbook for learning machine learning by Andrej Karpathy.

Mindmap

mindmap
  root((examples))
    What it does
      Runnable ML examples
      Vision text and RL
      Beginner to advanced
    Tech stack
      Python
      PyTorch
    Use cases
      Learn ML by example
      Template for research
      Reference for AI features
    Audience
      ML beginners
      Researchers
      AI developers

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

Learn to build an image recognition model by running the handwritten digit recognition example.

USE CASE 2

Study a working language modeling or translation example to understand text-based deep learning.

USE CASE 3

Use the reinforcement learning pole-balancer example as a template for training a game-playing AI.

USE CASE 4

Reference stripped-down, production-style model code when adding AI features to an application.

What is it built with?

PythonPyTorch

How does it compare?

karpathy/examplesnvlabs/isaaclabeurekaorange2019220/relupruner
Stars138138139
LanguagePythonPythonPython
Last pushed2018-05-152025-10-28
MaintenanceDormantQuiet
Setup difficultymoderatemoderatemoderate
Complexity3/54/54/5
Audienceresearcherresearcherresearcher

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

How do you get it running?

Difficulty · moderate

Copy-paste prompts

Prompt 1
Walk me through the handwritten digit recognition example in this repo and explain what each part of the training loop does.
Prompt 2
Help me modify the image generation example in this repo to work with my own dataset instead of the default one.
Prompt 3
Explain how the reinforcement learning pole-balancer example trains its agent and what the reward signal is.
Prompt 4
Show me how to adapt the language modeling example here to train on a different text corpus.

Frequently asked questions

What is examples?

A curated collection of runnable PyTorch code examples for vision, text, and reinforcement learning tasks, built as a hands-on cookbook for learning machine learning by Andrej Karpathy.

What language is examples written in?

Mainly Python. The stack also includes Python, PyTorch.

Is examples actively maintained?

Dormant — no commits in 2+ years (last push 2018-05-15).

How hard is examples to set up?

Setup difficulty is rated moderate.

Who is examples for?

Mainly researcher.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.