{"cells":[{"cell_type":"code","execution_count":null,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"0ea8b46b-839b-445b-8043-ccdf4e920ace","showTitle":false,"title":""},"id":"KSWhkNUGHk6J","executionInfo":{"status":"ok","timestamp":1720332260278,"user_tz":-480,"elapsed":383,"user":{"displayName":"Inflaton Sng","userId":"00179918120580399412"}},"colab":{"base_uri":"https://localhost:8080/"},"outputId":"ea15f6c7-1576-4105-c509-39c5ef39f354"},"outputs":[{"output_type":"stream","name":"stdout","text":["The autoreload extension is already loaded. To reload it, use:\n"," %reload_ext autoreload\n"]}],"source":["%load_ext autoreload\n","%autoreload 2"]},{"cell_type":"code","source":["from google.colab import drive\n","drive.mount('/content/drive')"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"O1N25gePH3nR","executionInfo":{"status":"ok","timestamp":1720332262865,"user_tz":-480,"elapsed":2205,"user":{"displayName":"Inflaton Sng","userId":"00179918120580399412"}},"outputId":"0fe9afcf-3c3a-4f30-ead4-77b51ee995dc"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount(\"/content/drive\", force_remount=True).\n"]}]},{"cell_type":"code","source":["%%time\n","\n","%cd /content/\n","%rm -rf LLaMA-Factory\n","!git clone https://github.com/hiyouga/LLaMA-Factory.git\n","%cd LLaMA-Factory\n","%ls\n","!pip install -e .[torch,bitsandbytes]\n","# Installs Unsloth, Xformers (Flash Attention) and all other packages!\n","!pip install \"unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git\"\n","!pip install --no-deps xformers \"trl<0.9.0\" peft accelerate bitsandbytes"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"ExKl7VacH6Va","executionInfo":{"status":"ok","timestamp":1720332314403,"user_tz":-480,"elapsed":51543,"user":{"displayName":"Inflaton Sng","userId":"00179918120580399412"}},"outputId":"f79c3651-8c39-41da-b9ff-13f4a01ce4d7"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["/content\n","Cloning into 'LLaMA-Factory'...\n","remote: Enumerating objects: 15281, done.\u001b[K\n","remote: Counting objects: 100% (231/231), done.\u001b[K\n","remote: Compressing objects: 100% (97/97), done.\u001b[K\n","remote: Total 15281 (delta 141), reused 193 (delta 133), pack-reused 15050\u001b[K\n","Receiving objects: 100% (15281/15281), 221.47 MiB | 21.94 MiB/s, done.\n","Resolving deltas: 100% (11174/11174), done.\n","/content/LLaMA-Factory\n","\u001b[0m\u001b[01;34massets\u001b[0m/ \u001b[01;34mdocker\u001b[0m/ LICENSE pyproject.toml requirements.txt \u001b[01;34msrc\u001b[0m/\n","CITATION.cff \u001b[01;34mevaluation\u001b[0m/ Makefile README.md \u001b[01;34mscripts\u001b[0m/ \u001b[01;34mtests\u001b[0m/\n","\u001b[01;34mdata\u001b[0m/ \u001b[01;34mexamples\u001b[0m/ MANIFEST.in README_zh.md setup.py\n","Obtaining file:///content/LLaMA-Factory\n"," Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n"," Checking if build backend supports build_editable ... \u001b[?25l\u001b[?25hdone\n"," Getting requirements to build editable ... \u001b[?25l\u001b[?25hdone\n"," Preparing editable metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n","Requirement already satisfied: transformers>=4.41.2 in /usr/local/lib/python3.10/dist-packages (from llamafactory==0.8.3.dev0) (4.42.3)\n","Requirement already satisfied: datasets>=2.16.0 in /usr/local/lib/python3.10/dist-packages (from llamafactory==0.8.3.dev0) (2.20.0)\n","Requirement already satisfied: accelerate>=0.30.1 in /usr/local/lib/python3.10/dist-packages (from llamafactory==0.8.3.dev0) (0.32.1)\n","Requirement already satisfied: peft>=0.11.1 in /usr/local/lib/python3.10/dist-packages (from llamafactory==0.8.3.dev0) (0.11.1)\n","Requirement already satisfied: trl>=0.8.6 in /usr/local/lib/python3.10/dist-packages (from llamafactory==0.8.3.dev0) (0.8.6)\n","Requirement already satisfied: gradio>=4.0.0 in /usr/local/lib/python3.10/dist-packages (from llamafactory==0.8.3.dev0) (4.37.2)\n","Requirement already satisfied: pandas>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from llamafactory==0.8.3.dev0) (2.0.3)\n","Requirement already satisfied: scipy in /usr/local/lib/python3.10/dist-packages (from llamafactory==0.8.3.dev0) (1.11.4)\n","Requirement already satisfied: einops in /usr/local/lib/python3.10/dist-packages (from llamafactory==0.8.3.dev0) (0.8.0)\n","Requirement already satisfied: sentencepiece in /usr/local/lib/python3.10/dist-packages (from llamafactory==0.8.3.dev0) (0.2.0)\n","Requirement already satisfied: tiktoken in /usr/local/lib/python3.10/dist-packages (from llamafactory==0.8.3.dev0) (0.7.0)\n","Requirement already satisfied: protobuf in /usr/local/lib/python3.10/dist-packages (from llamafactory==0.8.3.dev0) (3.20.3)\n","Requirement already satisfied: uvicorn in /usr/local/lib/python3.10/dist-packages (from llamafactory==0.8.3.dev0) (0.30.1)\n","Requirement already satisfied: pydantic in /usr/local/lib/python3.10/dist-packages (from llamafactory==0.8.3.dev0) (2.8.0)\n","Requirement already satisfied: fastapi in /usr/local/lib/python3.10/dist-packages (from llamafactory==0.8.3.dev0) (0.111.0)\n","Requirement already satisfied: sse-starlette in /usr/local/lib/python3.10/dist-packages (from llamafactory==0.8.3.dev0) (2.1.2)\n","Requirement already satisfied: matplotlib>=3.7.0 in /usr/local/lib/python3.10/dist-packages (from llamafactory==0.8.3.dev0) (3.7.1)\n","Requirement already satisfied: fire in /usr/local/lib/python3.10/dist-packages (from llamafactory==0.8.3.dev0) (0.6.0)\n","Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from llamafactory==0.8.3.dev0) (24.1)\n","Requirement already satisfied: pyyaml in /usr/local/lib/python3.10/dist-packages (from llamafactory==0.8.3.dev0) (6.0.1)\n","Requirement already satisfied: numpy<2.0.0 in /usr/local/lib/python3.10/dist-packages (from llamafactory==0.8.3.dev0) (1.25.2)\n","Requirement already satisfied: bitsandbytes>=0.39.0 in /usr/local/lib/python3.10/dist-packages (from llamafactory==0.8.3.dev0) (0.43.1)\n","Requirement already satisfied: torch>=1.13.1 in /usr/local/lib/python3.10/dist-packages (from llamafactory==0.8.3.dev0) (2.3.0+cu121)\n","Requirement already satisfied: psutil in /usr/local/lib/python3.10/dist-packages (from accelerate>=0.30.1->llamafactory==0.8.3.dev0) (5.9.5)\n","Requirement already satisfied: huggingface-hub in /usr/local/lib/python3.10/dist-packages (from accelerate>=0.30.1->llamafactory==0.8.3.dev0) (0.23.2)\n","Requirement already satisfied: safetensors>=0.3.1 in /usr/local/lib/python3.10/dist-packages (from accelerate>=0.30.1->llamafactory==0.8.3.dev0) (0.4.3)\n","Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from datasets>=2.16.0->llamafactory==0.8.3.dev0) (3.15.4)\n","Requirement already satisfied: pyarrow>=15.0.0 in /usr/local/lib/python3.10/dist-packages (from datasets>=2.16.0->llamafactory==0.8.3.dev0) (16.1.0)\n","Requirement already satisfied: pyarrow-hotfix in /usr/local/lib/python3.10/dist-packages (from datasets>=2.16.0->llamafactory==0.8.3.dev0) (0.6)\n","Requirement already satisfied: dill<0.3.9,>=0.3.0 in /usr/local/lib/python3.10/dist-packages (from datasets>=2.16.0->llamafactory==0.8.3.dev0) (0.3.8)\n","Requirement already satisfied: requests>=2.32.2 in /usr/local/lib/python3.10/dist-packages (from datasets>=2.16.0->llamafactory==0.8.3.dev0) (2.32.3)\n","Requirement already satisfied: tqdm>=4.66.3 in /usr/local/lib/python3.10/dist-packages (from datasets>=2.16.0->llamafactory==0.8.3.dev0) (4.66.4)\n","Requirement already satisfied: xxhash in /usr/local/lib/python3.10/dist-packages (from datasets>=2.16.0->llamafactory==0.8.3.dev0) (3.4.1)\n","Requirement already satisfied: multiprocess in /usr/local/lib/python3.10/dist-packages (from datasets>=2.16.0->llamafactory==0.8.3.dev0) (0.70.16)\n","Requirement already satisfied: fsspec[http]<=2024.5.0,>=2023.1.0 in /usr/local/lib/python3.10/dist-packages (from datasets>=2.16.0->llamafactory==0.8.3.dev0) (2023.6.0)\n","Requirement already satisfied: aiohttp in /usr/local/lib/python3.10/dist-packages (from datasets>=2.16.0->llamafactory==0.8.3.dev0) (3.9.5)\n","Requirement already satisfied: aiofiles<24.0,>=22.0 in /usr/local/lib/python3.10/dist-packages (from gradio>=4.0.0->llamafactory==0.8.3.dev0) (23.2.1)\n","Requirement already satisfied: altair<6.0,>=4.2.0 in /usr/local/lib/python3.10/dist-packages (from gradio>=4.0.0->llamafactory==0.8.3.dev0) (4.2.2)\n","Requirement already satisfied: ffmpy in /usr/local/lib/python3.10/dist-packages (from gradio>=4.0.0->llamafactory==0.8.3.dev0) (0.3.2)\n","Requirement already satisfied: gradio-client==1.0.2 in /usr/local/lib/python3.10/dist-packages (from gradio>=4.0.0->llamafactory==0.8.3.dev0) (1.0.2)\n","Requirement already satisfied: httpx>=0.24.1 in /usr/local/lib/python3.10/dist-packages (from gradio>=4.0.0->llamafactory==0.8.3.dev0) (0.27.0)\n","Requirement already satisfied: importlib-resources<7.0,>=1.3 in /usr/local/lib/python3.10/dist-packages (from gradio>=4.0.0->llamafactory==0.8.3.dev0) (6.4.0)\n","Requirement already satisfied: jinja2<4.0 in /usr/local/lib/python3.10/dist-packages (from gradio>=4.0.0->llamafactory==0.8.3.dev0) (3.1.4)\n","Requirement already satisfied: markupsafe~=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio>=4.0.0->llamafactory==0.8.3.dev0) (2.1.5)\n","Requirement already satisfied: orjson~=3.0 in /usr/local/lib/python3.10/dist-packages (from gradio>=4.0.0->llamafactory==0.8.3.dev0) (3.10.6)\n","Requirement already satisfied: pillow<11.0,>=8.0 in /usr/local/lib/python3.10/dist-packages (from gradio>=4.0.0->llamafactory==0.8.3.dev0) (9.4.0)\n","Requirement already satisfied: pydub in /usr/local/lib/python3.10/dist-packages (from gradio>=4.0.0->llamafactory==0.8.3.dev0) (0.25.1)\n","Requirement already satisfied: python-multipart>=0.0.9 in /usr/local/lib/python3.10/dist-packages (from gradio>=4.0.0->llamafactory==0.8.3.dev0) (0.0.9)\n","Requirement already satisfied: ruff>=0.2.2 in /usr/local/lib/python3.10/dist-packages (from gradio>=4.0.0->llamafactory==0.8.3.dev0) (0.5.1)\n","Requirement already satisfied: semantic-version~=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio>=4.0.0->llamafactory==0.8.3.dev0) (2.10.0)\n","Requirement already satisfied: tomlkit==0.12.0 in /usr/local/lib/python3.10/dist-packages (from gradio>=4.0.0->llamafactory==0.8.3.dev0) (0.12.0)\n","Requirement already satisfied: typer<1.0,>=0.12 in /usr/local/lib/python3.10/dist-packages (from gradio>=4.0.0->llamafactory==0.8.3.dev0) (0.12.3)\n","Requirement already satisfied: typing-extensions~=4.0 in /usr/local/lib/python3.10/dist-packages (from gradio>=4.0.0->llamafactory==0.8.3.dev0) (4.12.2)\n","Requirement already satisfied: urllib3~=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio>=4.0.0->llamafactory==0.8.3.dev0) (2.0.7)\n","Requirement already satisfied: websockets<12.0,>=10.0 in /usr/local/lib/python3.10/dist-packages (from gradio-client==1.0.2->gradio>=4.0.0->llamafactory==0.8.3.dev0) (11.0.3)\n","Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.7.0->llamafactory==0.8.3.dev0) (1.2.1)\n","Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.7.0->llamafactory==0.8.3.dev0) (0.12.1)\n","Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.7.0->llamafactory==0.8.3.dev0) (4.53.0)\n","Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.7.0->llamafactory==0.8.3.dev0) (1.4.5)\n","Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.7.0->llamafactory==0.8.3.dev0) (3.1.2)\n","Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.7.0->llamafactory==0.8.3.dev0) (2.8.2)\n","Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas>=2.0.0->llamafactory==0.8.3.dev0) (2023.4)\n","Requirement already satisfied: tzdata>=2022.1 in /usr/local/lib/python3.10/dist-packages (from pandas>=2.0.0->llamafactory==0.8.3.dev0) (2024.1)\n","Requirement already satisfied: annotated-types>=0.4.0 in /usr/local/lib/python3.10/dist-packages (from pydantic->llamafactory==0.8.3.dev0) (0.7.0)\n","Requirement already satisfied: pydantic-core==2.20.0 in /usr/local/lib/python3.10/dist-packages (from pydantic->llamafactory==0.8.3.dev0) (2.20.0)\n","Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch>=1.13.1->llamafactory==0.8.3.dev0) (1.12.1)\n","Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch>=1.13.1->llamafactory==0.8.3.dev0) (3.3)\n","Requirement already satisfied: nvidia-cuda-nvrtc-cu12==12.1.105 in /usr/local/lib/python3.10/dist-packages (from torch>=1.13.1->llamafactory==0.8.3.dev0) (12.1.105)\n","Requirement already satisfied: nvidia-cuda-runtime-cu12==12.1.105 in /usr/local/lib/python3.10/dist-packages (from torch>=1.13.1->llamafactory==0.8.3.dev0) (12.1.105)\n","Requirement already satisfied: nvidia-cuda-cupti-cu12==12.1.105 in /usr/local/lib/python3.10/dist-packages (from torch>=1.13.1->llamafactory==0.8.3.dev0) (12.1.105)\n","Requirement already satisfied: nvidia-cudnn-cu12==8.9.2.26 in /usr/local/lib/python3.10/dist-packages (from torch>=1.13.1->llamafactory==0.8.3.dev0) (8.9.2.26)\n","Requirement already satisfied: nvidia-cublas-cu12==12.1.3.1 in /usr/local/lib/python3.10/dist-packages (from torch>=1.13.1->llamafactory==0.8.3.dev0) (12.1.3.1)\n","Requirement already satisfied: nvidia-cufft-cu12==11.0.2.54 in /usr/local/lib/python3.10/dist-packages (from torch>=1.13.1->llamafactory==0.8.3.dev0) (11.0.2.54)\n","Requirement already satisfied: nvidia-curand-cu12==10.3.2.106 in /usr/local/lib/python3.10/dist-packages (from torch>=1.13.1->llamafactory==0.8.3.dev0) (10.3.2.106)\n","Requirement already satisfied: nvidia-cusolver-cu12==11.4.5.107 in /usr/local/lib/python3.10/dist-packages (from torch>=1.13.1->llamafactory==0.8.3.dev0) (11.4.5.107)\n","Requirement already satisfied: nvidia-cusparse-cu12==12.1.0.106 in /usr/local/lib/python3.10/dist-packages (from torch>=1.13.1->llamafactory==0.8.3.dev0) (12.1.0.106)\n","Requirement already satisfied: nvidia-nccl-cu12==2.20.5 in /usr/local/lib/python3.10/dist-packages (from torch>=1.13.1->llamafactory==0.8.3.dev0) (2.20.5)\n","Requirement already satisfied: nvidia-nvtx-cu12==12.1.105 in /usr/local/lib/python3.10/dist-packages (from torch>=1.13.1->llamafactory==0.8.3.dev0) (12.1.105)\n","Requirement already satisfied: triton==2.3.0 in /usr/local/lib/python3.10/dist-packages (from torch>=1.13.1->llamafactory==0.8.3.dev0) (2.3.0)\n","Requirement already satisfied: nvidia-nvjitlink-cu12 in /usr/local/lib/python3.10/dist-packages (from nvidia-cusolver-cu12==11.4.5.107->torch>=1.13.1->llamafactory==0.8.3.dev0) (12.5.82)\n","Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.10/dist-packages (from transformers>=4.41.2->llamafactory==0.8.3.dev0) (2024.5.15)\n","Requirement already satisfied: tokenizers<0.20,>=0.19 in /usr/local/lib/python3.10/dist-packages (from transformers>=4.41.2->llamafactory==0.8.3.dev0) (0.19.1)\n","Requirement already satisfied: tyro>=0.5.11 in /usr/local/lib/python3.10/dist-packages (from trl>=0.8.6->llamafactory==0.8.3.dev0) (0.8.5)\n","Requirement already satisfied: click>=7.0 in /usr/local/lib/python3.10/dist-packages (from uvicorn->llamafactory==0.8.3.dev0) (8.1.7)\n","Requirement already satisfied: h11>=0.8 in /usr/local/lib/python3.10/dist-packages (from uvicorn->llamafactory==0.8.3.dev0) (0.14.0)\n","Requirement already satisfied: starlette<0.38.0,>=0.37.2 in /usr/local/lib/python3.10/dist-packages (from fastapi->llamafactory==0.8.3.dev0) (0.37.2)\n","Requirement already satisfied: fastapi-cli>=0.0.2 in /usr/local/lib/python3.10/dist-packages (from fastapi->llamafactory==0.8.3.dev0) (0.0.4)\n","Requirement already satisfied: ujson!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0,>=4.0.1 in /usr/local/lib/python3.10/dist-packages (from fastapi->llamafactory==0.8.3.dev0) (5.10.0)\n","Requirement already satisfied: email_validator>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from fastapi->llamafactory==0.8.3.dev0) (2.2.0)\n","Requirement already satisfied: six in /usr/local/lib/python3.10/dist-packages (from fire->llamafactory==0.8.3.dev0) (1.16.0)\n","Requirement already satisfied: termcolor in /usr/local/lib/python3.10/dist-packages (from fire->llamafactory==0.8.3.dev0) (2.4.0)\n","Requirement already satisfied: anyio in /usr/local/lib/python3.10/dist-packages (from sse-starlette->llamafactory==0.8.3.dev0) (3.7.1)\n","Requirement already satisfied: entrypoints in /usr/local/lib/python3.10/dist-packages (from altair<6.0,>=4.2.0->gradio>=4.0.0->llamafactory==0.8.3.dev0) (0.4)\n","Requirement already satisfied: jsonschema>=3.0 in /usr/local/lib/python3.10/dist-packages (from altair<6.0,>=4.2.0->gradio>=4.0.0->llamafactory==0.8.3.dev0) (4.19.2)\n","Requirement already satisfied: toolz in /usr/local/lib/python3.10/dist-packages (from altair<6.0,>=4.2.0->gradio>=4.0.0->llamafactory==0.8.3.dev0) (0.12.1)\n","Requirement already satisfied: dnspython>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from email_validator>=2.0.0->fastapi->llamafactory==0.8.3.dev0) (2.6.1)\n","Requirement already satisfied: idna>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from email_validator>=2.0.0->fastapi->llamafactory==0.8.3.dev0) (3.7)\n","Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.16.0->llamafactory==0.8.3.dev0) (1.3.1)\n","Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.16.0->llamafactory==0.8.3.dev0) (23.2.0)\n","Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.16.0->llamafactory==0.8.3.dev0) (1.4.1)\n","Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.16.0->llamafactory==0.8.3.dev0) (6.0.5)\n","Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.16.0->llamafactory==0.8.3.dev0) (1.9.4)\n","Requirement already satisfied: async-timeout<5.0,>=4.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.16.0->llamafactory==0.8.3.dev0) (4.0.3)\n","Requirement already satisfied: certifi in /usr/local/lib/python3.10/dist-packages (from httpx>=0.24.1->gradio>=4.0.0->llamafactory==0.8.3.dev0) (2024.6.2)\n","Requirement already satisfied: httpcore==1.* in /usr/local/lib/python3.10/dist-packages (from httpx>=0.24.1->gradio>=4.0.0->llamafactory==0.8.3.dev0) (1.0.5)\n","Requirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from httpx>=0.24.1->gradio>=4.0.0->llamafactory==0.8.3.dev0) (1.3.1)\n","Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.32.2->datasets>=2.16.0->llamafactory==0.8.3.dev0) (3.3.2)\n","Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from anyio->sse-starlette->llamafactory==0.8.3.dev0) (1.2.1)\n","Requirement already satisfied: shellingham>=1.3.0 in /usr/local/lib/python3.10/dist-packages (from typer<1.0,>=0.12->gradio>=4.0.0->llamafactory==0.8.3.dev0) (1.5.4)\n","Requirement already satisfied: rich>=10.11.0 in /usr/local/lib/python3.10/dist-packages (from typer<1.0,>=0.12->gradio>=4.0.0->llamafactory==0.8.3.dev0) (13.7.1)\n","Requirement already satisfied: docstring-parser>=0.16 in /usr/local/lib/python3.10/dist-packages (from tyro>=0.5.11->trl>=0.8.6->llamafactory==0.8.3.dev0) (0.16)\n","Requirement already satisfied: shtab>=1.5.6 in /usr/local/lib/python3.10/dist-packages (from tyro>=0.5.11->trl>=0.8.6->llamafactory==0.8.3.dev0) (1.7.1)\n","Requirement already satisfied: httptools>=0.5.0 in /usr/local/lib/python3.10/dist-packages (from uvicorn->llamafactory==0.8.3.dev0) (0.6.1)\n","Requirement already satisfied: python-dotenv>=0.13 in /usr/local/lib/python3.10/dist-packages (from uvicorn->llamafactory==0.8.3.dev0) (1.0.1)\n","Requirement already satisfied: uvloop!=0.15.0,!=0.15.1,>=0.14.0 in /usr/local/lib/python3.10/dist-packages (from uvicorn->llamafactory==0.8.3.dev0) (0.19.0)\n","Requirement already satisfied: watchfiles>=0.13 in /usr/local/lib/python3.10/dist-packages (from uvicorn->llamafactory==0.8.3.dev0) (0.22.0)\n","Requirement already satisfied: mpmath<1.4.0,>=1.1.0 in /usr/local/lib/python3.10/dist-packages (from sympy->torch>=1.13.1->llamafactory==0.8.3.dev0) (1.3.0)\n","Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio>=4.0.0->llamafactory==0.8.3.dev0) (2023.12.1)\n","Requirement already satisfied: referencing>=0.28.4 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio>=4.0.0->llamafactory==0.8.3.dev0) (0.35.1)\n","Requirement already satisfied: rpds-py>=0.7.1 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio>=4.0.0->llamafactory==0.8.3.dev0) (0.18.1)\n","Requirement already satisfied: markdown-it-py>=2.2.0 in /usr/local/lib/python3.10/dist-packages (from rich>=10.11.0->typer<1.0,>=0.12->gradio>=4.0.0->llamafactory==0.8.3.dev0) (3.0.0)\n","Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /usr/local/lib/python3.10/dist-packages (from rich>=10.11.0->typer<1.0,>=0.12->gradio>=4.0.0->llamafactory==0.8.3.dev0) (2.16.1)\n","Requirement already satisfied: mdurl~=0.1 in /usr/local/lib/python3.10/dist-packages (from markdown-it-py>=2.2.0->rich>=10.11.0->typer<1.0,>=0.12->gradio>=4.0.0->llamafactory==0.8.3.dev0) (0.1.2)\n","Building wheels for collected packages: llamafactory\n"," Building editable for llamafactory (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n"," Created wheel for llamafactory: filename=llamafactory-0.8.3.dev0-0.editable-py3-none-any.whl size=20620 sha256=ec4ac2b08a779b1082ab8e94afec9d218edce39f821ded590395db332f428540\n"," Stored in directory: /tmp/pip-ephem-wheel-cache-jjuu6qjk/wheels/de/aa/c5/27b5682c5592b7c0eecc3e208f176dedf6b11a61cf2a910b85\n","Successfully built llamafactory\n","Installing collected packages: llamafactory\n"," Attempting uninstall: llamafactory\n"," Found existing installation: llamafactory 0.8.3.dev0\n"," Uninstalling llamafactory-0.8.3.dev0:\n"," Successfully uninstalled llamafactory-0.8.3.dev0\n","Successfully installed llamafactory-0.8.3.dev0\n","Collecting unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git\n"," Cloning https://github.com/unslothai/unsloth.git to /tmp/pip-install-jzawbter/unsloth_20c4f4de0f45451bb5ddb4eb2bc50756\n"," Running command git clone --filter=blob:none --quiet https://github.com/unslothai/unsloth.git /tmp/pip-install-jzawbter/unsloth_20c4f4de0f45451bb5ddb4eb2bc50756\n"," Resolved https://github.com/unslothai/unsloth.git to commit 28e9de27d7f16b25ab72eef2bcf29c16f05a905a\n"," Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n"," Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n"," Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n","Requirement already satisfied: tyro in /usr/local/lib/python3.10/dist-packages (from unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (0.8.5)\n","Requirement already satisfied: transformers>=4.42.3 in /usr/local/lib/python3.10/dist-packages (from unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (4.42.3)\n","Requirement already satisfied: datasets>=2.16.0 in /usr/local/lib/python3.10/dist-packages (from unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (2.20.0)\n","Requirement already satisfied: sentencepiece>=0.2.0 in /usr/local/lib/python3.10/dist-packages (from unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (0.2.0)\n","Requirement already satisfied: tqdm in /usr/local/lib/python3.10/dist-packages (from unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (4.66.4)\n","Requirement already satisfied: psutil in /usr/local/lib/python3.10/dist-packages (from unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (5.9.5)\n","Requirement already satisfied: wheel>=0.42.0 in /usr/local/lib/python3.10/dist-packages (from unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (0.43.0)\n","Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (1.25.2)\n","Requirement already satisfied: protobuf<4.0.0 in /usr/local/lib/python3.10/dist-packages (from unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (3.20.3)\n","Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from datasets>=2.16.0->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (3.15.4)\n","Requirement already satisfied: pyarrow>=15.0.0 in /usr/local/lib/python3.10/dist-packages (from datasets>=2.16.0->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (16.1.0)\n","Requirement already satisfied: pyarrow-hotfix in /usr/local/lib/python3.10/dist-packages (from datasets>=2.16.0->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (0.6)\n","Requirement already satisfied: dill<0.3.9,>=0.3.0 in /usr/local/lib/python3.10/dist-packages (from datasets>=2.16.0->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (0.3.8)\n","Requirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from datasets>=2.16.0->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (2.0.3)\n","Requirement already satisfied: requests>=2.32.2 in /usr/local/lib/python3.10/dist-packages (from datasets>=2.16.0->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (2.32.3)\n","Requirement already satisfied: xxhash in /usr/local/lib/python3.10/dist-packages (from datasets>=2.16.0->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (3.4.1)\n","Requirement already satisfied: multiprocess in /usr/local/lib/python3.10/dist-packages (from datasets>=2.16.0->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (0.70.16)\n","Requirement already satisfied: fsspec[http]<=2024.5.0,>=2023.1.0 in /usr/local/lib/python3.10/dist-packages (from datasets>=2.16.0->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (2023.6.0)\n","Requirement already satisfied: aiohttp in /usr/local/lib/python3.10/dist-packages (from datasets>=2.16.0->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (3.9.5)\n","Requirement already satisfied: huggingface-hub>=0.21.2 in /usr/local/lib/python3.10/dist-packages (from datasets>=2.16.0->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (0.23.2)\n","Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from datasets>=2.16.0->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (24.1)\n","Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from datasets>=2.16.0->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (6.0.1)\n","Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.10/dist-packages (from transformers>=4.42.3->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (2024.5.15)\n","Requirement already satisfied: safetensors>=0.4.1 in /usr/local/lib/python3.10/dist-packages (from transformers>=4.42.3->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (0.4.3)\n","Requirement already satisfied: tokenizers<0.20,>=0.19 in /usr/local/lib/python3.10/dist-packages (from transformers>=4.42.3->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (0.19.1)\n","Requirement already satisfied: docstring-parser>=0.16 in /usr/local/lib/python3.10/dist-packages (from tyro->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (0.16)\n","Requirement already satisfied: typing-extensions>=4.7.0 in /usr/local/lib/python3.10/dist-packages (from tyro->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (4.12.2)\n","Requirement already satisfied: rich>=11.1.0 in /usr/local/lib/python3.10/dist-packages (from tyro->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (13.7.1)\n","Requirement already satisfied: shtab>=1.5.6 in /usr/local/lib/python3.10/dist-packages (from tyro->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (1.7.1)\n","Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.16.0->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (1.3.1)\n","Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.16.0->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (23.2.0)\n","Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.16.0->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (1.4.1)\n","Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.16.0->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (6.0.5)\n","Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.16.0->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (1.9.4)\n","Requirement already satisfied: async-timeout<5.0,>=4.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.16.0->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (4.0.3)\n","Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.32.2->datasets>=2.16.0->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (3.3.2)\n","Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.32.2->datasets>=2.16.0->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (3.7)\n","Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests>=2.32.2->datasets>=2.16.0->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (2.0.7)\n","Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.32.2->datasets>=2.16.0->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (2024.6.2)\n","Requirement already satisfied: markdown-it-py>=2.2.0 in /usr/local/lib/python3.10/dist-packages (from rich>=11.1.0->tyro->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (3.0.0)\n","Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /usr/local/lib/python3.10/dist-packages (from rich>=11.1.0->tyro->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (2.16.1)\n","Requirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets>=2.16.0->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (2.8.2)\n","Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets>=2.16.0->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (2023.4)\n","Requirement already satisfied: tzdata>=2022.1 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets>=2.16.0->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (2024.1)\n","Requirement already satisfied: mdurl~=0.1 in /usr/local/lib/python3.10/dist-packages (from markdown-it-py>=2.2.0->rich>=11.1.0->tyro->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (0.1.2)\n","Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.8.2->pandas->datasets>=2.16.0->unsloth[colab-new]@ git+https://github.com/unslothai/unsloth.git) (1.16.0)\n","Requirement already satisfied: xformers in /usr/local/lib/python3.10/dist-packages (0.0.26.post1)\n","Requirement already satisfied: trl<0.9.0 in /usr/local/lib/python3.10/dist-packages (0.8.6)\n","Requirement already satisfied: peft in /usr/local/lib/python3.10/dist-packages (0.11.1)\n","Requirement already satisfied: accelerate in /usr/local/lib/python3.10/dist-packages (0.32.1)\n","Requirement already satisfied: bitsandbytes in /usr/local/lib/python3.10/dist-packages (0.43.1)\n","CPU times: user 390 ms, sys: 55.2 ms, total: 445 ms\n","Wall time: 51.3 s\n"]}]},{"cell_type":"code","execution_count":null,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"6d394937-6c99-4a7c-9d32-7600a280032f","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"id":"aVAhR0LPHk6J","executionInfo":{"status":"ok","timestamp":1720332314405,"user_tz":-480,"elapsed":33,"user":{"displayName":"Inflaton Sng","userId":"00179918120580399412"}},"outputId":"b08b7ad0-b458-4657-a371-797b0c14769e"},"outputs":[{"output_type":"stream","name":"stdout","text":["workding dir: /content/drive/MyDrive/logical-reasoning/\n"]}],"source":["import os\n","import sys\n","from pathlib import Path\n","\n","workding_dir = \"/content/drive/MyDrive/logical-reasoning/\"\n","os.chdir(workding_dir)\n","sys.path.append(workding_dir)\n","print(\"workding dir:\", workding_dir)"]},{"cell_type":"code","execution_count":null,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"ac667aba-076e-4de6-9984-8f6a67cb09cd","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"id":"pQYZ1k-4Hk6J","executionInfo":{"status":"ok","timestamp":1720332314405,"user_tz":-480,"elapsed":21,"user":{"displayName":"Inflaton Sng","userId":"00179918120580399412"}},"outputId":"dbdf3fea-fece-444f-a5c0-b1f1a1281795"},"outputs":[{"output_type":"execute_result","data":{"text/plain":["True"]},"metadata":{},"execution_count":18}],"source":["need_to_setup_env = True\n","need_to_setup_env"]},{"cell_type":"code","execution_count":null,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"72f9cf79-7b0d-4d9e-90a0-1fa5251b947f","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"id":"Ant0nzR8Hk6J","executionInfo":{"status":"ok","timestamp":1720332325864,"user_tz":-480,"elapsed":11474,"user":{"displayName":"Inflaton Sng","userId":"00179918120580399412"}},"outputId":"fd465a01-4223-44d7-dabd-6e12fd9c9cf9"},"outputs":[{"output_type":"stream","name":"stdout","text":["Requirement already satisfied: huggingface_hub==0.23.2 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 1)) (0.23.2)\n","Requirement already satisfied: nltk==3.8.1 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 2)) (3.8.1)\n","Requirement already satisfied: python-dotenv==1.0.1 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 3)) (1.0.1)\n","Requirement already satisfied: black==24.4.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 4)) (24.4.0)\n","Requirement already satisfied: evaluate==0.4.2 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 5)) (0.4.2)\n","Requirement already satisfied: rouge_score==0.1.2 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 6)) (0.1.2)\n","Requirement already satisfied: pytest==8.2.1 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 7)) (8.2.1)\n","Requirement already satisfied: seaborn==0.13.2 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 8)) (0.13.2)\n","Requirement already satisfied: scikit-learn==1.5.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 9)) (1.5.0)\n","Requirement already satisfied: jupyter in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 10)) (1.0.0)\n","Requirement already satisfied: ipywidgets in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 11)) (7.7.1)\n","Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 12)) (24.1)\n","Requirement already satisfied: langchain_openai==0.1.13 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 13)) (0.1.13)\n","Requirement already satisfied: wandb==0.17.4 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 14)) (0.17.4)\n","Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface_hub==0.23.2->-r requirements.txt (line 1)) (3.15.4)\n","Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub==0.23.2->-r requirements.txt (line 1)) (2023.6.0)\n","Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub==0.23.2->-r requirements.txt (line 1)) (6.0.1)\n","Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from huggingface_hub==0.23.2->-r requirements.txt (line 1)) (2.32.3)\n","Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub==0.23.2->-r requirements.txt (line 1)) (4.66.4)\n","Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub==0.23.2->-r requirements.txt (line 1)) (4.12.2)\n","Requirement already satisfied: click in /usr/local/lib/python3.10/dist-packages (from nltk==3.8.1->-r requirements.txt (line 2)) (8.1.7)\n","Requirement already satisfied: joblib in /usr/local/lib/python3.10/dist-packages (from nltk==3.8.1->-r requirements.txt (line 2)) (1.4.2)\n","Requirement already satisfied: regex>=2021.8.3 in /usr/local/lib/python3.10/dist-packages (from nltk==3.8.1->-r requirements.txt (line 2)) (2024.5.15)\n","Requirement already satisfied: mypy-extensions>=0.4.3 in /usr/local/lib/python3.10/dist-packages (from black==24.4.0->-r requirements.txt (line 4)) (1.0.0)\n","Requirement already satisfied: pathspec>=0.9.0 in /usr/local/lib/python3.10/dist-packages (from black==24.4.0->-r requirements.txt (line 4)) (0.12.1)\n","Requirement already satisfied: platformdirs>=2 in /usr/local/lib/python3.10/dist-packages (from black==24.4.0->-r requirements.txt (line 4)) (4.2.2)\n","Requirement already satisfied: tomli>=1.1.0 in /usr/local/lib/python3.10/dist-packages (from black==24.4.0->-r requirements.txt (line 4)) (2.0.1)\n","Requirement already satisfied: datasets>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from evaluate==0.4.2->-r requirements.txt (line 5)) (2.20.0)\n","Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from evaluate==0.4.2->-r requirements.txt (line 5)) (1.25.2)\n","Requirement already satisfied: dill in /usr/local/lib/python3.10/dist-packages (from evaluate==0.4.2->-r requirements.txt (line 5)) (0.3.8)\n","Requirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from evaluate==0.4.2->-r requirements.txt (line 5)) (2.0.3)\n","Requirement already satisfied: xxhash in /usr/local/lib/python3.10/dist-packages (from evaluate==0.4.2->-r requirements.txt (line 5)) (3.4.1)\n","Requirement already satisfied: multiprocess in /usr/local/lib/python3.10/dist-packages (from evaluate==0.4.2->-r requirements.txt (line 5)) (0.70.16)\n","Requirement already satisfied: absl-py in /usr/local/lib/python3.10/dist-packages (from rouge_score==0.1.2->-r requirements.txt (line 6)) (1.4.0)\n","Requirement already satisfied: six>=1.14.0 in /usr/local/lib/python3.10/dist-packages (from rouge_score==0.1.2->-r requirements.txt (line 6)) (1.16.0)\n","Requirement already satisfied: iniconfig in /usr/local/lib/python3.10/dist-packages (from pytest==8.2.1->-r requirements.txt (line 7)) (2.0.0)\n","Requirement already satisfied: pluggy<2.0,>=1.5 in /usr/local/lib/python3.10/dist-packages (from pytest==8.2.1->-r requirements.txt (line 7)) (1.5.0)\n","Requirement already satisfied: exceptiongroup>=1.0.0rc8 in /usr/local/lib/python3.10/dist-packages (from pytest==8.2.1->-r requirements.txt (line 7)) (1.2.1)\n","Requirement already satisfied: matplotlib!=3.6.1,>=3.4 in /usr/local/lib/python3.10/dist-packages (from seaborn==0.13.2->-r requirements.txt (line 8)) (3.7.1)\n","Requirement already satisfied: scipy>=1.6.0 in /usr/local/lib/python3.10/dist-packages (from scikit-learn==1.5.0->-r requirements.txt (line 9)) (1.11.4)\n","Requirement already satisfied: threadpoolctl>=3.1.0 in /usr/local/lib/python3.10/dist-packages (from scikit-learn==1.5.0->-r requirements.txt (line 9)) (3.5.0)\n","Requirement already satisfied: langchain-core<0.3,>=0.2.2 in /usr/local/lib/python3.10/dist-packages (from langchain_openai==0.1.13->-r requirements.txt (line 13)) (0.2.11)\n","Requirement already satisfied: openai<2.0.0,>=1.32.0 in /usr/local/lib/python3.10/dist-packages (from langchain_openai==0.1.13->-r requirements.txt (line 13)) (1.35.10)\n","Requirement already satisfied: tiktoken<1,>=0.7 in /usr/local/lib/python3.10/dist-packages (from langchain_openai==0.1.13->-r requirements.txt (line 13)) (0.7.0)\n","Requirement already satisfied: docker-pycreds>=0.4.0 in /usr/local/lib/python3.10/dist-packages (from wandb==0.17.4->-r requirements.txt (line 14)) (0.4.0)\n","Requirement already satisfied: gitpython!=3.1.29,>=1.0.0 in /usr/local/lib/python3.10/dist-packages (from wandb==0.17.4->-r requirements.txt (line 14)) (3.1.43)\n","Requirement already satisfied: protobuf!=4.21.0,<6,>=3.19.0 in /usr/local/lib/python3.10/dist-packages (from wandb==0.17.4->-r requirements.txt (line 14)) (3.20.3)\n","Requirement already satisfied: psutil>=5.0.0 in /usr/local/lib/python3.10/dist-packages (from wandb==0.17.4->-r requirements.txt (line 14)) (5.9.5)\n","Requirement already satisfied: sentry-sdk>=1.0.0 in /usr/local/lib/python3.10/dist-packages (from wandb==0.17.4->-r requirements.txt (line 14)) (2.7.1)\n","Requirement already satisfied: setproctitle in /usr/local/lib/python3.10/dist-packages (from wandb==0.17.4->-r requirements.txt (line 14)) (1.3.3)\n","Requirement already satisfied: setuptools in /usr/local/lib/python3.10/dist-packages (from wandb==0.17.4->-r requirements.txt (line 14)) (67.7.2)\n","Requirement already satisfied: notebook in /usr/local/lib/python3.10/dist-packages (from jupyter->-r requirements.txt (line 10)) (6.5.5)\n","Requirement already satisfied: qtconsole in /usr/local/lib/python3.10/dist-packages (from jupyter->-r requirements.txt (line 10)) (5.5.2)\n","Requirement already satisfied: jupyter-console in /usr/local/lib/python3.10/dist-packages (from jupyter->-r requirements.txt (line 10)) (6.1.0)\n","Requirement already satisfied: nbconvert in /usr/local/lib/python3.10/dist-packages (from jupyter->-r requirements.txt (line 10)) (6.5.4)\n","Requirement already satisfied: ipykernel in /usr/local/lib/python3.10/dist-packages (from jupyter->-r requirements.txt (line 10)) (5.5.6)\n","Requirement already satisfied: ipython-genutils~=0.2.0 in /usr/local/lib/python3.10/dist-packages (from ipywidgets->-r requirements.txt (line 11)) (0.2.0)\n","Requirement already satisfied: traitlets>=4.3.1 in /usr/local/lib/python3.10/dist-packages (from ipywidgets->-r requirements.txt (line 11)) (5.7.1)\n","Requirement already satisfied: widgetsnbextension~=3.6.0 in /usr/local/lib/python3.10/dist-packages (from ipywidgets->-r requirements.txt (line 11)) (3.6.6)\n","Requirement already satisfied: ipython>=4.0.0 in /usr/local/lib/python3.10/dist-packages (from ipywidgets->-r requirements.txt (line 11)) (7.34.0)\n","Requirement already satisfied: jupyterlab-widgets>=1.0.0 in /usr/local/lib/python3.10/dist-packages (from ipywidgets->-r requirements.txt (line 11)) (3.0.11)\n","Requirement already satisfied: pyarrow>=15.0.0 in /usr/local/lib/python3.10/dist-packages (from datasets>=2.0.0->evaluate==0.4.2->-r requirements.txt (line 5)) (16.1.0)\n","Requirement already satisfied: pyarrow-hotfix in /usr/local/lib/python3.10/dist-packages (from datasets>=2.0.0->evaluate==0.4.2->-r requirements.txt (line 5)) (0.6)\n","Requirement already satisfied: aiohttp in /usr/local/lib/python3.10/dist-packages (from datasets>=2.0.0->evaluate==0.4.2->-r requirements.txt (line 5)) (3.9.5)\n","Requirement already satisfied: gitdb<5,>=4.0.1 in /usr/local/lib/python3.10/dist-packages (from gitpython!=3.1.29,>=1.0.0->wandb==0.17.4->-r requirements.txt (line 14)) (4.0.11)\n","Requirement already satisfied: jupyter-client in /usr/local/lib/python3.10/dist-packages (from ipykernel->jupyter->-r requirements.txt (line 10)) (6.1.12)\n","Requirement already satisfied: tornado>=4.2 in /usr/local/lib/python3.10/dist-packages (from ipykernel->jupyter->-r requirements.txt (line 10)) (6.3.3)\n","Requirement already satisfied: jedi>=0.16 in /usr/local/lib/python3.10/dist-packages (from ipython>=4.0.0->ipywidgets->-r requirements.txt (line 11)) (0.19.1)\n","Requirement already satisfied: decorator in /usr/local/lib/python3.10/dist-packages (from ipython>=4.0.0->ipywidgets->-r requirements.txt (line 11)) (4.4.2)\n","Requirement already satisfied: pickleshare in /usr/local/lib/python3.10/dist-packages (from ipython>=4.0.0->ipywidgets->-r requirements.txt (line 11)) (0.7.5)\n","Requirement already satisfied: prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from ipython>=4.0.0->ipywidgets->-r requirements.txt (line 11)) (3.0.47)\n","Requirement already satisfied: pygments in /usr/local/lib/python3.10/dist-packages (from ipython>=4.0.0->ipywidgets->-r requirements.txt (line 11)) (2.16.1)\n","Requirement already satisfied: backcall in /usr/local/lib/python3.10/dist-packages (from ipython>=4.0.0->ipywidgets->-r requirements.txt (line 11)) (0.2.0)\n","Requirement already satisfied: matplotlib-inline in /usr/local/lib/python3.10/dist-packages (from ipython>=4.0.0->ipywidgets->-r requirements.txt (line 11)) (0.1.7)\n","Requirement already satisfied: pexpect>4.3 in /usr/local/lib/python3.10/dist-packages (from ipython>=4.0.0->ipywidgets->-r requirements.txt (line 11)) (4.9.0)\n","Requirement already satisfied: jsonpatch<2.0,>=1.33 in /usr/local/lib/python3.10/dist-packages (from langchain-core<0.3,>=0.2.2->langchain_openai==0.1.13->-r requirements.txt (line 13)) (1.33)\n","Requirement already satisfied: langsmith<0.2.0,>=0.1.75 in /usr/local/lib/python3.10/dist-packages (from langchain-core<0.3,>=0.2.2->langchain_openai==0.1.13->-r requirements.txt (line 13)) (0.1.83)\n","Requirement already satisfied: pydantic<3,>=1 in /usr/local/lib/python3.10/dist-packages (from langchain-core<0.3,>=0.2.2->langchain_openai==0.1.13->-r requirements.txt (line 13)) (2.8.0)\n","Requirement already satisfied: tenacity!=8.4.0,<9.0.0,>=8.1.0 in /usr/local/lib/python3.10/dist-packages (from langchain-core<0.3,>=0.2.2->langchain_openai==0.1.13->-r requirements.txt (line 13)) (8.4.2)\n","Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib!=3.6.1,>=3.4->seaborn==0.13.2->-r requirements.txt (line 8)) (1.2.1)\n","Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib!=3.6.1,>=3.4->seaborn==0.13.2->-r requirements.txt (line 8)) (0.12.1)\n","Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib!=3.6.1,>=3.4->seaborn==0.13.2->-r requirements.txt (line 8)) (4.53.0)\n","Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib!=3.6.1,>=3.4->seaborn==0.13.2->-r requirements.txt (line 8)) (1.4.5)\n","Requirement already satisfied: pillow>=6.2.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib!=3.6.1,>=3.4->seaborn==0.13.2->-r requirements.txt (line 8)) (9.4.0)\n","Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib!=3.6.1,>=3.4->seaborn==0.13.2->-r requirements.txt (line 8)) (3.1.2)\n","Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.10/dist-packages (from matplotlib!=3.6.1,>=3.4->seaborn==0.13.2->-r requirements.txt (line 8)) (2.8.2)\n","Requirement already satisfied: anyio<5,>=3.5.0 in /usr/local/lib/python3.10/dist-packages (from openai<2.0.0,>=1.32.0->langchain_openai==0.1.13->-r requirements.txt (line 13)) (3.7.1)\n","Requirement already satisfied: distro<2,>=1.7.0 in /usr/lib/python3/dist-packages (from openai<2.0.0,>=1.32.0->langchain_openai==0.1.13->-r requirements.txt (line 13)) (1.7.0)\n","Requirement already satisfied: httpx<1,>=0.23.0 in /usr/local/lib/python3.10/dist-packages (from openai<2.0.0,>=1.32.0->langchain_openai==0.1.13->-r requirements.txt (line 13)) (0.27.0)\n","Requirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from openai<2.0.0,>=1.32.0->langchain_openai==0.1.13->-r requirements.txt (line 13)) (1.3.1)\n","Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas->evaluate==0.4.2->-r requirements.txt (line 5)) (2023.4)\n","Requirement already satisfied: tzdata>=2022.1 in /usr/local/lib/python3.10/dist-packages (from pandas->evaluate==0.4.2->-r requirements.txt (line 5)) (2024.1)\n","Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub==0.23.2->-r requirements.txt (line 1)) (3.3.2)\n","Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub==0.23.2->-r requirements.txt (line 1)) (3.7)\n","Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub==0.23.2->-r requirements.txt (line 1)) (2.0.7)\n","Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub==0.23.2->-r requirements.txt (line 1)) (2024.6.2)\n","Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from notebook->jupyter->-r requirements.txt (line 10)) (3.1.4)\n","Requirement already satisfied: pyzmq<25,>=17 in /usr/local/lib/python3.10/dist-packages (from notebook->jupyter->-r requirements.txt (line 10)) (24.0.1)\n","Requirement already satisfied: argon2-cffi in /usr/local/lib/python3.10/dist-packages (from notebook->jupyter->-r requirements.txt (line 10)) (23.1.0)\n","Requirement already satisfied: jupyter-core>=4.6.1 in /usr/local/lib/python3.10/dist-packages (from notebook->jupyter->-r requirements.txt (line 10)) (5.7.2)\n","Requirement already satisfied: nbformat in /usr/local/lib/python3.10/dist-packages (from notebook->jupyter->-r requirements.txt (line 10)) (5.10.4)\n","Requirement already satisfied: nest-asyncio>=1.5 in /usr/local/lib/python3.10/dist-packages (from notebook->jupyter->-r requirements.txt (line 10)) (1.6.0)\n","Requirement already satisfied: Send2Trash>=1.8.0 in /usr/local/lib/python3.10/dist-packages (from notebook->jupyter->-r requirements.txt (line 10)) (1.8.3)\n","Requirement already satisfied: terminado>=0.8.3 in /usr/local/lib/python3.10/dist-packages (from notebook->jupyter->-r requirements.txt (line 10)) (0.18.1)\n","Requirement already satisfied: prometheus-client in /usr/local/lib/python3.10/dist-packages (from notebook->jupyter->-r requirements.txt (line 10)) (0.20.0)\n","Requirement already satisfied: nbclassic>=0.4.7 in /usr/local/lib/python3.10/dist-packages (from notebook->jupyter->-r requirements.txt (line 10)) (1.1.0)\n","Requirement already satisfied: lxml in /usr/local/lib/python3.10/dist-packages (from nbconvert->jupyter->-r requirements.txt (line 10)) (4.9.4)\n","Requirement already satisfied: beautifulsoup4 in /usr/local/lib/python3.10/dist-packages (from nbconvert->jupyter->-r requirements.txt (line 10)) (4.12.3)\n","Requirement already satisfied: bleach in /usr/local/lib/python3.10/dist-packages (from nbconvert->jupyter->-r requirements.txt (line 10)) (6.1.0)\n","Requirement already satisfied: defusedxml in /usr/local/lib/python3.10/dist-packages (from nbconvert->jupyter->-r requirements.txt (line 10)) (0.7.1)\n","Requirement already satisfied: entrypoints>=0.2.2 in /usr/local/lib/python3.10/dist-packages (from nbconvert->jupyter->-r requirements.txt (line 10)) (0.4)\n","Requirement already satisfied: jupyterlab-pygments in /usr/local/lib/python3.10/dist-packages (from nbconvert->jupyter->-r requirements.txt (line 10)) (0.3.0)\n","Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from nbconvert->jupyter->-r requirements.txt (line 10)) (2.1.5)\n","Requirement already satisfied: mistune<2,>=0.8.1 in /usr/local/lib/python3.10/dist-packages (from nbconvert->jupyter->-r requirements.txt (line 10)) (0.8.4)\n","Requirement already satisfied: nbclient>=0.5.0 in /usr/local/lib/python3.10/dist-packages (from nbconvert->jupyter->-r requirements.txt (line 10)) (0.10.0)\n","Requirement already satisfied: pandocfilters>=1.4.1 in /usr/local/lib/python3.10/dist-packages (from nbconvert->jupyter->-r requirements.txt (line 10)) (1.5.1)\n","Requirement already satisfied: tinycss2 in /usr/local/lib/python3.10/dist-packages (from nbconvert->jupyter->-r requirements.txt (line 10)) (1.3.0)\n","Requirement already satisfied: qtpy>=2.4.0 in /usr/local/lib/python3.10/dist-packages (from qtconsole->jupyter->-r requirements.txt (line 10)) (2.4.1)\n","Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.0.0->evaluate==0.4.2->-r requirements.txt (line 5)) (1.3.1)\n","Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.0.0->evaluate==0.4.2->-r requirements.txt (line 5)) (23.2.0)\n","Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.0.0->evaluate==0.4.2->-r requirements.txt (line 5)) (1.4.1)\n","Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.0.0->evaluate==0.4.2->-r requirements.txt (line 5)) (6.0.5)\n","Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.0.0->evaluate==0.4.2->-r requirements.txt (line 5)) (1.9.4)\n","Requirement already satisfied: async-timeout<5.0,>=4.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.0.0->evaluate==0.4.2->-r requirements.txt (line 5)) (4.0.3)\n","Requirement already satisfied: smmap<6,>=3.0.1 in /usr/local/lib/python3.10/dist-packages (from gitdb<5,>=4.0.1->gitpython!=3.1.29,>=1.0.0->wandb==0.17.4->-r requirements.txt (line 14)) (5.0.1)\n","Requirement already satisfied: httpcore==1.* in /usr/local/lib/python3.10/dist-packages (from httpx<1,>=0.23.0->openai<2.0.0,>=1.32.0->langchain_openai==0.1.13->-r requirements.txt (line 13)) (1.0.5)\n","Requirement already satisfied: h11<0.15,>=0.13 in /usr/local/lib/python3.10/dist-packages (from httpcore==1.*->httpx<1,>=0.23.0->openai<2.0.0,>=1.32.0->langchain_openai==0.1.13->-r requirements.txt (line 13)) (0.14.0)\n","Requirement already satisfied: parso<0.9.0,>=0.8.3 in /usr/local/lib/python3.10/dist-packages (from jedi>=0.16->ipython>=4.0.0->ipywidgets->-r requirements.txt (line 11)) (0.8.4)\n","Requirement already satisfied: jsonpointer>=1.9 in /usr/local/lib/python3.10/dist-packages (from jsonpatch<2.0,>=1.33->langchain-core<0.3,>=0.2.2->langchain_openai==0.1.13->-r requirements.txt (line 13)) (3.0.0)\n","Requirement already satisfied: orjson<4.0.0,>=3.9.14 in /usr/local/lib/python3.10/dist-packages (from langsmith<0.2.0,>=0.1.75->langchain-core<0.3,>=0.2.2->langchain_openai==0.1.13->-r requirements.txt (line 13)) (3.10.6)\n","Requirement already satisfied: notebook-shim>=0.2.3 in /usr/local/lib/python3.10/dist-packages (from nbclassic>=0.4.7->notebook->jupyter->-r requirements.txt (line 10)) (0.2.4)\n","Requirement already satisfied: fastjsonschema>=2.15 in /usr/local/lib/python3.10/dist-packages (from nbformat->notebook->jupyter->-r requirements.txt (line 10)) (2.20.0)\n","Requirement already satisfied: jsonschema>=2.6 in /usr/local/lib/python3.10/dist-packages (from nbformat->notebook->jupyter->-r requirements.txt (line 10)) (4.19.2)\n","Requirement already satisfied: ptyprocess>=0.5 in /usr/local/lib/python3.10/dist-packages (from pexpect>4.3->ipython>=4.0.0->ipywidgets->-r requirements.txt (line 11)) (0.7.0)\n","Requirement already satisfied: wcwidth in /usr/local/lib/python3.10/dist-packages (from prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->ipython>=4.0.0->ipywidgets->-r requirements.txt (line 11)) (0.2.13)\n","Requirement already satisfied: annotated-types>=0.4.0 in /usr/local/lib/python3.10/dist-packages (from pydantic<3,>=1->langchain-core<0.3,>=0.2.2->langchain_openai==0.1.13->-r requirements.txt (line 13)) (0.7.0)\n","Requirement already satisfied: pydantic-core==2.20.0 in /usr/local/lib/python3.10/dist-packages (from pydantic<3,>=1->langchain-core<0.3,>=0.2.2->langchain_openai==0.1.13->-r requirements.txt (line 13)) (2.20.0)\n","Requirement already satisfied: argon2-cffi-bindings in /usr/local/lib/python3.10/dist-packages (from argon2-cffi->notebook->jupyter->-r requirements.txt (line 10)) (21.2.0)\n","Requirement already satisfied: soupsieve>1.2 in /usr/local/lib/python3.10/dist-packages (from beautifulsoup4->nbconvert->jupyter->-r requirements.txt (line 10)) (2.5)\n","Requirement already satisfied: webencodings in /usr/local/lib/python3.10/dist-packages (from bleach->nbconvert->jupyter->-r requirements.txt (line 10)) (0.5.1)\n","Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=2.6->nbformat->notebook->jupyter->-r requirements.txt (line 10)) (2023.12.1)\n","Requirement already satisfied: referencing>=0.28.4 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=2.6->nbformat->notebook->jupyter->-r requirements.txt (line 10)) (0.35.1)\n","Requirement already satisfied: rpds-py>=0.7.1 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=2.6->nbformat->notebook->jupyter->-r requirements.txt (line 10)) (0.18.1)\n","Requirement already satisfied: jupyter-server<3,>=1.8 in /usr/local/lib/python3.10/dist-packages (from notebook-shim>=0.2.3->nbclassic>=0.4.7->notebook->jupyter->-r requirements.txt (line 10)) (1.24.0)\n","Requirement already satisfied: cffi>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from argon2-cffi-bindings->argon2-cffi->notebook->jupyter->-r requirements.txt (line 10)) (1.16.0)\n","Requirement already satisfied: pycparser in /usr/local/lib/python3.10/dist-packages (from cffi>=1.0.1->argon2-cffi-bindings->argon2-cffi->notebook->jupyter->-r requirements.txt (line 10)) (2.22)\n","Requirement already satisfied: websocket-client in /usr/local/lib/python3.10/dist-packages (from jupyter-server<3,>=1.8->notebook-shim>=0.2.3->nbclassic>=0.4.7->notebook->jupyter->-r requirements.txt (line 10)) (1.8.0)\n"]}],"source":["if need_to_setup_env:\n"," %pip install -r requirements.txt"]},{"cell_type":"code","execution_count":null,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"9f67ec60-2f24-411c-84eb-0dd664b44775","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"id":"p2eN5kdRHk6J","executionInfo":{"status":"ok","timestamp":1720332325865,"user_tz":-480,"elapsed":11,"user":{"displayName":"Inflaton Sng","userId":"00179918120580399412"}},"outputId":"afd5675c-88fc-4b75-c361-db90bf4f31f2"},"outputs":[{"output_type":"stream","name":"stdout","text":["loading env vars from: /content/drive/.shortcut-targets-by-id/1E09lTnfbsjtTgQg65dQ3y9D2R6l8waxR/logical-reasoning/.env\n"]},{"output_type":"execute_result","data":{"text/plain":["True"]},"metadata":{},"execution_count":20}],"source":["from dotenv import find_dotenv, load_dotenv\n","\n","found_dotenv = find_dotenv(\".env\")\n","\n","if len(found_dotenv) == 0:\n"," found_dotenv = find_dotenv(\".env.example\")\n","print(f\"loading env vars from: {found_dotenv}\")\n","load_dotenv(found_dotenv, override=True)"]},{"cell_type":"code","execution_count":null,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"f1597656-8042-4878-9d3b-9ebfb8dd86dc","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"id":"i_5wPar_Hk6J","executionInfo":{"status":"ok","timestamp":1720332325865,"user_tz":-480,"elapsed":9,"user":{"displayName":"Inflaton Sng","userId":"00179918120580399412"}},"outputId":"1fc6bd53-e7a8-4088-badd-1476b36412ad"},"outputs":[{"output_type":"execute_result","data":{"text/plain":["('Qwen2/Qwen2-7B-Instruct',\n"," True,\n"," None,\n"," None,\n"," 2048,\n"," 6,\n"," None,\n"," 'datasets/mgtv',\n"," 'results/mgtv-results_colab.csv',\n"," None,\n"," None)"]},"metadata":{},"execution_count":21}],"source":["import os\n","\n","model_name = os.getenv(\"MODEL_NAME\")\n","token = os.getenv(\"HF_TOKEN\") or None\n","load_in_4bit = os.getenv(\"LOAD_IN_4BIT\") == \"true\"\n","local_model = os.getenv(\"LOCAL_MODEL\")\n","hub_model = os.getenv(\"HUB_MODEL\")\n","num_train_epochs = int(os.getenv(\"NUM_TRAIN_EPOCHS\") or 0)\n","data_path = os.getenv(\"LOGICAL_REASONING_DATA_PATH\")\n","results_path = os.getenv(\"LOGICAL_REASONING_RESULTS_PATH\")\n","\n","max_seq_length = 2048 # Choose any! We auto support RoPE Scaling internally!\n","dtype = (\n"," None # None for auto detection. Float16 for Tesla T4, V100, Bfloat16 for Ampere+\n",")\n","\n","model_name, load_in_4bit, local_model, hub_model, max_seq_length, num_train_epochs, dtype, data_path, results_path, os.getenv(\"DISABLE_MLFLOW_INTEGRATION\"), os.getenv(\"WANDB_DISABLED\")"]},{"cell_type":"code","execution_count":null,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"e3ab54ba-7b6d-4817-bf2e-c5d711508b58","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"id":"O9IDI1OsHk6J","executionInfo":{"status":"ok","timestamp":1720332325865,"user_tz":-480,"elapsed":8,"user":{"displayName":"Inflaton Sng","userId":"00179918120580399412"}},"outputId":"e4c9172e-0f9b-4da6-b76b-3b40a3ce1f78"},"outputs":[{"output_type":"stream","name":"stdout","text":["Sun Jul 7 06:05:25 2024 \n","+---------------------------------------------------------------------------------------+\n","| NVIDIA-SMI 535.104.05 Driver Version: 535.104.05 CUDA Version: 12.2 |\n","|-----------------------------------------+----------------------+----------------------+\n","| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |\n","| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |\n","| | | MIG M. |\n","|=========================================+======================+======================|\n","| 0 Tesla T4 Off | 00000000:00:04.0 Off | 0 |\n","| N/A 46C P8 9W / 70W | 0MiB / 15360MiB | 0% Default |\n","| | | N/A |\n","+-----------------------------------------+----------------------+----------------------+\n"," \n","+---------------------------------------------------------------------------------------+\n","| Processes: |\n","| GPU GI CI PID Type Process name GPU Memory |\n","| ID ID Usage |\n","|=======================================================================================|\n","| No running processes found |\n","+---------------------------------------------------------------------------------------+\n"]}],"source":["!nvidia-smi"]},{"cell_type":"code","execution_count":null,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"b2a43943-9324-4839-9a47-cfa72de2244b","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"id":"hSMhuoKFHk6J","executionInfo":{"status":"ok","timestamp":1720332326783,"user_tz":-480,"elapsed":924,"user":{"displayName":"Inflaton Sng","userId":"00179918120580399412"}},"outputId":"d09f254b-dd65-4a13-8107-533d1d61eeb4"},"outputs":[{"output_type":"stream","name":"stdout","text":["Python 3.10.12\n","\u001b[33mWARNING: Package(s) not found: flash-attn\u001b[0m\u001b[33m\n","\u001b[0mCPU times: user 11.4 ms, sys: 2.65 ms, total: 14 ms\n","Wall time: 711 ms\n"]}],"source":["%%time\n","!python --version\n","!pip show flash-attn"]},{"cell_type":"code","execution_count":null,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"4f51fafe-5527-49a2-8ccf-a0192e69493a","showTitle":false,"title":""},"id":"xXCH_B2jHk6K"},"outputs":[],"source":["def evaluate_model_all_epochs(model_name, num_train_epochs, adapter_path_base, load_in_4bit=True, use_english_datasets=False, num_of_entries=-1):\n"," os.environ[\"MODEL_NAME\"] = model_name\n"," os.environ[\"LOAD_IN_4BIT\"] = \"true\" if load_in_4bit else \"false\"\n"," os.environ[\"USE_ENGLISH_DATASETS\"] = \"true\" if use_english_datasets else \"false\"\n"," for i in range(num_train_epochs + 1):\n"," print(f\"Epoch {i}\")\n"," if i == 0:\n"," os.unsetenv(\"ADAPTER_NAME_OR_PATH\")\n"," else:\n"," adapter_path = f\"{adapter_path_base}/checkpoint-{560 * i}\"\n"," os.environ[\"ADAPTER_NAME_OR_PATH\"] = adapter_path\n","\n"," !python llm_toolkit/eval_logical_reasoning.py {num_of_entries}"]},{"cell_type":"code","execution_count":null,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"0894c329-05c5-4fe8-85ff-404defe8528a","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"id":"_E-9Zmn9Hk6K","outputId":"cd27218f-38d7-4f96-e827-d846c2b09b34","executionInfo":{"status":"ok","timestamp":1720335141748,"user_tz":-480,"elapsed":136278,"user":{"displayName":"Inflaton Sng","userId":"00179918120580399412"}}},"outputs":[{"output_type":"stream","name":"stdout","text":["Epoch 0\n","loading env vars from: /content/drive/.shortcut-targets-by-id/1E09lTnfbsjtTgQg65dQ3y9D2R6l8waxR/logical-reasoning/.env\n","Adding /content/drive/.shortcut-targets-by-id/1E09lTnfbsjtTgQg65dQ3y9D2R6l8waxR/logical-reasoning to sys.path\n","2024-07-07 06:50:11.960720: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n","2024-07-07 06:50:11.960772: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n","2024-07-07 06:50:11.968499: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n","2024-07-07 06:50:11.988300: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\n","To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\n","2024-07-07 06:50:14.316473: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT\n","loading /content/drive/.shortcut-targets-by-id/1E09lTnfbsjtTgQg65dQ3y9D2R6l8waxR/logical-reasoning/llm_toolkit/logical_reasoning_utils.py\n","gradientai/Llama-3-8B-Instruct-Gradient-1048k None False datasets/mgtv results/mgtv-results_colab.csv\n","(1) GPU = Tesla T4. Max memory = 14.748 GB.\n","0.002 GB of memory reserved.\n","loading model: gradientai/Llama-3-8B-Instruct-Gradient-1048k\n","Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.\n","Loading checkpoint shards: 100% 4/4 [01:02<00:00, 15.69s/it]\n","Some parameters are on the meta device device because they were offloaded to the cpu.\n","(2) GPU = Tesla T4. Max memory = 14.748 GB.\n","12.055 GB of memory reserved.\n","loading train/test data files\n","DatasetDict({\n"," train: Dataset({\n"," features: ['text', 'label', 'answer', 'title', 'puzzle', 'truth', 'train_text', 'prompt'],\n"," num_rows: 25000\n"," })\n"," test: Dataset({\n"," features: ['text', 'label', 'answer', 'title', 'puzzle', 'truth', 'train_text', 'prompt'],\n"," num_rows: 3000\n"," })\n","})\n","--- evaluating 5 entries\n","--------------------------------------------------\n","text: Was Zhen Zhesuo suicide?\n","--------------------------------------------------\n","label: No\n","--------------------------------------------------\n","answer: nan\n","--------------------------------------------------\n","title: The Mystery of the Coast\n","--------------------------------------------------\n","puzzle: In the quiet seaside cottage of a neighbor, a morning in which a body was found on the beach, the cause of death was never determined.\n","--------------------------------------------------\n","truth: Zhen Zhesao was a nature-loving painter who came to this coastal cottage every year to find inspiration. In his final days, he was working on a painting of marine life. The day before the painting was finished, he went out on his bike to watch the night scene at the beach. However, he found a stranded dolphin on the beach and spent a lot of energy trying to rescue it. Exhausted, he fell asleep on the beach, having a heart condition that was so severe that he didn't tell anyone about it. The only evidence of his death was the tire tracks and the unfinished painting.\n","--------------------------------------------------\n","train_text: <|begin_of_text|><|start_header_id|>system<|end_header_id|>\n","\n","You are an expert in logical reasoning.<|eot_id|><|start_header_id|>user<|end_header_id|>\n","\n","You are the host of a situational guessing game. The rules of the game are as follows:\n","\n","1. Participants will receive a riddle that describes a simple yet difficult to understand event.\n","2. The host knows the answer, which is the solution to the riddle.\n","3. Participants can ask any closed-ended questions to uncover the truth of the event.\n","4. For each question, the host will respond with one of the following five options based on the actual situation: Yes, No, Unimportant, Correct answer, or Incorrect questioning. The criteria for each response are as follows:\n"," - If the riddle and answer can provide an answer to the question, respond with: Yes or No\n"," - If the riddle and answer cannot directly or indirectly infer an answer to the question, respond with: Unimportant\n"," - If the participant's question is not a closed-ended question or is difficult to understand, respond with: Incorrect questioning\n"," - If the participant's question essentially reveals the truth of the answer, respond with: Correct answer\n","5. The response must not include any additional information, nor should any word be omitted from the options. For example, \"No\" cannot be abbreviated to \"N\".\n","\n","Please strictly follow these rules when answering the participant's questions.\n","\n","**Riddle:** In the quiet seaside cottage of a neighbor, a morning in which a body was found on the beach, the cause of death was never determined.\n","\n","**Answer:** Zhen Zhesao was a nature-loving painter who came to this coastal cottage every year to find inspiration. In his final days, he was working on a painting of marine life. The day before the painting was finished, he went out on his bike to watch the night scene at the beach. However, he found a stranded dolphin on the beach and spent a lot of energy trying to rescue it. Exhausted, he fell asleep on the beach, having a heart condition that was so severe that he didn't tell anyone about it. The only evidence of his death was the tire tracks and the unfinished painting.\n","\n","**Participant's question:** Was Zhen Zhesuo suicide?<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n","\n","No<|end_of_text|>\n","--------------------------------------------------\n","prompt: <|begin_of_text|><|start_header_id|>system<|end_header_id|>\n","\n","You are an expert in logical reasoning.<|eot_id|><|start_header_id|>user<|end_header_id|>\n","\n","You are the host of a situational guessing game. The rules of the game are as follows:\n","\n","1. Participants will receive a riddle that describes a simple yet difficult to understand event.\n","2. The host knows the answer, which is the solution to the riddle.\n","3. Participants can ask any closed-ended questions to uncover the truth of the event.\n","4. For each question, the host will respond with one of the following five options based on the actual situation: Yes, No, Unimportant, Correct answer, or Incorrect questioning. The criteria for each response are as follows:\n"," - If the riddle and answer can provide an answer to the question, respond with: Yes or No\n"," - If the riddle and answer cannot directly or indirectly infer an answer to the question, respond with: Unimportant\n"," - If the participant's question is not a closed-ended question or is difficult to understand, respond with: Incorrect questioning\n"," - If the participant's question essentially reveals the truth of the answer, respond with: Correct answer\n","5. The response must not include any additional information, nor should any word be omitted from the options. For example, \"No\" cannot be abbreviated to \"N\".\n","\n","Please strictly follow these rules when answering the participant's questions.\n","\n","**Riddle:** In the quiet seaside cottage of a neighbor, a morning in which a body was found on the beach, the cause of death was never determined.\n","\n","**Answer:** Zhen Zhesao was a nature-loving painter who came to this coastal cottage every year to find inspiration. In his final days, he was working on a painting of marine life. The day before the painting was finished, he went out on his bike to watch the night scene at the beach. However, he found a stranded dolphin on the beach and spent a lot of energy trying to rescue it. Exhausted, he fell asleep on the beach, having a heart condition that was so severe that he didn't tell anyone about it. The only evidence of his death was the tire tracks and the unfinished painting.\n","\n","**Participant's question:** Was Zhen Zhesuo suicide?<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n","\n","\n","--------------------------------------------------\n","text: The wheel was the murderer's weapon.\n","--------------------------------------------------\n","label: No\n","--------------------------------------------------\n","answer: nan\n","--------------------------------------------------\n","title: The Mystery of the Coast\n","--------------------------------------------------\n","puzzle: In the quiet seaside cottage of a neighbor, a morning in which a body was found on the beach, the cause of death was never determined.\n","--------------------------------------------------\n","truth: Zhen Zhesao was a nature-loving painter who came to this coastal cottage every year to find inspiration. In his final days, he was working on a painting of marine life. The day before the painting was finished, he went out on his bike to watch the night scene at the beach. However, he found a stranded dolphin on the beach and spent a lot of energy trying to rescue it. Exhausted, he fell asleep on the beach, having a heart condition that was so severe that he didn't tell anyone about it. The only evidence of his death was the tire tracks and the unfinished painting.\n","--------------------------------------------------\n","train_text: <|begin_of_text|><|start_header_id|>system<|end_header_id|>\n","\n","You are an expert in logical reasoning.<|eot_id|><|start_header_id|>user<|end_header_id|>\n","\n","You are the host of a situational guessing game. The rules of the game are as follows:\n","\n","1. Participants will receive a riddle that describes a simple yet difficult to understand event.\n","2. The host knows the answer, which is the solution to the riddle.\n","3. Participants can ask any closed-ended questions to uncover the truth of the event.\n","4. For each question, the host will respond with one of the following five options based on the actual situation: Yes, No, Unimportant, Correct answer, or Incorrect questioning. The criteria for each response are as follows:\n"," - If the riddle and answer can provide an answer to the question, respond with: Yes or No\n"," - If the riddle and answer cannot directly or indirectly infer an answer to the question, respond with: Unimportant\n"," - If the participant's question is not a closed-ended question or is difficult to understand, respond with: Incorrect questioning\n"," - If the participant's question essentially reveals the truth of the answer, respond with: Correct answer\n","5. The response must not include any additional information, nor should any word be omitted from the options. For example, \"No\" cannot be abbreviated to \"N\".\n","\n","Please strictly follow these rules when answering the participant's questions.\n","\n","**Riddle:** In the quiet seaside cottage of a neighbor, a morning in which a body was found on the beach, the cause of death was never determined.\n","\n","**Answer:** Zhen Zhesao was a nature-loving painter who came to this coastal cottage every year to find inspiration. In his final days, he was working on a painting of marine life. The day before the painting was finished, he went out on his bike to watch the night scene at the beach. However, he found a stranded dolphin on the beach and spent a lot of energy trying to rescue it. Exhausted, he fell asleep on the beach, having a heart condition that was so severe that he didn't tell anyone about it. The only evidence of his death was the tire tracks and the unfinished painting.\n","\n","**Participant's question:** The wheel was the murderer's weapon.<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n","\n","No<|end_of_text|>\n","--------------------------------------------------\n","prompt: <|begin_of_text|><|start_header_id|>system<|end_header_id|>\n","\n","You are an expert in logical reasoning.<|eot_id|><|start_header_id|>user<|end_header_id|>\n","\n","You are the host of a situational guessing game. The rules of the game are as follows:\n","\n","1. Participants will receive a riddle that describes a simple yet difficult to understand event.\n","2. The host knows the answer, which is the solution to the riddle.\n","3. Participants can ask any closed-ended questions to uncover the truth of the event.\n","4. For each question, the host will respond with one of the following five options based on the actual situation: Yes, No, Unimportant, Correct answer, or Incorrect questioning. The criteria for each response are as follows:\n"," - If the riddle and answer can provide an answer to the question, respond with: Yes or No\n"," - If the riddle and answer cannot directly or indirectly infer an answer to the question, respond with: Unimportant\n"," - If the participant's question is not a closed-ended question or is difficult to understand, respond with: Incorrect questioning\n"," - If the participant's question essentially reveals the truth of the answer, respond with: Correct answer\n","5. The response must not include any additional information, nor should any word be omitted from the options. For example, \"No\" cannot be abbreviated to \"N\".\n","\n","Please strictly follow these rules when answering the participant's questions.\n","\n","**Riddle:** In the quiet seaside cottage of a neighbor, a morning in which a body was found on the beach, the cause of death was never determined.\n","\n","**Answer:** Zhen Zhesao was a nature-loving painter who came to this coastal cottage every year to find inspiration. In his final days, he was working on a painting of marine life. The day before the painting was finished, he went out on his bike to watch the night scene at the beach. However, he found a stranded dolphin on the beach and spent a lot of energy trying to rescue it. Exhausted, he fell asleep on the beach, having a heart condition that was so severe that he didn't tell anyone about it. The only evidence of his death was the tire tracks and the unfinished painting.\n","\n","**Participant's question:** The wheel was the murderer's weapon.<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n","\n","\n","Evaluating model: gradientai/Llama-3-8B-Instruct-Gradient-1048k\n"," 0% 0/5 [00:00<|eot_id|>\n","--------\n","step 2: Unimportant\n","--------\n","step 3: Unimportant\n","--------\n","step 4: Unimportant\n"," 20% 1/5 [00:42<02:50, 42.56s/it]Setting `pad_token_id` to `eos_token_id`:128001 for open-end generation.\n"," 20% 1/5 [00:48<03:13, 48.35s/it]\n","Traceback (most recent call last):\n"," File \"/content/drive/.shortcut-targets-by-id/1E09lTnfbsjtTgQg65dQ3y9D2R6l8waxR/logical-reasoning/llm_toolkit/eval_logical_reasoning.py\", line 58, in \n"," predictions = eval_model(model, tokenizer, datasets[\"test\"])\n"," File \"/content/drive/.shortcut-targets-by-id/1E09lTnfbsjtTgQg65dQ3y9D2R6l8waxR/logical-reasoning/llm_toolkit/logical_reasoning_utils.py\", line 157, in eval_model\n"," outputs = model.generate(**inputs, max_new_tokens=4096, use_cache=False)\n"," File \"/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py\", line 115, in decorate_context\n"," return func(*args, **kwargs)\n"," File \"/usr/local/lib/python3.10/dist-packages/transformers/generation/utils.py\", line 1914, in generate\n"," result = self._sample(\n"," File \"/usr/local/lib/python3.10/dist-packages/transformers/generation/utils.py\", line 2651, in _sample\n"," outputs = self(\n"," File \"/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py\", line 1532, in _wrapped_call_impl\n"," return self._call_impl(*args, **kwargs)\n"," File \"/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py\", line 1541, in _call_impl\n"," return forward_call(*args, **kwargs)\n"," File \"/usr/local/lib/python3.10/dist-packages/accelerate/hooks.py\", line 169, in new_forward\n"," output = module._old_forward(*args, **kwargs)\n"," File \"/usr/local/lib/python3.10/dist-packages/transformers/models/llama/modeling_llama.py\", line 1174, in forward\n"," outputs = self.model(\n"," File \"/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py\", line 1532, in _wrapped_call_impl\n"," return self._call_impl(*args, **kwargs)\n"," File \"/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py\", line 1541, in _call_impl\n"," return forward_call(*args, **kwargs)\n"," File \"/usr/local/lib/python3.10/dist-packages/transformers/models/llama/modeling_llama.py\", line 978, in forward\n"," layer_outputs = decoder_layer(\n"," File \"/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py\", line 1532, in _wrapped_call_impl\n"," return self._call_impl(*args, **kwargs)\n"," File \"/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py\", line 1541, in _call_impl\n"," return forward_call(*args, **kwargs)\n"," File \"/usr/local/lib/python3.10/dist-packages/accelerate/hooks.py\", line 169, in new_forward\n"," output = module._old_forward(*args, **kwargs)\n"," File \"/usr/local/lib/python3.10/dist-packages/transformers/models/llama/modeling_llama.py\", line 718, in forward\n"," hidden_states, self_attn_weights, present_key_value = self.self_attn(\n"," File \"/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py\", line 1532, in _wrapped_call_impl\n"," return self._call_impl(*args, **kwargs)\n"," File \"/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py\", line 1541, in _call_impl\n"," return forward_call(*args, **kwargs)\n"," File \"/usr/local/lib/python3.10/dist-packages/accelerate/hooks.py\", line 169, in new_forward\n"," output = module._old_forward(*args, **kwargs)\n"," File \"/usr/local/lib/python3.10/dist-packages/transformers/models/llama/modeling_llama.py\", line 614, in forward\n"," query_states = self.q_proj(hidden_states)\n"," File \"/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py\", line 1532, in _wrapped_call_impl\n"," return self._call_impl(*args, **kwargs)\n"," File \"/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py\", line 1541, in _call_impl\n"," return forward_call(*args, **kwargs)\n"," File \"/usr/local/lib/python3.10/dist-packages/accelerate/hooks.py\", line 164, in new_forward\n"," args, kwargs = module._hf_hook.pre_forward(module, *args, **kwargs)\n"," File \"/usr/local/lib/python3.10/dist-packages/accelerate/hooks.py\", line 354, in pre_forward\n"," set_module_tensor_to_device(\n"," File \"/usr/local/lib/python3.10/dist-packages/accelerate/utils/modeling.py\", line 404, in set_module_tensor_to_device\n"," new_value = value.to(device)\n","KeyboardInterrupt\n","CPU times: user 784 ms, sys: 104 ms, total: 888 ms\n","Wall time: 2min 15s\n"]}],"source":["%%time\n","\n","evaluate_model_all_epochs(\"gradientai/Llama-3-8B-Instruct-Gradient-1048k\", 0, \"\", load_in_4bit=False, use_english_datasets=True, num_of_entries=5)"]}],"metadata":{"accelerator":"GPU","application/vnd.databricks.v1+notebook":{"dashboards":[],"environmentMetadata":null,"language":"python","notebookMetadata":{"mostRecentlyExecutedCommandWithImplicitDF":{"commandId":-1,"dataframes":["_sqldf"]},"pythonIndentUnit":4},"notebookName":"10_eval-lf-medium-py3.11","widgets":{}},"colab":{"gpuType":"T4","provenance":[]},"kernelspec":{"display_name":"Python 3","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.11.9"}},"nbformat":4,"nbformat_minor":0}