This repo contains a summary from the Hugging Face NLP course.
The course teaches you about applying Transformers to various tasks in natural language processing and beyond. Along the way, you'll learn how to use the Hugging Face ecosystem — 🤗 Transformers, 🤗 Datasets, 🤗 Tokenizers, and 🤗 Accelerate — as well as the Hugging Face Hub.
The notebooks and notes within this repository use PyTorch.
For installing, execute the following command:
pip3 install torch torchvision torchaudio
pip install transformers[torch]
You can also just install the requirements.txt
files.
The Jupyter notebooks containing all the code from the course are hosted on the huggingface/notebooks
repo. If you wish to generate them locally, first install the required dependencies:
python -m pip install -r requirements.txt
Then run the following script:
python utils/generate_notebooks.py --output_dir nbs
If you use venv remember to install a new kernel into your jupyter lab/notebook:
python -m ipykernel install --user --name=nlp-course-venv
This script extracts all the code snippets from the chapters and stores them as notebooks in the nbs
folder.
The structure of this repo and README are inspired by the wonderful Advanced NLP with spaCy course and 🤗 NLP course.