awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectAboutHow we rankPressMCP server
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
karpathy avatar

karpathy/nanoGPT

0
View on GitHub↗
59,730 stars·10,298 forks·Python·MIT·24 views

NanoGPT

nanoGPT is a lightweight engine for training and fine-tuning transformer-based language models from scratch. It provides a minimalist codebase designed for educational exploration and rapid experimentation with neural network architectures, utilizing self-attention and feed-forward layers to process sequences and predict subsequent elements.

The project distinguishes itself through a focus on high-speed data ingestion and hardware-accelerated performance. It includes a dedicated pipeline for transforming raw text into memory-mapped binary files, which enables efficient streaming during training. To maximize throughput, the system supports distributed data parallelism across multiple graphics processing units and employs just-in-time kernel compilation to optimize mathematical operations for specific hardware.

Beyond core training capabilities, the repository provides a command-line interface for generative text inference, allowing users to sample sequences from trained models using configurable parameters. It also includes integrated benchmarking tools to measure iteration speeds and identify hardware bottlenecks, ensuring efficient model development across various configurations.

Features

  • Transformer - Utilizes stacked self-attention and feed-forward layers to process sequences and capture long-range dependencies.
  • Generative Text Inference - Produces text outputs from trained models using configurable sampling parameters and prompt inputs.
  • Transformer Training Engines - Optimizes computational throughput for training and fine-tuning transformer-based language models from scratch.
  • Text Generation Runtimes - Exposes a command-line interface for sampling text sequences with adjustable generation settings.
  • Tensor Libraries - Executes high-dimensional array operations and mathematical functions essential for training deep neural networks.
  • Large Language Model Training Frameworks - Scales model training across single or multi-GPU environments using a minimalist, research-focused codebase.
  • Model Training Pipelines - Coordinates end-to-end workflows for training and fine-tuning models across various hardware accelerators.
  • Neural Network Research Tools - Serves as a minimalist, educational implementation of transformer architectures for rapid prototyping and research.
  • Data Preparation Tools - Transforms raw text datasets into structured binary formats suitable for machine learning ingestion.
  • Dataset Preprocessing Utilities - Converts raw text corpora into optimized binary formats to accelerate data ingestion during training.
  • Model Optimization - Refines training throughput and model efficiency through a minimalist, experimental architecture codebase.
  • Tokenizers - Decomposes raw text into numerical units using character-level tokenization for model ingestion.
  • Data Processing Pipelines - Orchestrates the conversion of raw text corpora into efficient binary formats for high-throughput training pipelines.
  • Data-Parallel Training - Distributes training workloads across multiple hardware units by synchronizing gradients to accelerate convergence.
  • Inference Generators - Generates text outputs from trained models using configurable sampling parameters like temperature and token limits.
  • Educational Resources - Active development rewrite of the original GPT implementation.
  • Large Language Models - Minimalist repository for training and fine-tuning GPT models.
  • General NLP - Listed in the “General NLP” section of the The Incredible Pytorch awesome list.
  • JIT Kernel Compilers - Compiles mathematical kernels at runtime to maximize hardware acceleration during training.
  • Binary Data Formats - Stores data in memory-mapped binary structures to facilitate rapid sequential access during training.

Star history

Star history chart for karpathy/nanogptStar history chart for karpathy/nanogpt

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Open-source alternatives to NanoGPT

Similar open-source projects, ranked by how many features they share with NanoGPT.
  • karpathy/mingptkarpathy avatar

    karpathy/minGPT

    23,639View on GitHub↗

    minGPT is a minimal implementation of the Transformer architecture designed for training and experimenting with language models. It functions as a neural network training framework and a text generation engine, providing the necessary tools to manage data loading, backpropagation, and parameter updates for custom deep learning models. The project is structured as an educational resource for understanding how transformer architectures function by building and training models from scratch. It utilizes a modular block architecture and transformer-based self-attention to process sequences, allowi

    Python
    View on GitHub↗23,639
  • pytorch/examplespytorch avatar

    pytorch/examples

    23,752View on GitHub↗

    This repository serves as a comprehensive collection of reference implementations for the PyTorch machine learning library. It provides practical examples for building, training, and deploying deep learning models, functioning as a toolkit for developers to explore neural network architectures and training workflows. The project distinguishes itself by offering concrete demonstrations of complex machine learning operations, ranging from computer vision tasks like object detection and depth estimation to the training of large-scale transformer models. These examples illustrate how to implement

    Python
    View on GitHub↗23,752
  • d2l-ai/d2l-zhd2l-ai avatar

    d2l-ai/d2l-zh

    78,493View on GitHub↗

    This project is an open-source, interactive educational platform designed to teach deep learning through a comprehensive, code-first curriculum. It provides a structured learning path that covers foundational mathematics, modern neural network architectures, and practical optimization techniques, enabling practitioners to master complex artificial intelligence concepts through hands-on experimentation. The platform distinguishes itself by integrating technical explanations with executable Jupyter notebooks. This design allows readers to modify code and hyperparameters in real-time, facilitati

    Pythonbookchinesecomputer-vision
    View on GitHub↗78,493
  • yuanzhoulvpi2017/zero_nlpyuanzhoulvpi2017 avatar

    yuanzhoulvpi2017/zero_nlp

    3,825View on GitHub↗

    zero_nlp is a distributed framework for training and fine-tuning large language models and multimodal architectures. It provides a specialized toolkit for distributed model parallelism, allowing neural network layers and weights to be partitioned across multiple GPU devices to train models that exceed the memory capacity of a single processor. The project distinguishes itself through a combination of high-throughput data pipelines and parameter-efficient tuning. It utilizes multi-threading and memory mapping to preprocess and stream datasets exceeding 100GB and implements memory-saving adapta

    Jupyter Notebookbertchatglm-6bclip
    View on GitHub↗3,825
See all 30 alternatives to NanoGPT→

Frequently asked questions

What does karpathy/nanogpt do?

nanoGPT is a lightweight engine for training and fine-tuning transformer-based language models from scratch. It provides a minimalist codebase designed for educational exploration and rapid experimentation with neural network architectures, utilizing self-attention and feed-forward layers to process sequences and predict subsequent elements.

What are the main features of karpathy/nanogpt?

The main features of karpathy/nanogpt are: Transformer, Generative Text Inference, Transformer Training Engines, Text Generation Runtimes, Tensor Libraries, Large Language Model Training Frameworks, Model Training Pipelines, Neural Network Research Tools.

What are some open-source alternatives to karpathy/nanogpt?

Open-source alternatives to karpathy/nanogpt include: karpathy/mingpt — minGPT is a minimal implementation of the Transformer architecture designed for training and experimenting with… pytorch/examples — This repository serves as a comprehensive collection of reference implementations for the PyTorch machine learning… d2l-ai/d2l-zh — This project is an open-source, interactive educational platform designed to teach deep learning through a… yuanzhoulvpi2017/zero_nlp — zero_nlp is a distributed framework for training and fine-tuning large language models and multimodal architectures.… meta-llama/llama — Llama is a computational framework and runtime environment designed for executing transformer-based neural networks… jzhang38/tinyllama — TinyLlama is a compact 1.1B parameter language model pretrained on a dataset of 3 trillion tokens. It is an edge AI…