{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "ed4a9148-55d8-483f-888d-9939a06873f9", "metadata": { "tags": [] }, "outputs": [], "source": [ "import os\n", "os.environ['HF_HOME'] = \"/scratch/tar3kh/models/cache\"\n", "import torch \n", "from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline\n", "from datasets import load_dataset #datasets is huggingface's dataset package\n", "from peft import get_peft_model, LoraConfig, TaskType\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", "import pandas as pd\n", "import PIL\n", "\n", "import lm_eval" ] }, { "cell_type": "code", "execution_count": 2, "id": "74f6aba0-fb07-4ba6-b3d5-f63900b3e4f5", "metadata": { "tags": [] }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "1731e4705d734f3b9f1cab292fcbc9fd", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Loading checkpoint shards: 0%| | 0/2 [00:00. This is expected, and simply means that the `legacy` (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set `legacy=False`. This should only be set if you understand what it means, and thoroughly read the reason why this was added as explained in https://github.com/huggingface/transformers/pull/24565 - if you loaded a llama tokenizer from a GGUF file you can ignore this message.\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "e7367950b76e48d78fe4ea8adcc11321", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Loading checkpoint shards: 0%| | 0/4 [00:00