A comprehensive learning repository containing Jupyter notebooks and Python scripts for mastering PyTorch and Hugging Face Transformers. This repository serves as a hands-on learning resource covering fundamental concepts to advanced techniques in deep learning and natural language processing.
Fundamental PyTorch concepts and operations:
tensors.ipynb- Introduction to PyTorch tensors, data types, and basic operationsderivatives.ipynb- Understanding automatic differentiation and gradientsdataset-dataloader.ipynb- Working with datasets and data loaders for efficient data handling
Hugging Face Transformers library fundamentals:
pipeline_module.ipynb- Using pre-built pipelines for common NLP taskstokenizer.ipynb- Text tokenization and preprocessingmodels.ipynb- Working with pre-trained modelsdatasets.ipynb- Loading and processing datasetstrainer_finetuning.ipynb- Fine-tuning models using the Trainer APIbehind_pipeline.ipynb- Understanding the internals of transformer pipelines
Complete sentiment analysis project:
sample_notebook/notebook.ipynb- Sample implementation and experimentationscripts/train.py- Training script for sentiment classification using DistilBERTscripts/eval.py- Evaluation script for model performance assessment
Advanced techniques for model optimization:
llm_quantizaton_inference.ipynb- Large Language Model quantization techniques for efficient inference
text_feature_exploration.ipynb- Text feature extraction and visualization techniquesword_embeddings_gensim_word2vec.ipynb- Word2Vec implementation using Gensim
- Python 3.8+
- CUDA-compatible GPU (recommended for some notebooks)
- Clone the repository:
git clone https://github.com/yourusername/ttPG.git
cd ttPG- Install dependencies:
pip install -r requirements.txttorch- PyTorch deep learning frameworktorchtext- Text processing utilitiestransformers- Hugging Face Transformers libraryaccelerate- Training acceleration utilitiesbitsandbytes- Quantization and optimizationeinops- Tensor operationssentence_transformers- Sentence embeddings
- PyTorch Learn the Basics - Official PyTorch tutorial covering tensors, datasets, neural networks, and complete ML workflows
- Hugging Face LLM Course - Comprehensive course on Large Language Models and NLP using the Hugging Face ecosystem
- PyTorch Documentation - Complete PyTorch API reference
- Hugging Face Transformers Documentation - Official Transformers library documentation
- Hugging Face Hub - Discover and share models, datasets, and demos
This project is open source and available under the MIT License.
- PyTorch team for the excellent deep learning framework
- Hugging Face for the comprehensive transformers library
- The open-source community for continuous inspiration and support