Skip to content

Brainstorm2605/SimpleGpt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

SimpleGPT: A PyTorch-Based GPT-Like Language Model

This repository contains a clear and well-structured implementation of a GPT-like language model built using PyTorch. You can easily understand how ChatGpt, Gemini, Grok and Claude 2 work Under the hood. It's designed for understanding the core concepts of transformer-based language modeling and provides a foundation for exploration and experimentation.

Key Features

Readability: The code prioritizes clarity and easy comprehension.

##Customization: Modify hyperparameters such as learning rate, context window size, and network architecture to explore their impact. ##Text Generation: Train the model to generate creative and coherent text samples. Foundation for Further Development: Use this codebase as a starting point for more advanced NLP projects or customizations. Project Structure

SimpleGpt.ipynb: Contains the main model code, including:

Data loading and preprocessing Transformer model architecture (multihead attention, feedforward layers, etc.) Training and text generation logic

Data Preparation:

Place your text dataset in a suitable location. Update the train_file and val_file paths in SimpleGpt.ipynb accordingly.

Training:

python SimpleGpt.ipynb Use code with caution. Customize hyperparameters within the code as needed.

Text Generation:

After training, use the generate function in SimpleGpt.ipynb to create new text samples.

Perplexity: Include the perplexity on your validation set.

Other Benchmarks: If you've calculated additional metrics, include them here.

Contributing We welcome contributions to improve SimpleGPT! Feel free to open pull requests or issues for bug fixes, enhancements, or suggestions.

About

SimpleGPT - GPT-like Language Model Implementation

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors