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

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

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

karpathy/minGPT

0
View on GitHub↗
23,639 stars·3,115 forks·Python·mit·9 views

MinGPT

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, allowing users to define custom model configurations and execute the full training loop on their own datasets.

Beyond its core training capabilities, the library supports byte-pair-encoding for text processing and provides mechanisms for serializing model parameters. It includes functionality for extending training logic through custom callbacks and packaging models for distribution, facilitating both neural network prototyping and text generation inference.

Features

  • Attention Mechanisms - Implements transformer-based self-attention to capture long-range dependencies within input sequences.
  • Model Training Frameworks - Provides a framework for executing the training process of language models with custom hyperparameters.
  • Language Model Training - Facilitates the full training loop for transformer models to enable understanding of hyperparameter tuning.
  • Language Model Builders - Serves as an educational framework for constructing and training transformer-based language models from scratch.
  • Transformer Models - Allows construction and configuration of custom transformer architectures for training and inference.
  • Transformer Training Toolkits - Provides a complete toolkit for building and training transformer-based language models from scratch.
  • Generative Text Inference - Performs text generation by predicting subsequent tokens with a trained transformer model.
  • Neural Network Research Tools - Provides a minimalist implementation of neural architectures for educational study and rapid prototyping.
  • Neural Network Trainers - Manages the full training loop, including data loading, forward passes, and backpropagation for neural networks.
  • Educational Implementations - Offers a minimal, readable implementation of transformer architectures specifically for educational study and experimentation.
  • Autoregressive Models - Implements autoregressive generation by iteratively predicting the next token in a sequence based on previous outputs.
  • Sequence Learning Models - Models sequences using stacked self-attention layers to predict subsequent elements.
  • Text Generation Utilities - Generates coherent text sequences by predicting tokens from input prompts using trained models.
  • Byte Pair Encodings - Uses byte pair encoding to convert raw text into integer sequences for model processing.
  • Sequence Encoders - Encodes raw text into integer sequences using byte pair encoding for model input.
  • Model Serialization - Persists model parameters and configurations using state-dict serialization for deployment and loading.
  • Educational Resources - PyTorch implementation for training and inference of GPT models.
  • Large Language Models - PyTorch re-implementation of GPT training.
  • Open Source Models - Demonstrates a minimal implementation of transformer models.
  • General NLP - Listed in the “General NLP” section of the The Incredible Pytorch awesome list.
  • Data Encoding - Converts raw text data into numerical representations suitable for machine learning consumption.
  • Training Callbacks - Supports custom training callbacks to inject logging or evaluation logic into the training loop.
  • Modular Architecture - Organizes neural network layers into repeatable, modular blocks for flexible model scaling.
  • Backpropagation - Calculates gradients of loss functions to update model parameters during the training loop.
  • Optimization Algorithms - Provides gradient-based parameter update methods for training neural network models.

Star history

Star history chart for karpathy/mingptStar history chart for karpathy/mingpt

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 MinGPT

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

    karpathy/nanoGPT

    59,730View on GitHub↗

    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 traini

    Python
    View on GitHub↗59,730
  • tingsongyu/pytorch_tutorialTingsongYu avatar

    TingsongYu/PyTorch_Tutorial

    8,018View on GitHub↗

    This project is a comprehensive collection of educational examples and reference implementations for building vision and language models using PyTorch. It serves as a deep learning tutorial covering the end-to-end process of developing neural networks, from initial architecture definition to final production deployment. The repository provides detailed guides on implementing a wide range of domain-specific models, including convolutional neural networks for object detection and segmentation, as well as transformer and recurrent architectures for natural language processing. It emphasizes gene

    Python
    View on GitHub↗8,018
  • d2l-ai/d2l-end2l-ai avatar

    d2l-ai/d2l-en

    29,001View on GitHub↗

    This project is an educational platform and research toolkit designed to teach deep learning through a combination of mathematical theory, visual diagrams, and executable code. It provides a comprehensive environment for building, training, and evaluating neural networks, grounding complex concepts in interactive computational notebooks that allow for hands-on experimentation. The framework distinguishes itself by interleaving theoretical foundations—including linear algebra, calculus, and probability—with practical implementations across multiple industry-standard libraries. It supports flex

    Pythonbookcomputer-visiondata-science
    View on GitHub↗29,001
  • facebookresearch/fairseqfacebookresearch avatar

    facebookresearch/fairseq

    32,228View on GitHub↗

    Fairseq is a PyTorch toolkit for sequence-to-sequence modeling, specializing in neural machine translation, automatic speech recognition, and large-scale language model training. It provides a framework for processing and aligning diverse data sources, including text, audio, and video, to support tasks such as speech-to-text conversion and multimodal sequence learning. The project is distinguished by its distributed training capabilities, which utilize parameter sharding, mixed-precision training, and CPU offloading to handle models that exceed single-device memory. It also includes specializ

    Python
    View on GitHub↗32,228
See all 30 alternatives to MinGPT→

Frequently asked questions

What does karpathy/mingpt do?

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.

What are the main features of karpathy/mingpt?

The main features of karpathy/mingpt are: Attention Mechanisms, Model Training Frameworks, Language Model Training, Language Model Builders, Transformer Models, Transformer Training Toolkits, Generative Text Inference, Neural Network Research Tools.

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

Open-source alternatives to karpathy/mingpt include: karpathy/nanogpt — nanoGPT is a lightweight engine for training and fine-tuning transformer-based language models from scratch. It… tingsongyu/pytorch_tutorial — This project is a comprehensive collection of educational examples and reference implementations for building vision… d2l-ai/d2l-en — This project is an educational platform and research toolkit designed to teach deep learning through a combination of… facebookresearch/fairseq — Fairseq is a PyTorch toolkit for sequence-to-sequence modeling, specializing in neural machine translation, automatic… thudm/chatglm-6b — ChatGLM-6B is an open-source bilingual large language model designed for natural dialogue and text generation in both… huggingface/transformers — Transformers is a comprehensive library for machine learning that provides a unified interface for training,…