Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

LLM Data Preprocessing This repository provides a comprehensive notebook for text tokenization techniques used in Large Language Models (LLMs). It explores different tokenization strategies, addresses handling unknown words, and demonstrates Byte Pair Encoding (BPE). The notebook further guides you through creating input-target pairs and implementing a PyTorch data loader for model training, including token and positional embeddings.

Features Text Tokenization:

Simple tokenizers Handling unknown words Byte Pair Encoding (BPE) Data Preparation:

Input-target pair creation for LLMs PyTorch DataLoader setup Embeddings:

Token embeddings Positional embeddings Getting Started Clone the repository:

bash git clone https://github.com/AnilKumarSingh9856/LLM_Data_Preprocessing.git cd LLM_Data_Preprocessing Open the notebook: Launch Jupyter Notebook or Jupyter Lab and open the provided notebook file.

Install dependencies: This project primarily uses Python and PyTorch. Install the requirements if needed:

bash pip install torch Usage Run the notebook cells step by step to explore tokenization methods, data preparation, and embedding implementation. Modify the code to suit your own datasets or LLM training objectives. Project Structure *.ipynb — Main Jupyter notebook(s) containing all code and explanations. Contributing Contributions are welcome! Feel free to open issues or submit pull requests.

License This project is licensed under the MIT License.

About

This notebook covers text tokenization for LLMs, exploring simple tokenizers, handling unknown words, and BPE. It demonstrates creating input-target pairs and implementing a PyTorch data loader for training, including token and positional embeddings.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages