diff --git a/setup/01_optional-python-setup-preferences/README.md b/setup/01_optional-python-setup-preferences/README.md index 4b3f425..6117fb7 100644 --- a/setup/01_optional-python-setup-preferences/README.md +++ b/setup/01_optional-python-setup-preferences/README.md @@ -15,7 +15,7 @@ There are several different ways you can install Python and set up your computin Download miniforge from the GitHub repository [here](https://github.com/conda-forge/miniforge). -download +download Depending on your operating system, this should download either an `.sh` (macOS, Linux) or `.exe` file (Windows). @@ -27,7 +27,7 @@ sh ~/Desktop/Miniforge3-MacOSX-arm64.sh where `Desktop/` is the folder where the Miniforge installer was downloaded to. On your computer, you may have to replace it with `Downloads/`. -miniforge-install +miniforge-install Next, step through the download instructions, confirming with "Enter". @@ -51,7 +51,7 @@ After the installation was successfully completed, I recommend creating a new vi conda create -n LLMs python=3.10 ``` -new-env +new-env > Many scientific computing libraries do not immediately support the newest version of Python. Therefore, when installing PyTorch, it's advisable to use a version of Python that is one or two releases older. For instance, if the latest version of Python is 3.13, using Python 3.10 or 3.11 is recommended. @@ -61,7 +61,7 @@ Next, activate your new virtual environment (you have to do it every time you op conda activate LLMs ``` -activate-env +activate-env

@@ -83,13 +83,13 @@ To install new Python libraries, you can now use the `conda` package installer. conda install jupyterlab watermark ``` -conda-install +conda-install You can also still use `pip` to install libraries. By default, `pip` should be linked to your new `LLms` conda environment: -check-pip +check-pip

@@ -106,7 +106,7 @@ However, since PyTorch is a comprehensive library featuring CPU- and GPU-compati It's also highly recommended to consult the installation guide menu on the official PyTorch website at [https://pytorch.org](https://pytorch.org). - + diff --git a/setup/01_optional-python-setup-preferences/figures/activate-env.png b/setup/01_optional-python-setup-preferences/figures/activate-env.png deleted file mode 100644 index ac8d210..0000000 Binary files a/setup/01_optional-python-setup-preferences/figures/activate-env.png and /dev/null differ diff --git a/setup/01_optional-python-setup-preferences/figures/check-pip.png b/setup/01_optional-python-setup-preferences/figures/check-pip.png deleted file mode 100644 index 9da213d..0000000 Binary files a/setup/01_optional-python-setup-preferences/figures/check-pip.png and /dev/null differ diff --git a/setup/01_optional-python-setup-preferences/figures/conda-install.png b/setup/01_optional-python-setup-preferences/figures/conda-install.png deleted file mode 100644 index a0c39ca..0000000 Binary files a/setup/01_optional-python-setup-preferences/figures/conda-install.png and /dev/null differ diff --git a/setup/01_optional-python-setup-preferences/figures/download.png b/setup/01_optional-python-setup-preferences/figures/download.png deleted file mode 100644 index 6c6b621..0000000 Binary files a/setup/01_optional-python-setup-preferences/figures/download.png and /dev/null differ diff --git a/setup/01_optional-python-setup-preferences/figures/miniforge-install.png b/setup/01_optional-python-setup-preferences/figures/miniforge-install.png deleted file mode 100644 index 8088a47..0000000 Binary files a/setup/01_optional-python-setup-preferences/figures/miniforge-install.png and /dev/null differ diff --git a/setup/01_optional-python-setup-preferences/figures/new-env.png b/setup/01_optional-python-setup-preferences/figures/new-env.png deleted file mode 100644 index a013c2b..0000000 Binary files a/setup/01_optional-python-setup-preferences/figures/new-env.png and /dev/null differ diff --git a/setup/01_optional-python-setup-preferences/figures/pytorch-installer.jpg b/setup/01_optional-python-setup-preferences/figures/pytorch-installer.jpg deleted file mode 100644 index 979200b..0000000 Binary files a/setup/01_optional-python-setup-preferences/figures/pytorch-installer.jpg and /dev/null differ diff --git a/setup/02_installing-python-libraries/README.md b/setup/02_installing-python-libraries/README.md index bed073f..f46b8ff 100644 --- a/setup/02_installing-python-libraries/README.md +++ b/setup/02_installing-python-libraries/README.md @@ -17,19 +17,19 @@ Then, after completing the installation, please check if all the packages are in python python_environment_check.py ``` - + It's also recommended to check the versions in JupyterLab by running the `jupyter_environment_check.ipynb` in this directory, which should ideally give you the same results as above. - + If you see the following issues, it's likely that your JupyterLab instance is connected to wrong conda environment: - + In this case, you may want to use `watermark` to check if you opened the JupyterLab instance in the right conda environment using the `--conda` flag: - +
@@ -48,7 +48,7 @@ However, since PyTorch is a comprehensive library featuring CPU- and GPU-compati It's also highly recommended to consult the installation guide menu on the official PyTorch website at [https://pytorch.org](https://pytorch.org). - + diff --git a/setup/02_installing-python-libraries/figures/check_1.jpg b/setup/02_installing-python-libraries/figures/check_1.jpg deleted file mode 100644 index 98e68e1..0000000 Binary files a/setup/02_installing-python-libraries/figures/check_1.jpg and /dev/null differ diff --git a/setup/02_installing-python-libraries/figures/check_2.jpg b/setup/02_installing-python-libraries/figures/check_2.jpg deleted file mode 100644 index 9b96746..0000000 Binary files a/setup/02_installing-python-libraries/figures/check_2.jpg and /dev/null differ diff --git a/setup/02_installing-python-libraries/figures/jupyter-issues.jpg b/setup/02_installing-python-libraries/figures/jupyter-issues.jpg deleted file mode 100644 index 5266a6a..0000000 Binary files a/setup/02_installing-python-libraries/figures/jupyter-issues.jpg and /dev/null differ diff --git a/setup/02_installing-python-libraries/figures/pytorch-installer.jpg b/setup/02_installing-python-libraries/figures/pytorch-installer.jpg deleted file mode 100644 index 979200b..0000000 Binary files a/setup/02_installing-python-libraries/figures/pytorch-installer.jpg and /dev/null differ diff --git a/setup/02_installing-python-libraries/figures/watermark.jpg b/setup/02_installing-python-libraries/figures/watermark.jpg deleted file mode 100644 index f110ad0..0000000 Binary files a/setup/02_installing-python-libraries/figures/watermark.jpg and /dev/null differ diff --git a/setup/README.md b/setup/README.md index 598f987..7d59cce 100644 --- a/setup/README.md +++ b/setup/README.md @@ -46,21 +46,41 @@ If you are using Visual Studio Code (VSCode) as your primary code editor, you ca   +## Using Lightning Studio + +For a smooth development experience in the cloud, I recommend the [Lightning AI Studio](https://lightning.ai/) platform, which allows users to set up a persistent environment and use both VSCode and Jupyter Lab on cloud CPUs and GPUs. + +Once you start a new Studio, you can open the terminal and execute the following setup steps to clone the repository and install the dependencies: + +```bash +git clone https://github.com/rasbt/LLMs-from-scratch.git +cd LLMs-from-scratch +pip install -r requirements.txt +``` + +(In contrast to Google Colab, these only need to be executed once since the Lightning AI Studion environments are persistent). + +Then, navigate to the Python script or Jupyter Notebook you want to run. Optionally, you can also easily connect a GPU to accelerate the code's runtime, for example, when you are pretraining the LLM in chapter 5 or finetuning it in chapters 6 and 7. + +1 + +  + ## Using Google Colab To use a Google Colab environment in the cloud, head over to [https://colab.research.google.com/](https://colab.research.google.com/) and open the respective chapter notebook from the GitHub menu or by dragging the notebook into the *Upload* field as shown in the figure below. -1 +1 Also make sure you upload the relevant files (dataset files and .py files the notebook is importing from) to the Colab environment as well, as shown below. -2 +2 You can optionally run the code on a GPU by changing the *Runtime* as illustrated in the figure below. -3 +3   diff --git a/setup/figures/1.webp b/setup/figures/1.webp deleted file mode 100644 index 202d0a7..0000000 Binary files a/setup/figures/1.webp and /dev/null differ diff --git a/setup/figures/2.webp b/setup/figures/2.webp deleted file mode 100644 index 5d27d5c..0000000 Binary files a/setup/figures/2.webp and /dev/null differ diff --git a/setup/figures/3.webp b/setup/figures/3.webp deleted file mode 100644 index c6c967d..0000000 Binary files a/setup/figures/3.webp and /dev/null differ