Skip to content

hk6an6/llm_quickstart

Repository files navigation

Exercises from a quickstart to large language models. There are 2 sections in this doc. First, prerequisites configure your development environment. Then, the chapters section has a link to a folder with with the relevant code for each chapter.

Pre requisites

Before you begin, install Xcode command line tools on your MAC:

After confirming you have xcode command line tools, get Conda:

  1. Setup Conda with miniforge https://github.com/conda-forge/miniforge#unix-like-platforms-mac-os--linux
  2. Create a Conda environment:
mkdir llm_quickstart
conda create -p ./env  
# activate the environment:
conda activate ./env
conda install pytorch-nightly::pytorch torchvision torchaudio -c pytorch-nightly
conda install matplotlib
conda install ipykernel
conda env config vars set PYTORCH_ENABLE_MPS_FALLBACK=1

If you made it this far, you have a working environment. Well done! From this point forward, you can use conda activate ./env whenever you are in the ‘llm_quickstart’ folder.

And if you don't yet have a code editor, like VSCode. You can use Jupyter notebooks within VSCode: https://code.visualstudio.com/docs/datascience/jupyter-notebooks

Finally, install hugging face:

conda install -c huggingface transformers
conda install sentence-transformers

Wrap up by creating a kernel for your jupyter notebooks: python -m ipykernel install --user --name=pytorch211.

Chapters

About

exercises from a quick start guide to large language models.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published