diff --git a/examples/language-modeling/gemma_tuning.ipynb b/examples/language-modeling/gemma_tuning.ipynb index fc7f4717..01469e55 100644 --- a/examples/language-modeling/gemma_tuning.ipynb +++ b/examples/language-modeling/gemma_tuning.ipynb @@ -42,12 +42,39 @@ " -- -L 8888:localhost:8888" ] }, + { + "cell_type": "markdown", + "id": "ba1788d9", + "metadata": {}, + "source": [ + "Once we have access to the TPU VM, we can setup a virtual Python environment to install our packages in:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "0e686d24", + "metadata": { + "vscode": { + "languageId": "shellscript" + } + }, + "outputs": [], + "source": [ + "# Install the venv package for Python 3.10(adapt for your version)\n", + "sudo apt-get install python3.10-venv\n", + "# Create the virtual environment\n", + "python -m venv optimum-tpu-env\n", + "# Activate the virtual environment\n", + "source optimum-tpu-env/bin/activate" + ] + }, { "cell_type": "markdown", "id": "79fda238", "metadata": {}, "source": [ - "Once we have access to the TPU VM, we can clone the `optimum-tpu` repository containing the related notebook. Then we can install few packages used in this tutorial and launch the notebook:" + "Next, we can clone the `optimum-tpu` repository containing the related notebook. Then we can install few packages used in this tutorial and launch the notebook:" ] }, { @@ -65,7 +92,7 @@ "# Install Optimum tpu\n", "pip install -e . -f https://storage.googleapis.com/libtpu-releases/index.html\n", "# Install TRL and PEFT for training (see later how they are used)\n", - "pip install trl peft\n", + "pip install trl==0.2.12 peft\n", "# Install Jupyter notebook\n", "pip install -U jupyterlab notebook\n", "# Optionally, install widgets extensions for better rendering\n",