Skip to content

Sharing Learn-nanoGPT: An Educational NanoGPT Version with Hardware-Adaptive Training for Shakespeare Text #631

@niloydebbarma-code

Description

@niloydebbarma-code

Hi Andrej and NanoGPT community,

I wanted to share a beginner-friendly NanoGPT fork called Learn-nanoGPT by niloydebbarma-code. It’s focused on Shakespeare character-level text generation and offers several practical features:

  1. Automatically detects whether you’re using a GPU or CPU and adjusts the model size and training parameters accordingly.

  2. Supports multiple tokenization methods, including character-level, BPE, and compressed formats.

  3. Provides clear documentation and robust error handling to help newcomers get started easily.

  4. Training times are significantly reduced compared to the original NanoGPT—about 15-20 minutes on an NVIDIA P100 GPU and approximately 1 to 1.5 hours on CPU for 1000 iterations.

  5. Includes Flash Attention support on GPU but works smoothly on CPU without extra configuration.

  6. Optimized for educational use and quick experimentation, making it ideal for those with limited hardware resources.

I believe this fork could be useful for the community, especially for users looking for a simpler, hardware-adaptive way to train GPT models on classic text datasets.

Thanks for the amazing work on NanoGPT.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions